Web push notifications are a great way for your WordPress blog readers to keep up to date with your latest posts, blog updates and other events. This tutorial will guide you on how to quickly enable these web push notifications on WordPress by using the OneSignal plugin. You can check out the official OneSignal plugin summary at the WordPress plugin database.
Table of Contents
What you’ll need
Before you begin this guide you’ll need the following:
- Access to the WordPress administration area.
- HTTPS/SSL is highly recommended to be enabled on WordPress before starting this tutorial. Conveniently, Hostinger has a tutorial for you here.
Step 1 — Installing the OneSignal Push plugin
Log in to your WordPress administration area and select the Plugins section, then click Add new:
Use the search box on the right side to find the OneSignal plugin:
WordPress will find the plugin, simply click Install Now to install the plugin to WordPress:
Once installation completes, click the Activate button, which is now in the place of where the Install Now button was, to activate the plugin. It will then be added to your WordPress interface. The plugin is now installed and we can move on to configuring it.
Step 2 — Configuring the OneSignal plugin
Open the plugin’s interface screen by selecting it in your WordPress dashboard:
You will be prompted by the installation and configuration tutorial of OneSignal.
The OneSignal developers have created a thorough and easy to follow installation guide there, including screenshots. Simply click on Chrome & Firefox push to begin the tutorial. Follow the tutorial, which involves creating a OneSignal account and selecting a few options, which are explained in detail in the installation tutorial. The two main things that you will need are the App ID and REST API Key, which you need to fill into the two fields inside the Configuration tab of the OneSignal plugin. Do not worry, this is also explained in-depth during OneSignal’s tutorial:
Once these settings are filled in, simply click Save at the bottom of the configuration page and web push notifications will be enabled for your WordPress website.
You can now visit your WordPress website and you will see the OneSignal bell at the bottom right corner of your page:
Clicking on this bell will prompt the user if he wants to receive notifications from your website:
If a user accepts this prompt, he will then be subscribed to your notifications and will see them on his desktop.
Of course, the bell icon is just the default notification option. Check out the Configuration page of the plugin for a plethora of customization options on how your users receive notifications, their content, prompt timing, and much, much more.
You learned on how to enable web push notifications for WordPress website by using OneSignal’s excellent plugin.
Additional resources that you may find useful: