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

Worried about your website’s safety? Thinking of disabling your WordPress website’s file, plugin, and theme editor? If yes, then this article is for you.

Well, the WordPress plugin and theme editor offers you additional convenience by allowing you to make all the required changes, including making changes in website design and adding extra functionality directly from your WordPress dashboard.

But at some time, this WordPress plugin and theme editor may become dangerous for you if you have given Administrator access to your website to many people.

By mistake or intentionally, they can break your entire website, even install malware. For additional safety, it is always better to disable your WordPress site’s file, plugin, and theme editor.

Now the question arises, how can you do it? Below in this article, I have 2 different ways to disable WordPress website files, plugins, and theme editors, including:

  • 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 the 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.”

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
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 );

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
Add “DISALLOW_FILE_EDIT” Line in 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 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

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
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 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.

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
Search “iThemes Security” Plugin in 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.

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
Open “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 wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
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 plugins 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 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.

disable file editor wordpress, disable theme editor wordpress, wordpress disable editor, wordpress disable plugin editor
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 the ways are perfect and will not cause any error 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 problem following the above steps in the comment section below.

TheWPX is a blog where we cover topics related to Blogging, WordPress, SEO, and Affiliate Marketing.
All the information which is published on our website is collected through independent research and tests. The data is being verified through consultation with reliable sources.
Also, We constantly update the content on our website, keeping it fresh and relevant to our readers at all times.

Leave a Comment

Sunny Kumar

Sunny Kumar, Founder of TheWPX

Hola Amigos! I'm Sunny Kumar, Founder of TheWPX. A blog where I share my experience which I have gathered from my last 7 year journey in blogging with all the new bloggers struggling to make their first income.