Integrations

SharePush for WordPress

The SharePush WordPress plugin installs the script and the service worker for you, sends a push when you publish, and lets you set up every prompt from wp-admin. Coming soon.

SharePush for WordPress

Coming soon. The plugin is not public yet. Until it is, WordPress sites use the standard setup: the script in the theme and sharepush-sw.js at the domain root, as described in the Quick Start.

The SharePush plugin connects a WordPress site to SharePush without touching the theme or uploading files by hand. An overview is on the WordPress plugin page.

#What it does

  • Installs SharePush for you. It adds the SharePush script to your pages and serves the service worker from your domain root. There's nothing to paste and nothing to upload.
  • Sends a push when you publish. A new post goes out to your subscribers as soon as it is published.
  • Lets you control each post from the editor. Turn the push off for one post, write a custom title and message, or send it again.
  • Sets up the prompts from wp-admin. Texts, colours, theme, language and triggers for the opt-in prompt, plus the Add to Home Screen prompt, the in-app browser notice and the ad-blocker notice.
  • Adds a subscribe button anywhere. Place the [sharepush_subscribe] shortcode in a post, a page or a widget.
  • Sends optional visitor data for segmentation. For logged-in users it can send their user ID and email, and it can also send page data. Both are off unless you turn them on.
  • Shows whether everything works. A status page in wp-admin checks the connection, the service worker and the script on your pages, and the same status appears in SharePush.

#Connecting a site

The plugin needs three values from SharePush:

  • An API token. The WordPress option in Settings → Installation (and in the last step of signup) creates one in one click, limited to that site. You can also create one under Settings → API Tokens & MCP, from your profile menu, top right.
  • The Site ID. It is on the site's overview page in SharePush (Settings → Site Overview) under SDK credentials.
  • The site token. It is next to the Site ID, under SDK credentials. The plugin passes it to the script it adds to your pages.

The WordPress option in Settings → Installation shows all three. Paste them into the plugin's settings, save, and press Test Connection. The plugin reports to SharePush straight away, and the site shows as Connected. From then on, its status is on the site's overview in SharePush (see below).

#Plugin status in SharePush

Settings → Site Overview has a WordPress plugin panel for each site:

Status Meaning
Connected The plugin reported recently and every check passed.
Needs attention A check failed: the service worker is missing or served with the wrong type, the script is missing from your pages, another push plugin is active, or the last push on publish failed. The panel names the problem.
Not reporting No report for two days. The plugin may have been removed, or WP-Cron is not running on the site.
Deactivated The plugin was deactivated in WordPress. New posts are not sent while it is off.
Not installed The plugin has never reported from this site.

The panel also shows the plugin version, with a notice when a newer one is out, along with the WordPress and PHP versions and when the last report arrived.

#Other push plugins

Two push plugins on the same site compete for the service worker at the domain root, and only one can receive pushes. Before you switch to SharePush, deactivate the other push plugin. Your current subscribers belong to that plugin's service worker, so readers subscribe again through the SharePush prompt.