WP Defende Prevent PHP Execution

Hi, One of the settings as part of the defender plugin is to prevent php execution, this basically adds a .htaccess file that prevent execution of php

The above feature actually prevents a plugin from functioning properly like OneSignalPush notitications.

Is there a way we can enable the prevention of php execution but also set up exceptions?

  • Sajid

    Hello srikanth balakumar,
    Hope you are doing good today :slight_smile:

    Yes, you can setup some exceptions for specific files that are required to run. For this purpose, you have to find the name of those file(s) and add the following code in .htaccess file.

    For single file:

    <Files filename.php>
    Allow from all
    </Files>

    For multiple files:

    <Files filename.php|filename2.php|filename3.php>
    Allow from all
    </Files>

    Make sure you replace the placeholder file names like "filename.php" with actual file name that you want to allow.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.