Support » Plugin: Sucuri Security - Auditing, Malware Scanner and Security Hardening » Trying to Enable Hardening for Plugin & theme editor

  • Resolved Larso30


    Hi I”m trying to enable the Plugin and Theme Editor, when I hit the revert hardening it doesn’t change back to Harden. I need to activate the Plugin editor so I can install plugins. I am Administrator of the site as well. Any help greatly appreciated

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Larso30,

    The file editor is disabled by the plugin by adding the following to site’s wp-config.php file:


    When you revert hardening and allow the editor that line is removed.

    I would recommend checking the wp-config.php file permissions. Or making the edit manually.

    Kind regards,


    I am having the same issue on a number of sites, and these are sites where I have never enabled hardening of the Plugin and Theme Editor.

    When I go to revert hardening I get the following error message:

    Sucuri: The theme and plugin editor are not disabled from the configuration file.

    The line above you said to look for in the wp-config.php file does not exist. I have tried adding that line of code but set to FALSE but still the editor does not appear.

    Any suggestions?!



    Hi Stevie77n,

    The editor is enabled by default. You can disable it with the Sucuri plugin or by manually adding this line to wp-config.php

    define(‘DISALLOW_FILE_EDIT’, true);

    You shouldn’t need to set that to false, just comment out or delete the line to enable the editor.


    Hi Eve,

    Thanks for your reply.

    I don’t have that line in my wp-config.php file, yet the editor is still disabled and not shown under the WordPress menu Appearance.

    I have also tried adding the line:

    define(‘DISALLOW_FILE_EDIT’, false);

    to wp-config.php but still the editor does not appear. The htaccess file is writable with permissions of 644.

    Would you have any other suggestions on how to get the editor back?

    Just managed to fix this.

    I looked at another site were the editor was working ok with Sucuri installed and saw that the line:

    /** ESucuri Theme Editor */
    define( ‘DISALLOW_FILE_EDIT’, false);

    was added at the top of wp-config.php rather than at the bottom.

    Adding this code to the top of the wp-config.php file, rather than the bottom, solved the issue.


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Trying to Enable Hardening for Plugin & theme editor’ is closed to new replies.