X

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.



Code Snippet:


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

Comments  Leave a Reply

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

  2. Do you know how to fix this problem:

    I added:

    define(‘DISALLOW_FILE_MODS’,true);
    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:

    define(‘DISALLOW_FILE_MODS’,false);
    define(‘DISALLOW_FILE_EDIT’,false);

    but that did not work.

    Any clues? Thanks.

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

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!