Overview
This guide covers how to setup and configure OneSignal WordPress Web Push Plugin v3+.For the older version 2.x.x WordPress documentation, see WordPress Legacy plugin.
What’s New in Version 3+
This release marks a significant upgrade by streamlining the setup and configuration process. With Version 3+, you can handle all your prompt settings in one place—the OneSignal Dashboard.- 🚀 SDK Upgrade: Updates OneSignal Web SDK from version 15 to 16
- 💬 Dashboard Prompts: Configure all permission prompts directly in the OneSignal dashboard—no custom code required
- ⏩ One-Click Publishing: Check “Send notification when post is published” to automatically send push notifications
- 🧑🤝🧑 Audience Targeting: Choose which segments receive notifications for each post
- 📲 Mobile App Integration: Send to mobile app subscribers with optional deep linking
For the older version 2.x.x WordPress docs, see WordPress Legacy plugin.
Setup
Before you begin, ensure you have:- OneSignal account (free to create)
- WordPress admin access to install and configure plugins
- HTTPS-enabled website (required for web push notifications)
1. Configure WordPress in OneSignal Dashboard
Navigate to Settings > Push & In-App > Web > WordPress Plugin or Website Builder
Site setup
- Site Name: The name of your site and default notification title.
- Site URL: Must match your WordPress site’s exact URL (follow Same-origin policy)
- Auto Resubscribe: Enable this to automatically resubscribe users who clear their browser data when they return to your site (no new permission prompt required)
- Default Icon URL: Square
256x256pxPNG or JPG file for notifications and prompts – MacOS Safari will not show a notification prompt without an Icon.

Testing locally? See Local Testing Guide for localhost development
Permission prompts
Set up your permission prompts for Push, Email, and/or SMS. The Push Slide Prompt is enabled by default, but you can customize or add additional prompts.Pro Tip: Start with simple prompts and gradually add complexity. You can
modify all prompt settings anytime through the OneSignal dashboard. Explore
all available options in Web permission prompts.
- Basic Prompt Setup
- Advanced: Category-Based Segmentation
Welcome notification
Set up an immediate notification sent after users first subscribe. This:- Thanks users for subscribing
- Demonstrates how notifications appear
- Increases engagement and reduces unsubscribes
2. Configure WordPress plugin
After saving your dashboard configuration, you’ll see your App ID and API Key. Copy these values to your WordPress plugin:
Don’t see an API Key? Follow our Keys & IDs guide to
create one.

Advanced settings
Configure additional plugin options based on your needs:
- Custom Post Types: Add post types from plugins to enable notification options
- Automatically send notifications when a post is published: Automatically checks notification box when publishing posts so notifications are sent without having to check the box manually
- Automatically send notifications when a post is updated: Automatically checks notification box when updating posts so notifications are sent without having to check the box manually
- Automatically send notifications when a page is published: Automatically checks notification box when publishing pages so notifications are sent without having to check the box manually
- Automatically send notifications when a page is updated: Automatically checks notification box when updating pages so notifications are sent without having to check the box manually
- Automatically send a push notification when I publish a post from 3rd party plugins: Auto-send notifications from external publishing plugins
- Mobile App Integration: Send notifications to your mobile app subscribers using the same OneSignal App ID
3. Complete migration (Upgrading Users Only)
New installations can skip this step. If you’re upgrading from v2+, follow
along…

Setup complete! Click Save Settings to finish plugin configuration.
Testing your setup
- Initial Test
- Verify Subscription
- Send Test Message
- Visit your website (avoid incognito/private browsing—users cannot subscribe in these modes) 2. Look for the slidedown prompt you configured

- Click the subscribe button (labeled as “Subscribe” in this example)
- Accept the browser permission when prompted

- Check for welcome notification (if configured)

