[Defender] Security Tweaks could not be set

I tried it a few times, but I did not manage to set these two options:
Disable editor files
Prevent PHP execution
After setting and saving, it will return to the state when it is not set.

I have enabled technical support access to this WP.

  • Nastia
    • Support Rock Star

    Hello Roman Sajdik

    Hope you're doing well!

    Looks like Defender can't write rules in the .htaccess file and into the wp-config.php file. This can be due file permissions or due server's firewall. Please do the following changes manually.

    To disable the file editor, please add this line in the wp-config.php file:
    define( 'DISALLOW_FILE_EDIT', true );

    Please make sure to add this line above /* That's all, stop editing! Happy blogging. */

    To Prevent PHP execution, please create a blank file called .htacces and add these lines in there

    <Files *.php>
    deny from all

    Upload this file to /wp-content/uploads/ folder and in /wp-includes/ folder.

    Let us know how it went!

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.