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.comis 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.- Do not add OneSignal JavaScript
initcode to your site. - Do not use the Custom Code Setup with the WordPress plugin. If you need to customize the
initmethod, uninstall the plugin and add the code and Service Worker manually.
Send notification when post published
When you publish a post, page, or custom post type, OneSignal can automatically send a notification to your subscribers.
OneSignal Push Notifications metabox—drag to reposition if needed
- Check the metaboxes to the right and bottom of the editor. You can drag and drop as needed.
- Check the Screen Options at the top of the editor to make sure the OneSignal Push Notifications metabox is checked.

Screen Options showing OneSignal Push Notifications metabox checked
- Check if using a Custom Post Type. This is usually found in the URL as
post_type=your_custom_type. If so, add the custom post type to the Custom Post Types field in the OneSignal WordPress plugin settings.

Example where to find the custom post type name
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
null or an empty value. If you see OneSignal is not defined, wait a few seconds and try again, or fix Console errors from Common OneSignal console errors first—the SDK may still be loading via the deferred loader.
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).
your-site.com and match your actual plugin folder name if it differs from the default):
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. Paths below assume the plugin directory isonesignal-free-web-push-notifications; adjust if your install uses a different folder name.
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
WP Engine can rewrite plugin URLs through its CDN. HTML Post-Processing rules are environment-specific; the snippet below is an example only—confirm paths with WP Engine support or your User Portal before applying. In the WP Engine plugin > General Settings > HTML Post-Processing, you may need rules similar to the following. Replace every placeholder with values from your site and WP Engine CDN hostname: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 Hummingbird > Asset Optimization. Under JavaScript (and CSS if OneSignal assets appear there), locate files whose URLs containonesignal-free-web-push-notifications or OneSignalSDK. Exclude them from minification/combination/defer, or switch those assets to Don’t load optimization so the plugin does not rewrite or delay them.

Hummingbird Pro Asset Optimization.
Sucuri
Follow Sucuri’s Whitelist guide to allow OneSignal files.Solid Security (formerly iThemes Security)
Disable Disable PHP in Plugins (or equivalent) under System Tweaks soOneSignalSDKWorker.js.php can run.

Disable blocking PHP execution in plugins for OneSignal.
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
Require all denied / Require all granted instead of Order allow,deny. Ask your host or adjust the rules to match your server’s Apache version.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.