Common setup issues
Verify your OneSignal dashboard setup
Make sure you’ve completed each step in the WordPress setup guide:- Select the WordPress Plugin option when creating your OneSignal app
- Your Site URL must exactly match the browser URL
- For example,
https://example.com
is not the same ashttps://www.example.com
. Use one version consistently. - Only one site origin is supported for push. See Same-origin policy.
- For example,
- Make sure you’ve added at least one permission prompt.
Do not add the OneSignal code manually
The OneSignal WordPress plugin automatically includes the initialization script and Service Worker. ✅ This means:- You should not manually add OneSignal JavaScript code in your theme, footer, or other plugins.
How to troubleshoot your site
Verify plugin is active and open developer tools

Right-click your site, click Inspect, and open the Console tab.
Check the console for OneSignal errors
Check subscription status in the browser

Find your OneSignal Subscription ID in the console.
Verify Subscription ID in OneSignal dashboard

Search your OneSignal dashboard for the Subscription ID.
Send a test push notification
Common OneSignal console errors
SdkInitError: OneSignal: This web push config can only be used on … Your current origin is …

Site URL mismatch error.
PushPermissionNotGrantedError: The user dismissed the permission prompt.
The visitor declined the browser prompt. It won’t appear again until a cooldown period expires.
See Web permission prompts for browser rules or clear site data to retry immediately.
The OneSignal web SDK can only be initialized once.

Duplicate OneSignal initialization error.
Installing service worker failed.. 403 or 404 error

Service Worker file missing (403/404).
https://your-site.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js
If not, see Common plugin support to fix CDN or caching issues.
Common plugin support
CDNs and caching plugins can block OneSignal’s required files. Use these plugin-specific settings:Autoptimize
In Excluded scripts, add:WP Rocket
Under CDN > Exclude Files From CDN, add:LiteSpeed Cache
Under CDN > Exclude Path, add:WP Super Cache
- Go to Settings > WP Super Cache > CDN
- In Exclude if substring, include:
onesignal-free-web-push-notifications
- Click Contents > Delete Cache
WP Engine
In WP Engine plugin > General Settings > HTML Post-Processing, add these, replacingYOURSITEHERE
:
W3 Total Cache
- Go to Performance > CDN
- Under Rejected files, add:

W3 Total Cache exclusion settings.
BunnyCDN
Exclude onesignal in the plugin’s CDN Excluded Paths.
BunnyCDN exclusion example.
CDN Enabler
In Settings > CDN Enabler, add this to “Exclusions”:PressCDN
In Exclude Directories, add:Breeze
In Settings > CDN > Exclude Content, add:
Breeze exclusion example.
Hummingbird Pro
Go to Asset Optimization, find the OneSignal SDK file, and remove it from optimization.
Hummingbird Pro Asset Optimization.
Sucuri
Follow Sucuri’s Whitelist guide to allow OneSignal files.iThemes Security plugin
Disable the “Disable PHP in Plugins” option under System Tweaks.
iThemes PHP plugin setting.
Defender Security plugin
Do not enable “Prevent PHP execution”. Go to Defender Plugin > Security Tweaks and verify the setting is disabled.Example .htaccess for Service Worker access
Server slowdowns or site unreachable after sending notifications
If your server experiences slowdowns or becomes unreachable after sending notifications, it is often due to increased load from notification assets or limited server resources.Do not host your own notification icons
Avoid self-hosting images used in notifications. When you host your own notification icons or images, your server may become overloaded as every recipient’s browser attempts to fetch the image at the same time a notification is sent. To reduce server strain, use image hosting solutions or CDN services optimized for high-concurrency access.Consider upgrading hosting resources
If server issues persist, you may need to:- Upgrade your hosting plan: Higher bandwidth or more powerful hosting may be necessary to handle large-scale notification sends.
- Consult your hosting provider: Your provider can offer insights or optimizations specific to your hosting environment.