wordpress disallow_file_edit

  1. Access the WordPress installation directory on your server.

  2. Locate the wp-config.php file within the WordPress installation directory.

  3. Open the wp-config.php file using a text editor or a code editor.

  4. Add the following line of code to the wp-config.php file, preferably just before the line that says "/ That's all, stop editing! Happy blogging. /":

define('DISALLOW_FILE_EDIT', true);
  1. Save the changes made to the wp-config.php file.

  2. Upload the modified wp-config.php file back to your server if you made changes locally.

  3. Verify that the changes have taken effect by attempting to access the Theme Editor and Plugin Editor from the WordPress admin dashboard. You should observe that the options to edit theme and plugin files are now disabled.