How To Restore Missing File Editor in WordPress
Are you struggling with a missing file editor in your WordPress dashboard? Don’t worry!
In today’s post, we’ll guide you through the steps to quickly and safely bring back the file editors for themes and plugins.
The Problem: Missing Editors in WordPress Dashboard
When you log into your WordPress dashboard and navigate to the ‘Appearance’ section, the theme file editor might be missing.
Similarly, the plugin file editor could be absent under ‘Plugins’.
This issue can block your ability to edit your site’s files directly from the dashboard.
The Root Cause: Hosting or Security Plugins
Often, this missing item is a result of actions taken by your hosting company or a security plugin, such as WordFence.
For security reasons, these plugins may remove options to prevent code injection by attackers.
However, if you need to add custom code to your theme file, you’ll have to enable the theme editor manually.
Solution 1: Using FTP
FTP is a popular control panel used in web hosting. To resolve the issue using FPT:
- Launch FileZilla: connect to your server using your details
- Edit wp-config File: Locate the
wp-config.php
file, right-click, and select ‘Edit’. - Modify Code: In the editor, look for the line of code that says
define('DISALLOW_FILE_EDIT', true);
. This particular line disables the file editing feature in WordPress. Changetrue
tofalse
or you can even delete this line completely. - Save Changes and Refresh: After making the changes, save the file and refresh your WordPress dashboard.
You should now see the theme and plugin editors restored in your dashboard.
Solution 2: Using a File Manager Plugin
If you don’t have access to FTP or don’t want to use it, you can use a File Manager plugin in WordPress. Here’s how:
- Install File Manager Plugin: Go to ‘Plugins’ in your dashboard, click ‘Add New’, and search for ‘File Manager’. Install and activate the plugin.
- Access wp-config File: Open the File Manager plugin. Locate and right-click on the
wp-config.php
file, then select ‘Code Editor’. - Edit and Save: Similar to the FTP method, find the
DISALLOW_FILE_EDIT
line and changetrue
tofalse
or delete the line. Save your changes.
After this, the file editors should reappear in your dashboard.
Important Note
While using the plugin method, be very careful when editing the wp-config.php
file.
A mistake could render your website inaccessible.
I always to a backup of the file I’m going to work on to be able to restore it if something goes wrong.
In such cases, you’ll need to use FTP access to rectify the error.
Conclusion
Restoring the file editor in WordPress is a straightforward process, whether you use FTP or a plugin.
Always be cautious when making changes to core configuration files like wp-config.php
.