Success! Your WordPress site is now configured for web push notifications.
Users will start appearing in your Subscriptions as they subscribe.
- Review Web permission prompts for advanced customization
- Explore Channel setup for email and SMS integration
- Set up segmentation strategies for targeted messaging
Having Issues? Check our WordPress troubleshooting
guide for common solutions.
Publishing notifications
When you schedule a post to be published, OneSignal will also schedule a push notification to be sent to your subscribers at the scheduled time. If you reschedule the post, the push notification will be canceled and a new push will be scheduled for the new time. You can view your scheduled and cancelled notifications in the OneSignal dashboard under Delivery > Scheduled Messages. See Push message reports for more details.Basic post notifications
When creating or editing a WordPress post, locate the OneSignal Push Notifications metabox (usually at the bottom or sidebar of the post editor).
- Check “Send notification when post is published or updated”
- Uncheck to skip sending a notification for that post
Audience targeting
Send to all subscribers (default)
By default, notifications go to all push subscribers.Send to specific segments
Target specific audiences using segments you create in OneSignal Dashboard > Audience > Segments. If you set up categories in Step 3, create corresponding segments:- Go to Audience > Segments in your OneSignal dashboard
- Create segments using your tag keys, eg:
- News Segment: Tag
newsis1 - Deals Segment: Tag
dealsis1
- News Segment: Tag

- After creating segments, refresh your WordPress post editor
- Select your target segment from the dropdown

Advanced Segmentation: Create segments based on user behavior, location,
device type, and more. Tags provide the most
flexibility for custom user data and personalization.
Customizing notification content
Default behavior
- Title: Uses your WordPress site title (Settings > General)
- Message: Uses the post title
- Image: Uses the post’s featured image (if set)
- URL: Links to the published post
Custom content
Check “Customize notification content” to override defaults:

Add a Custom Post Type to OneSignal WordPress Plugin
Find your custom post type name
Look at your browser’s address bar when creating a new post. The URL will look like:post_type parameter (for example, your_custom_type) is the exact name you’ll need to add in the OneSignal plugin’s settings.
Add to OneSignal settings
- Go to OneSignal > Settings in WordPress admin
- In Advanced Settings, add your custom post type names to the Custom Post Types field
- Save settings
Common examples:
product (WooCommerce), tribe_events (Events
Calendar), portfolioMobile app integration
If you have a mobile app using the same OneSignal App ID:- Enable “Send notification to Mobile app subscribers” in plugin settings
- In the post metabox, add a Mobile URL for deep linking
- Mobile users will be directed to your app instead of the web browser
Ready to Scale: Explore advanced push strategies and
automated journeys for sophisticated notification
campaigns.
FAQ
How do I disable prompts on specific pages?
How do I disable prompts on specific pages?
Note: This method only works with slidedown and native permission prompts, not bell or custom link prompts.
- In your OneSignal dashboard, go to Settings > Push & In-App > Web Settings
- Select your prompt from the Permission Prompt Setup table
- Uncheck Auto Prompt and click Done

- Scroll down, click Save, then Finish
- Add custom JavaScript code to specific pages where you want prompts to appear
Can I send notifications to mobile app subscribers?
Can I send notifications to mobile app subscribers?
Yes! If your mobile app uses the same OneSignal App ID:
- Enable “Send notification to Mobile app subscribers” in the WordPress plugin settings
- When publishing posts, use the Mobile URL field in the OneSignal metabox to specify deep links
- Without a custom Mobile URL, users will be directed to your website
How do I send email or SMS from WordPress?
How do I send email or SMS from WordPress?
The WordPress plugin currently supports push notifications only. For email and SMS:
- Email: Follow our Email setup guide, then use Email messaging tools
- SMS: Follow our SMS setup guide, then use SMS messaging tools
Why aren't my prompts working after migration?
Why aren't my prompts working after migration?
Caching Issues: WordPress caching may delay migration changes.Solution:Step 1: Right-click on your website and select InspectStep 2: Go to the Network tabStep 3: Check “Disable cache”
Step 4: Refresh your website to see current configurationStep 5: Clear your WordPress cache plugin settings if applicable

What does `A bad HTTP response code (404)` error mean?
What does `A bad HTTP response code (404)` error mean?
This error indicates incomplete migration:
Solution:

- Ensure you’ve saved your OneSignal dashboard configuration
- In WordPress, click “Migration Completed” in the plugin settings
- Click Save Settings to finalize the upgrade
Can I modify the notification parameters before sending?
Can I modify the notification parameters before sending?
Yes, you can use the
onesignal_send_notification filter.Place custom PHP code in
wp-content/mu-plugins/onesignal-custom.php. This
ensures its loads correctly and prevents it from being overwritten by updates.


