How to Prevent PHP execution?

Hello,

I wonder about what exactly to add in Defender field seen under
"Prevent PHP execution
Input the file paths to ignore in the /wp-content directory (each in a new line). The file index.php is not allowed"

and how to determine which directory I should add here?

Any help or suggestion is welcomed :wink:

Thank you and kind regards,
Sascha

  • Huberson

    Hello Sascha,
    Basically, Defender prevent execution of PHP scripts by adding an htaccess file with some rules in your wp-content directory.
    You can add any directory/file you want to allow script execution for in the field by specifying the path with extension like so:

    and how to determine which directory I should add here?

    You can leave that empty. Unless you have a specific need to allow script execution for a given directory.

    Best,
    Huberson

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.