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.
- 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
- Add your site in the Pusharoo dashboard and copy your site key (
pk_…). - Upload
sw.jsto the folder that containswp-config.php, using your host’s File Manager or SFTP. Check thathttps://yoursite.com/sw.jsopens. - Add the snippet before
</head>:Block themes: Appearance → Editor → Patterns/Template parts → Header → Custom HTML block. Classic themes: a “headers and footers” plugin or your child theme’s<script src="https://pusharoo.com/sdk/pusharoo.js" data-site="pk_your_site_key" async></script>header.php. - Tell your caching plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache): exclude
/sw.jsfrom caching and JS minify/combine, and excludepusharoo.jsfrom “delay JavaScript”. - 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.
Keep reading
Push notifications for online stores
Flash sales, back-in-stock, price drops and retargeting — without paying for ads.
Web push on iPhone and iPad, explained honestly
The Home Screen rule, the manifest you need, and how to guide iPhone visitors without friction.
The push opt-in prompt, done right
Two-step soft prompts, timing rules, copy that converts, and what never to do on page load.
Web push on Shopify: what works, honestly
Why Shopify blocks a root sw.js, and the workarounds that genuinely work.
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.