If you are going to disable Theme editor and plugin editor in the WordPress admin panel to prevent someone from making changes to these files, then our blog is the right place for your website. In this blog, we will provide you with 2 easy methods to address this issue. Now, let’s check them out.
Where are theme editor and plugin editor in WordPress admin panel
Theme editor and plugin editor are 2 of the important options to manage your website from the back-end.
To locate the position of these options, first of all, you need to login into your WordPress admin panel. Then, let’s navigate to “Appearance > Theme Editor” to view all theme files. From here, you can edit your core themes such as functions.php, header.php, single.php, etc.
However, once you can access the theme editor or plugin editor, a warning message will be displayed to warn you that if you edit your CSS and plugins, it can break your website. Instead of that, you can make changes in the built-in CSS editor. Then, you can simply click on the “I understand” button, then it will show your current active theme’s code.
Similarly, simply switching to Plugins > Plugin file editor, you will see all available plugin’s core files from the plugin editor.
Why should you disable theme editor and plugin editor in WordPress admin panel?
The main purpose of disabling theme editor and plugin editor is to reduce the risk of damage to your website from authorized access. Because, if hackers are able to access your WordPress dashboard via security vulnerabilities, they will make changes to files on the theme or plugin editor, which can lead break your entire website.
For those reasons, it is necessary for you to disable theme and plugin editor options from your WordPress admin panel to protect your coding files safely.
How to disable theme editor and plugin editor in WordPress admin panel
Method 1: Editing your wp- config.php file
It is the easiest method to disable theme editor and plugin editor in WordPress admin panel. All you need to do is add a custom code to your wp-config.php file. Now, let’s follow the steps to execute.
- You need to login into your WordPress website by using the FTP client
- Go to your WordPress installation root
- Locate the wp-config.php file and right-click on it and choose the View/Edit option
- Now let’s copy the following code and paste it before the line that says “That’s all, stop editing! Happy publishing”
//Disable File Edits
define('DISALLOW_FILE_EDIT', true);
Don’t forget to save and upload the file back to your website.
After adding this code, the theme editor and plugin editor menus will be removed from the WordPress admin panel. You can go back to your WordPress admin panel to check them.
Method 2: Using a free plugin
If you don’t want to edit your file, there is another useful method for you. In this tutorial, we highly recommend using All In Once WP Security & FireWall plugin. This is one of the most famous WordPress security plugins that provide you with an option to prevent ability of people from editing your PHP files via the WordPress dashboard.
To use this plugin, first of all, you need to install and activate the plugin as the following steps:
- Go to Plugins > Add New from your WordPress dashboard
- Then, let’s use the search bar to find the plugin
- Next, click on the Install Now button and Activate the plugin
Once the plugin is activated. Now, you need to navigate to WP Security > Filesystem security.
Next, move to the PHP file Editing tab and enable the option “Disable Ability to Edit PHP files“.
Don’t forget to click on the “Save settings“.
Now, you will see that the theme editor and plugin editor disappeared from your WordPress admin panel. Moreover, this plugin also completely disable the ability of admin user to modify PHP files.
The bottom line
Hopefully, this blog will help you properly disable theme editor and plugin editor from your WordPress admin panel without breaking your website. If you get into any trouble or need our assistance, don’t forget to contact us by leaving a comment below.
Additionally, if you are going to build a professional website, you can visit our website and explore a wide range of stunning, free WordPress Themes.
We’re a Digital Team from EngineTemplate with 5 content experts. Our team has 5 years exp in open source Joomla and WordPress, we make daily blogs and build useful resources for everyone who is having issues with open source while using it.