WordPress includes code editors under Appearance → Theme File Editor and Plugins → Plugin File Editor. Anyone with access can change PHP code directly on the live site. If an attacker takes over an administrator account, these editors let them insert a backdoor in seconds.
What the setting does
Disable file editor in Aegisify Shield → Hardening → Basic Hardening prevents plugins and themes from being edited through the dashboard:
- The editor menu items are removed.
- Direct visits to the editor screens are blocked and logged.
- Shield reminds you that adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.phpfully disables the editors at the WordPress level.
Requirements
Hardening must be enabled first. It is off by default and requires a one-time acknowledgment because some options change WordPress behavior.
Is it safe to enable?
Yes, for almost every site. Aegisify recommends it for production sites. Developers should edit code locally and deploy through SFTP, Git, or a deployment tool instead, which also gives you version history.
Related setting
Disable plugin & theme editor screens restricts the editor screens themselves. Using both gives the strongest protection.
Undoing it
Untick the option and save. If you added the wp-config.php constant, remove it as well.
Related: Hardening module, Hardening changes logged.
