WordPress's built-in file editor is disabled by default at Seravo for security reasons. This guide shows you how to temporarily enable the editor to modify your theme or plugin files directly from the WordPress admin dashboard. This guide is aimed at experienced site administrators.
Prerequisites and Important Notes
Note on Security Guarantee: Seravo's Security Guarantee is not valid while the file editor is enabled. If an attacker manages to inject malicious code into the site while the editor is active, we will charge for the malware cleanup based on our hourly rate (€150/hour + VAT).
You will need an SSH or SFTP connection to your site to edit the
wp-config.phpfile.We strongly recommend making any file modifications primarily via a direct SSH or SFTP connection instead.
Step-by-Step Instructions
Connect to your site: Establish a secure SSH or SFTP connection to your site (using a client like FileZilla).
Open the wp-config.php file: Locate the
wp-config.phpfile in the root directory (htdocs) of your site and open it with a text editor.Enable the editor: Find the line that says
define('DISALLOW_FILE_EDIT', true);and change its value tofalse. If the line doesn't exist, you can add the following line to the file:define('DISALLOW_FILE_EDIT', false);Save your changes: Save the file to the server. You can now log into your WordPress admin dashboard and use the file editor (Appearance > Theme File Editor / Plugins > Plugin File Editor).
Revert the setting: As soon as you have finished your edits in the admin dashboard, open
wp-config.phpagain and change the value back totrue. This will return WordPress to its secure state.
The line looks like this in the wp-config.php file:
/* * Disable the theme/plugin file editor for security reasons */
define('DISALLOW_FILE_EDIT', true);
Related Articles
Keep in mind that the most secure way to modify theme files or plugins is always directly via an SFTP or SSH connection. Doing so ensures that Seravo's Security Guarantee remains unbroken.
