[Defender Pro] One Signal push notifications plugin conflict with Defender Pro

Hello!
I’d like to add push notifications to my site using the One Signal plugin, but I’m having an issue with Defender Pro and the setting to prevent PHP execution.

I found a reference in the One Signal documentation to Defender here:
https://documentation.onesignal.com/docs/troubleshooting-wordpress-web-push#section-403-404-service-worker-errors-https-sites-only

But I’m not able to turn off the PHP execution security tweak in Defender Pro.

One Signal support told me
“Some of the files our WordPress plugin automatically includes in your page is not publicly accessible due to what appears to be your server’s settings limiting access to these files:

yoursite.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php
yoursite.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKUpdaterWorker.js.php

Can you help me add an exception for these files? I have Defender network enabled on a multisite setup (GoDaddy hosted), but One Signal is only activated on the main site. I wasn’t sure the correct grammar to use in the exceptions box in Defender, or in the HTAccess file.

Thank you!

  • Kasia Swiderska
    • Support nomad

    Hello Missa ,

    To exclude files from the Prevent PHP execution, you will need to provide a full path to the file in the exclusion field.
    So:

    FULL/PATH/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php

    for example:

    /var/www/public_html/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php

    If you are not sure about the path, you can use FTP app and connect to the site and navigate to this file, it will then show you the whole path there.

    kind regards,
    Kasia