fbpx
Search
Close this search box.

How To Disable File Editing In WordPress Dashboard? (2 Easy Methods)

Table of Contents

Get up to 50% off now

Become a partner with CyberPanel and gain access to an incredible offer of up to 50% off on CyberPanel add-ons. Plus, as a partner, you’ll also benefit from comprehensive marketing support and a whole lot more. Join us on this journey today!

When you disable file editing in WordPress dashboard, you are essentially protecting your WordPress site from potential security issues and any other vulnerabilities.

In this article we will learn about how you can disable file editing in WordPress dashboard.

What is File Editing?

The WordPress interface includes a code editor for themes and plugins.

Themes and Plugin settings are located on the left navigation panel. To change the theme and plugin files straight from the WordPress dashboard, they provide a simple code editor.

disable file editing in wordpress dashboard

You will get a warning window if you click on the Plugin Editor.

Only first-time visitors experience the Warning Box. Code modification alerts are displayed in the box regarding the WordPress files. If not done correctly, it might damage the website or prevent you from accessing it.

Tech Delivered to Your Inbox!

Get exclusive access to all things tech-savvy, and be the first to receive 

the latest updates directly in your inbox.

Why Disable File Editors in WordPress?

From the admin section of your website, one of the greatest places to start is with security. The login page causes trouble for millions of websites by allowing the introduction of malicious code into the plugin and theme coding files.

The worst aspect is that after a website has been hacked through poor code injection, it might be challenging to remediate. You can’t browse through all of the code files on a plugin or theme because there are plenty of them.

Therefore, why not make the decision to fire the editor? I’m hoping you’ll find it simple to do this.

The primary drawback of the built-in file editor is that it offers you complete freedom to add any form of code to your website. If a hacker gained access to your WordPress admin area, they might access all of your WordPress data using the built-in editor.

Additionally, it may be used by hackers to spread malware or start DoS attacks from your WordPress website.

We advise fully deleting the built-in file editors from WordPress in order to increase security.

Let’s now examine how to quickly disable WordPress’s file editors.

Disable File Editing in WordPress Dashboard

The .htaccess and wp-config.php are the two most vital files of a WordPress site. In the majority of situations, you should use these files anytime you need to increase or improve any feature.

To remove the file editing option from the WordPress admin panel, you must use the wp-config.php file

Open your CyberPanel dashboard

Enhance Your CyerPanel Experience Today!
Discover a world of enhanced features and show your support for our ongoing development with CyberPanel add-ons. Elevate your experience today!

Click on WordPress -> List WordPress from the left hand side menu

This is your List WordPress Website page, click on your WordPress site title

This is your site’s WordPress Manager. Click on File Manager

There are several folders in File Manager. You must access public_html, sometimes referred to as the root directory. The files for the WordPress website are under public_html. In public_html, locate the wp-config.php file. Right click on it and click on Edit with CodeMirror

Wp-config.php file would not be empty. A lot of code would be present. Paste the following code at the end of the file

define (DEFINE_FILE_EDIT; true);

Save the file.

Now open the WordPress dashboard

Click on Plugins from the left hand side menu. Now you will see that the Plugin File Editor option is disabled

Disable File Editing in WordPress Dashboard.

Some of you might not be comfortable with editing the wp-config.php file, you can achieve the same result with a plugin.

Go to your WordPress dashboard

Click on Plugins -> Add New from the left hand side menu

Search for “Disable File Editor“. Install and activate

As soon as you activate this plugin, it will automatically disable file editing in WordPress dashboard.

Login to the WordPress site to not find the theme and plugin editor at the WordPress admin dashboard.

Conclusion

For WordPress security, the admin panel must be protected. Hard passwords, security questions, a login attempt cap, or the use of login security plugins are all ways to protect a login page.

It could take a long time and be challenging to clean the code of a hacked website.

Even if a hacker manages to access the website, you may prevent any code injection by disabling file editing.

Related Content: How to fix “Sorry This File Type Is Not Permitted for Security Reasons”

Editorial Team
The CyberPanel editorial team, under the guidance of Usman Nasir, is composed of seasoned WordPress specialists boasting a decade of expertise in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Since its establishment in 2017, CyberPanel has emerged as the leading free WordPress resource hub in the industry, earning acclaim as the go-to "Wikipedia for WordPress."
Unlock Benefits

Become a Community Member

SIMPLIFY SETUP, MAXIMIZE EFFICIENCY!
Setting up CyberPanel is a breeze. We’ll handle the installation so you can concentrate on your website. Start now for a secure, stable, and blazing-fast performance!