2026年11月14日
2026年11月14日
Set Up WordPress Push Notifications with the OneSignal Plugin
This article is a localized edition of the Japanese original. Read the Japanese original
Browser push notifications (web push) let you send short messages about new posts and announcements to the computers and phones of readers who have allowed notifications. Readers do not have to register an email address, and tapping the notification opens the post, so it gives readers who visited once a reason to come back.
WordPress itself cannot send push notifications, so you combine a notification delivery service with a plugin. This article uses the official plugin of the OneSignal service, "OneSignal – Web Push Notifications" (the latest version as of October 2026 is in the 3.9 series), as the example and covers everything from setup to day-to-day use. The steps follow OneSignal's official documentation.
What to check before you start
- The site must be served over HTTPS: web push only works on HTTPS sites. If yours is not, move to HTTPS first (How to move WordPress to HTTPS).
- A OneSignal account: there is a free plan. Plan limits and prices can change, so check OneSignal's pricing page.
- Plugin requirements: the plugin page on WordPress.org lists WordPress 6.0 or later and PHP 7.4 or later.
- Readers on iPhone and iPad: in Safari on iOS and iPadOS, readers can receive web push only if they add the site to the Home Screen and open it from there (iOS 16.4 and later). In the normal browser view, they cannot allow notifications.
1. Prepare the OneSignal dashboard
Log in to OneSignal, create an app for the site you will send notifications from, and then configure the following.
- Open "Settings" → "Push & In-App" → "Web", choose "WordPress Plugin or Website Builder" as the integration type, and select WordPress.
- Enter "Site Name", "Site URL", "Default Icon URL" (the URL of the icon shown in notifications) and so on, then save. Make "Site URL" exactly the same as your real site URL (a difference in
https://orwwwalso counts as a mismatch). - Configure the prompt that asks readers for permission (the "Push Slide Prompt"). It is enabled by default, and you can change when it appears and what it says.
- If you like, set up a welcome notification that is sent right after a reader allows notifications, then save.
- Under "Settings" → "Keys & IDs", note the App ID. On the same screen, create an API key and note its value. The API key value is shown only once, when it is created, so store it in a password manager or similar.
2. Install and configure the plugin in WordPress
- In the admin screen, go to "Plugins" → "Add Plugin", search for
OneSignal, then install and activate "OneSignal – Web Push Notifications". - Open the settings screen under the "OneSignal" menu that the plugin adds to the admin screen.
- Enter the App ID and API key you noted earlier and save.
The plugin provides the service worker needed to receive permission, so you do not have to upload any file to the server.
When setup is done, open the site while logged out (or in a private window) and check that the permission prompt appears, and that after you allow notifications you are counted as a subscriber in the OneSignal dashboard.
3. Send notifications automatically when you publish
On the plugin's settings screen you can decide how sending works, for example:
| Setting | What it does |
|---|---|
| Auto-send on publish/update | Whether to send a notification when a post or page is published or updated. You can also choose whether posts published by other plugins are included |
| Custom post types | Adds post types created by other plugins to the notification targets |
| URL parameters | Adds analytics parameters (such as utm_source) to the URL opened from the notification |
A OneSignal box is also added to the post edit screen, where for each post you can choose "whether to send a notification when it is published or updated", "whether to customize the notification text" and "which segment (group of readers) to send to". Segments are created in the OneSignal dashboard under "Audience" → "Segments".
Make sure notifications do not go out on every update. If a notification is sent when you update a post to fix a typo, readers get notified about the same post again and again. It is safest to send only when you publish a new post and to turn off sending in the edit screen when you update.
4. Tune the permission prompt
The permission prompt is configured in the OneSignal dashboard, not in the plugin. Rather than showing the browser's own permission dialog right away, it is easier for readers to decide if you first show an explanation such as "Get notified about new posts" and then ask for permission. OneSignal's "Push Slide Prompt" plays the role of that explanation.
- Showing it after a reader has viewed a few pages or stayed for a while, rather than immediately on the first visit, narrows it to readers who are interested in your content.
- If a reader chooses "Block" in the browser's permission dialog, the site cannot ask again unless the reader changes the browser settings themselves. Showing an explanation first also helps you avoid wasting that one chance.
- To keep the prompt off certain pages, the official documentation describes turning off the automatic prompt (Auto Prompt) in the dashboard and showing the prompt with JavaScript on the pages where you want it.
5. Do not send too much, and measure the results
- Decide what to send and how often: too many notifications lead readers to block them or unsubscribe. Decide in advance what you will send, such as new posts and important announcements.
- Watch the time of day: notifications late at night or early in the morning tend to feel intrusive.
- Check the numbers: in the OneSignal dashboard, check how many notifications were delivered and clicked. If you add URL parameters, you can separate visits that came from notifications in analytics tools such as Google Analytics.
6. Update your privacy policy
Information about readers who allow push notifications (such as the identifier used as the notification address) is sent to and stored by OneSignal, an external service. Add the external services you use and their purpose to your privacy policy (How to create a privacy policy page in WordPress).
When it does not work
- The permission prompt does not appear: check that "Site URL" in the dashboard matches the real URL, that the site uses HTTPS, and that you have not already allowed or blocked notifications in that browser. If you use a caching plugin, clear the cache before checking.
- No notification is sent when you publish: check that auto-send is enabled in the plugin settings, that sending is not turned off in the post edit screen, and that the App ID and API key are correct.
- You updated from the older 2.x series: check your settings following the migration guidance in the official documentation, then tick "Migration Completed" on the plugin's settings screen and save.
Summary
- Web push works on HTTPS sites; in WordPress you combine a delivery service such as OneSignal with a plugin
- In the OneSignal dashboard, make "Site URL" match the real URL, note the App ID and API key, and enter them in the plugin
- Limit auto-send to publishing new posts so readers are not notified on every update
- Configure the permission prompt in the dashboard, and show an explanation before asking for permission
- Decide on frequency and timing, check deliveries and clicks, and update your privacy policy
Related articles
- Notifying subscribers about new posts with web notifications (Notifications API and Push API) in WordPress
- How to win readers with an email newsletter in WordPress
- How to move WordPress to HTTPS
Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)