Home / admin / Disable editors and plugin modifications entirely
  • How to Disable editors and plugin modifications entirely


    Adding this snippet to the wp-config.php of your wordpress install will disable theme editing and the plugin editor entirely. Including removing them from the wordpress admin menu and also disabling the ability to delete plugins.

    ( click code to copy )

    wordpress snippet : PHP

    define( 'DISALLOW_FILE_EDIT', true );
    define( 'DISALLOW_FILE_MODS', true );

    ( WordPress codex functions, hooks, in this snippet. )

  • Anonymous

    This one is very useful for making sure customers don’t mess with plugins and editor setting. Thanks!

  • WebWeaver

    Do you know how to fix this problem:

    I added:

    define( ‘DISALLOW_FILE_EDIT’, true );

    to wp-config.php and then when I deleted it, the plugins did not come back.

    I tried changing them to:


    but that did not work.

    Any clues? Thanks.

  • lordspace

    if you leave define(‘DISALLOW_FILE_MODS’,false); too this will affect auto-update WordPress (since 3.7)