wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Disable editors and plugin modifications entirely

wordpress snippet

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.

snippet :  PHPcopy
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );

Did you like this post? If so please share it with your friends. Thanks!

  • 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)