Skip to content
Select theme
Get Started

Disable File Editing

Summarize with AI

Disable File Editing removes the dashboard screens that let anyone edit theme or plugin code from the browser - one less disaster if an account is compromised.

  • Optionally blocks the theme editor (Appearance -> Theme File Editor / Site Editor AJAX paths).
  • Optionally blocks the plugin editor (Plugins -> Plugin File Editor).
  • Uses capability mapping and direct editor URL blocking when those options are on.
  • Does not block plugin/theme install, activation, deletion, or updates (that is DISALLOW_FILE_MODS in wp-config, a separate stricter control).
  • Other PowerSuite tools (such as Code Snippets) may still allow admin code changes.

Enable it if:

  • Multiple administrators can access the dashboard.
  • You deploy code via Git/SFTP and never need the built-in editors.
  • You want a quick hardening step after a security review.
  • Disable theme editor - blocks Appearance -> Theme File Editor, Site Editor file editing paths, and related AJAX.
  • Disable plugin editor - blocks Plugins -> Plugin File Editor and related AJAX.
  1. Go to WP PowerSuite -> Modules.
  2. Open Security or search for “Disable File Editing”.
  3. Toggle Disable File Editing on.
  4. Open settings, enable theme and/or plugin editor blocking, then save.
  • Enable both checkboxes and save.
  • Visit Appearance -> Theme File Editor and Plugins -> Plugin File Editor.
  • ✅ Pass: editors are blocked or show a disabled message.
  • ❌ Fail: confirm settings saved, module is on, and you are not bypassing via a host-level file manager (expected for SFTP).
  • Editor still opens. Re-save settings; confirm both relevant checkboxes; check for another plugin restoring caps.
  • Need to edit code urgently. Toggle the module off or uncheck the relevant editor option, edit, then re-enable.
  • Installs still work. Expected - this module does not set DISALLOW_FILE_MODS.

Prefer the command line? You can turn this module on or off with WP-CLI instead of the dashboard:

Terminal window
# Turn the module on
wp powersuite module enable disable-file-editing
# Turn the module off
wp powersuite module disable disable-file-editing
# Check whether it is on, its category, and where its settings live
wp powersuite module get disable-file-editing

Managing more than one site? Add --url=https://example.com to point a command at one site. If this is a Pro module, install WP PowerSuite Pro and activate your license first. New to WP-CLI? See the full command guide.

What does Disable File Editing do?

It blocks the WordPress theme and/or plugin file editors in the dashboard based on your settings.

Is Disable File Editing free?

Yes. Enable it under WP PowerSuite -> Modules.

Does it stop plugin installs?

No. It only blocks the file editors. DISALLOW_FILE_MODS in wp-config is a separate, stricter control.

Can I block only the plugin editor?

Yes. Use the Disable plugin editor checkbox and leave the theme editor option off.

How do I turn Disable File Editing off?

Go to WP PowerSuite -> Modules, find Disable File Editing, and toggle it off.

Developer notes (hooks & filters)

Source: modules/disable-file-editing/module.php. Boot: critical · context: admin.

Hooks: admin_init (direct editor access block), map_meta_cap (late priority).