How to Disable File, Plugin & Theme Editor in WordPress?

Are you concerned about the security of your website? Are you thinking about switching off the file, plugin, and theme editor on your WordPress site? If that’s the case, then you’ve come to the right place.

The plugin and theme editor in WordPress can be really handy. It lets you tweak your website’s design and add new features right from the dashboard.

However, this same editor can turn into a headache if many people have admin access to your website. Someone could accidentally or deliberately mess up your entire site or even put malware on it. So for better protection, it’s wise to turn off the file, plugin, and theme editor on your WordPress site.

Now, you might be wondering how to do that. Don’t worry, I’ve got your back. In this article, I’m going to share two different methods to disable these editors on your WordPress website. Stick around to find out how.

  • Disable file, plugin, and theme editor by editing the wp-config.php file.
  • Disable file, plugin, and theme editor using a plugin.

In this article, I have explained both ways step-by-step; follow the below instructions carefully to be done with it.

How to Disable File, Plugin & Theme Editor in WordPress by Editing wp-config.php File?

I highly recommend using this method for disabling files, plugins, and theme editors in WordPress because it is always better to add a code rather than install a separate plugin.

You can also easily do it even if you are not familiar with the server-side and coding before I have explained straightforwardly so that you will not face an issue. Follow the below instructions carefully to be done with it.

First of all, login to your server control panel, or you using FTP (Here in my case, I have a cPanel server), then go to File Manager >> then go to your Websites Directory >> here you will find “wp-config.php file.”

Open “WP-Config.php” File

Right-click and then click on Edit, then the file will be opened in the code editor, where you can easily edit it. What you have to do is add a like on code before a line “That’s all, stop editing! Happy publishing” Here is the code to add:

define( 'DISALLOW_FILE_EDIT', true );

Add the “DISALLOW_FILE_EDIT” Line in the File

Save the file by clicking on the Save Changes button at the top right corner, and you are done.

Keynote: I highly recommend you take a backup of wp-config.php before making any changes so that in terms of any error, you can restore the original file.

Not just to wp-config.php, you can also add this line of code to your theme’s function.php file with any site-specific plugin, or you can also use a free plugin called code snippets.

How to Disable File, Plugin & Theme Editor in WordPress by Using Plugin?

As this issue is related to website security, many WordPress security plugins also have an option to disable files, plugins, and theme editors in WordPress. Below, I have explained the exact procedure with different plugins: iThemes Security and Disable File Editor.

Let’s understand both ways one by one.

1. Using iThemes Security

iThemes Security Pro Plugin

iThemes Security is one of the best and most used WordPress security plugins that offer you many security options. It’s a freemium plugin; you can use it for free, but you need to purchase its premium version for complete security and advanced options.

For this tutorial, you don’t need to purchase the premium version. iTheme Security plugin allows you to disable the theme, plugin, and file editor with its free version. Follow the below instructions carefully to be done with it.

First of all, you need to install the iTheme Security Plugin. For this, login to your WordPress website >> go to Plugin >> click on Add New >> search for iTheme Security >> Click on Install and Activate it.

Search the “iThemes Security” Plugin in the WordPress Repository

Once the plugin is activated, you will see the Security option below Settings. Hover over the Security option, and you will see the Setup option over there if you have installed this plugin for the first time on your website.

Open the “iThemes Security Setup Module”

Complete the plugin setup, and you are done; a new set of options will open. Hover over the Security option >> then click on Settings > then click on Advanced option >> and here you will get WordPress WordPress Tweaks >> Click on the Disable File Editor and click on Save.

Disable “File Editor” Options in iThemes Security

You are done; that’s how you can disable the file editor in WordPress using the iTheme Security plugin free version. Not just the iTheme Security plugin but lots of other security plugins also have this option.

2. Using ‘Disable File Editor’ Plugin

Disable File Editor is a free and easy-to-use plugin that allows you to disable WordPress files, themes, and plugin editor. You need to install this plugin, and it’s all done; this plugin has no settings. Follow the below instructions carefully to be done with it.

To install this plugin, first of all, log in to your WordPress website >> go to Plugin and click on Add New >> search for Disable File Editor >> click on Install and Activate the plugin.

Search for “Disable File Editor”

Done; this plugin will do everything automatically; there are no settings to do.

Final Words

Disabling files, plugins, and theme editors in WordPress is not a challenging task; you can choose any of the above-shared ways. Both ways are perfect and will not cause any errors in the future.

Talking about my recommendation, I suggest you edit the wp-config.php file if you are a techy person and comfortable with the server-side interface.

But if you are a newbie, then a plugin way to disable files, plugins, and theme editor is best for you. I hope this article helps you. Do share if you are facing any problems following the above steps in the comment section below.

Sunny Kumar

Number of posts: 145

Hi, I'm Sunny Kumar, a passionate tech enthusiast and a blogger from New Delhi, India. With a degree in IT from IIT-D and expertise in SEO, Cloud Computing, Telecom & Networking, and CEH, I specialize in various technical fields, including SEO, WordPress Development, and PC Building. And being a proficient WordPress user, I’m dedicated to delivering quality content and a remarkable user experience.

Leave a Comment