The plugin and theme editors in wp-admin let Administrators edit code in the browser. That raises risk if an account is compromised, and makes accidental breakage easier.
Manual fix (Free)
- Open
wp-config.phpin the WordPress root (FTP or host file manager). - Above
/* That's all, stop editing! Happy blogging. */, add:
define( 'DISALLOW_FILE_EDIT', true );
- Save the file.
- Confirm Appearance → Theme File Editor and Plugins → Plugin File Editor are gone.
One-click fix (Pro)
- Go to Security Ninja → Fixes.
- Enable the option to disable the plugin and theme editor.
- Confirm the editors no longer appear in wp-admin.
Related: Fixes overview, How to use the firewall for login protection.
