Skip to content
Platforms · 5 min setup

Web push for WordPress and WooCommerce

No heavy plugin, no settings maze. Upload one file, paste one line in your header, tell your caching plugin to leave it alone — done.

Updated By the Pusharoo team
In short
  • Upload sw.js to your WordPress root (the folder with wp-config.php).
  • Paste the snippet before </head> via the Site Editor, a header plugin or your child theme.
  • Exclude /sw.js from caching and minify; exclude pusharoo.js from “delay JavaScript”.
  • Works with WooCommerce and any theme.

Step by step

  1. Add your site in the Pusharoo dashboard and copy your site key (pk_…).
  2. Upload sw.js to the folder that contains wp-config.php, using your host’s File Manager or SFTP. Check that https://yoursite.com/sw.js opens.
  3. Add the snippet before </head>:
    <script src="https://pusharoo.com/sdk/pusharoo.js" data-site="pk_your_site_key" async></script>
    Block themes: Appearance → Editor → Patterns/Template parts → Header → Custom HTML block. Classic themes: a “headers and footers” plugin or your child theme’s header.php.
  4. Tell your caching plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache): exclude /sw.js from caching and JS minify/combine, and exclude pusharoo.js from “delay JavaScript”.
  5. Test in Chrome and on your phone.

iPhone support on WordPress

For iPhone and iPad subscribers, add a small web app manifest and link it in your header — the docs include a copy-paste version. Then set data-ios-hint="true". Background: iOS web push explained.

Already using a PWA or another push plugin?

Only one service worker can control your pages. If a PWA plugin already registers one, import Pusharoo into it rather than adding a second (see existing service worker). If you’re replacing another push plugin, deactivate it first so its worker is removed.

WooCommerce ideas

Back-in-stock alerts, flash sales and new arrivals work especially well. See ecommerce push for examples and UTM tracking.

Questions

Do I need a WordPress plugin for Pusharoo?

No. You upload one file and paste one snippet. A header/footer plugin is a convenient way to paste the snippet, but not required.

Why must sw.js be at the site root?

Browsers only let a service worker control pages within its own path, so a worker at the root can serve your whole site.

Does it work on WordPress.com?

Only on plans that allow uploading files to the site root and adding custom code. Self-hosted WordPress always works.

More in Platforms: WooCommerce push notifications: setup and playbook · Magento 2 push notifications · Web push on Wix, Squarespace and Webflow · All guides

Free for life. No limits.

Unlimited subscribers, campaigns and automations. No badges. About five minutes to install.