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

    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.

    wordpress snippet : PHP

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

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

    _e,
  • 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_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.

  • lordspace

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

Build a better with wpsnipp.com

Weekly snippets, themes, deals coupons roundup.

x No Thanks