Book a call Free rebuild
Home/Glossary/WordPress/Plugin File Editor

Plugin File Editor

March 1, 2023 Updated November 16, 2026 2 min read

WordPress glossaryThe plugin file editor is a WordPress admin screen for editing plugin code in the browser. Many sites switch it off with DISALLOW_FILE_EDIT, since one mistake can break the site.

The plugin file editor is a screen in the WordPress admin that opens a plugin's PHP, JavaScript, and CSS files in a code editor inside the browser, so they can be changed and saved without FTP or SSH. It sits under Plugins, then Plugin File Editor, or under Tools on sites that use a block theme. Only administrators can use it, and on a multisite network only super admins.

It looks convenient, and for a quick look at how a plugin works it can be. For actually changing code on a live site, it is almost always the wrong tool.

Why it is risky

  • Changes do not survive updates. Editing a plugin's files changes your copy only. The next time the plugin updates, WordPress replaces the files and your edit disappears, often without anyone noticing until the bug it fixed comes back.
  • One mistake can take the site down. A missing semicolon in PHP can cause a fatal error. Since version 4.9, WordPress checks a PHP edit before saving it and rolls it back if it breaks the site, and since 5.2 recovery mode can help get back into the admin, but neither catches every problem.
  • No history. There is no undo after saving, no version control, and no record of who changed what.
  • A gift to attackers. Anyone who gets into an administrator account can use the editor to plant malicious code in a plugin file. It is a common way for malware to get onto a site once a password has been stolen or guessed.

Turning it off

Many sites switch the editor off entirely, and most security guides recommend it. Add this line to wp-config.php:

define( 'DISALLOW_FILE_EDIT', true );

This removes both the plugin file editor and the theme file editor for every user. Plugins can still be installed and updated as normal. A stricter constant, DISALLOW_FILE_MODS, also blocks installing, updating, and deleting plugins and themes from the dashboard, which suits sites deployed from version control.

Better alternatives

  • Use the plugin's hooks. Most well-built plugins offer actions and filters for changing their behavior. Put that code in a small site-specific plugin or a code snippets plugin, where updates cannot touch it.
  • Override templates properly. Plugins such as WooCommerce let a theme override their templates by copying them into the theme.
  • Work on a copy. Make code changes on a staging site or locally, test them, and deploy with SFTP or Git.
  • Ask the developer. If a plugin has a bug, report it so the fix lands in the plugin itself.

If a change made in the editor has already broken the site, connect over SFTP or the host's file manager and undo the edit, or rename the plugin's folder in wp-content/plugins to deactivate it. A recent backup is the fallback when neither works.

WP Services

WordPress services at revolutionary pricing.

Productized WordPress services, from builds to care, delivered by Seahawk and tracked in one app. For the WordPress lovers.