How to Disable the Theme and Plugin Editor in WordPress


January 12, 2016



The backend of WordPress provides by default an editor for your themes and plugins. This allows the user to edit the source-code of the theme and plugin files directly through the admin panel. As this can be a great feature to add quick changes to the code it also can be very dangerous.

wordpress admin panel theme plugin editor
You can find the Editors in the Submenu of “Appearance” and “Plugins”.

Hiding the Editors

There are two possibilities how to hide the editors. You can either disable it via the functions.php of your theme or globally via the config.php in your WordPress root folder.

Disable Editors Globally

Paste the following code to your config.php file:

Disable Editors in your Theme

Paste the following code to your theme’s functions.php:

INTERNETKULTUR | © 2021 | Imprint