WordPress 👻 Disable the theme/plugin editor in the administration

Share on twitter
Share on linkedin
Share on facebook
Share on whatsapp
Share on email
Share on twitter
Share on linkedin
Share on facebook
Share on whatsapp
Share on email

By default, WordPress offers the possibility for administrators to modify the code of themes and plugins through the administration board. This feature is accessible from the side menu: Appearance -> Editor and plugins -> Editor.

Disable the theme and theme editor.plugins

It is possible to disable the "Editor" feature by adding the following line to the file wp-config.php located at the root of your site WordPress, before the line /* That's all, stop editing! Happy blogging. */.

// Disable the Plugin and Theme Editor
define( 'DISALLOW_FILE_EDIT', true );

Disable the editor, updates and adding themes andplugins

It is also possible to disable updates, adding and editing for themes and plugins by using the constant DISALLOW_FILE_MODSfile, still in the wp-config.php.

// Disable Plugin and Theme Update and Installation
define( 'DISALLOW_FILE_MODS', true );
Julien .MA Jacob
Developer WordPress
Julien MA Jacob - Developer WordPress
🧙♂️ Passionate about the web and programming with always lots of projects in mind 👨💻 | About page
  Discussion of the article
Subscribe to our newsletter
Notify of
guest
0 Comments
Inline Feedbacks
View all comments