Enable and disable the file editors in WordPress

Updated on September 23, 2025

WordPress has two built-in file editors:

  • Plugin File Editor
  • Theme File Editor

When using a block theme, both editors will be located under the Tools menu. Otherwise, the plugin editor will be located under Plugins, and the theme editor will be located under Appearance. Both editors provide a similar interface for viewing and editing the files.

You should use the WordPress file editors carefully because you can cause the site to crash with improper changes. For this reason, some administrators and hosting companies disable the editors.

Disabling the editors in wp-config.php

To disable the editors, you can set DISALLOW_FILE_EDIT to true in wp-config.php:

define('DISALLOW_FILE_EDIT', true);

To re-enable the editors, you can set DISALLOW_FILE_EDIT to false. The default is false, so you can also delete the line or comment it out. To comment out a line, put a hash (#) character at the start of the line.

define('DISALLOW_FILE_EDIT', false);

# Or comment out by putting a hashmark in front of the line
# define('DISALLOW_FILE_EDIT', true);

See How to edit wp‑config.php on WordPress 3 easy ways for help editing the WordPress configuration file (wp-config.php).

Solid Security Pro

If you use the Solid Security Pro plugin, then you can change the setting through the plugin:

  1. Go to Security > Settings
  2. Click Advanced
  3. Expand WordPress Tweaks Settings
  4. Check or uncheck Disable File Editor
  5. Click Save on the bottom of the page
  6. Refresh

Reference

License

Licensed under CC BY 4.0

You are free to share and adapt this content for any purpose as long as you give appropriate credit in a reasonable manner.

No affiliate links

We do not participate in affiliate marketing, and we are not paid to mention products.

Leave a Reply

Your email address will not be published. Required fields are marked *