background img
Jun 26, 2020
125 Views
0 0

How to Disable Theme and Plugin Editor from WordPress Dashboard

Written by

Do you want to disable the Theme and plugin editor from your WordPress dashboard(WordPress Disable Gutenberg)? However, the WordPress file editor is a very good feature. This allows you to edit the Theme and Plugin file from the WordPress dashboard itself. But in some cases, it can also be dangerous!

If a hacker can access your WordPress site’s dashboard, they can easily edit the files and install potentially malicious code.

But don’t worry, you can fix it easily.

Today in this article, I will show you how to Disable Theme and Plugin Editors from WordPress Dashboard.

Why WordPress Disable Gutenberg in WordPress

WordPress comes with a built-in file editor that allows editing theme and plugin files directly from the WordPress dashboard.

If a hacker hacks your WordPress dashboard, they can easily edit files and install Malicious code on your WordPress website.

So you should keep Theme and Plugin Editors Disable in your WordPress dashboard.

Find out How WordPress Disable Gutenberg

Login to your WordPress website and click on Appearance >> Theme Editor page. This will show you’re currently Activate theme files. As you can see in the screenshot below.


For Plugin editor, click on Plugins >> Editor. This will show the file of plugins installed on your site which comes first in Alphabetical order.

WordPress Disable Gutenberg
If you visit the theme or plugin editor page for the first time, it will warn you that your website may be broken.

WordPress Disable Gutenberg
Now let’s begin how to easily disable Theme and Plugin editors in WordPress.

Disable WordPress Plugin and Theme Editor using wp-config.php file

You have to use your WordPress wp-config.php file, which cannot be accessed from the WordPress dashboard.

It is found in the WordPress root directory / public_html /.

After getting the wp-config.php file, just edit your wp-config.php file and / * That’s all, stop editing! Happy blogging. * /. Paste the following code just before the line.

define (‘DISALLOW_FILE_EDIT’, true);

After pasting the code, save your WP-config.php file.

enough! Plugin and Theme Editor will be disabled on your WordPress site.

Last thought

Here I showed you how to disable Plugin and Theme Editor in WordPress. This is the easiest and best way.

Apart from this, if you are using a security plugin like iThemes Security or Sucuri or All In One WP Security & Firewall Plugin on your site, you can also disable file editor with these.

I hope you find the post helpful!

Article Categories:
WordPress Tricks and Tips

Leave a Reply

Your email address will not be published. Required fields are marked *


The maximum upload file size: 300 MB.
You can upload: image, audio, video, document, text, other.
Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.