Progressive Web App (PWA) Setup Using Simple Code and Blocksy theme content block
This guide shows how to make your website installable like an app using a simple PWA setup. No external services are used. Every step below clearly tells you where to create files and where to paste code.
Step 1 — Create manifest.json
Where: File Manager or Hosting Panel → open public_html (your WordPress root folder)
Action: Create a new file named manifest.json
Paste this inside the file:
Step 2 — Upload App Icons
Where: WordPress Dashboard → Media → Add New
Action:
- Upload a 192×192 PNG icon
- Upload a 512×512 PNG icon
- Click each image and copy its URL
- Replace paths in manifest.json
Example:
Step 3 — Add Manifest to WordPress
Where: WordPress → Appearance → Theme File Editor → open functions.php
Scroll to the very bottom of the file
Paste this code at the bottom:
Step 4 — Create Service Worker (sw.js)
Where: File Manager → public_html
Action: Create a new file named sw.js
Paste this inside:
Step 5 — Register Service Worker
Where: functions.php (same file as Step 3)
Scroll to the bottom again
Paste this below previous code: