You are reading this because you saw something like this in your SuperPWA > Settings > Status
If not, please upgrade to the latest version of SuperPWA.
Starting with SuperPWA 2.0, manifest and service worker can be either dynamic or static. For dynamic files, a custom permalink is required.
No luck? Don’t worry, lets try another option.
If your on NGINX, then you probably have the manifest, but not the service worker. Sometimes both.
This is because, the web server expects to have a static file and doesn’t load WordPress but reports a 404 directly.
Adding the following rewrite rule to the NGINX config file should do the trick. [Thanks]
rewrite ^/superpwa-manifest(-[0-9]+)?.json$ /index.php?superpwa-manifest-$1.json last; rewrite ^/OneSignalSDKWorker.js.php$ /index.php?OneSignalSDKWorker.js-$1.php last; rewrite ^/superpwa-sw(-[0-9]+)?.js$ /index.php?superpwa-sw.js last;
No NGINX? No cookie? No problem.
SuperPWA generates (or attempts to) two files to convert your WordPress website into a Progressive Web App. You guessed it, the manifest and the service worker.
These files are generated in the root folder of your WordPress install (the same folder where wp-config.php is) during plugin activation.
To generate these files, WordPress needs folder permissions to write to the root folder. In your host however, WordPress couldn’t do it because your web host has limited the permissions on this folder.
Note how I keep saying WordPress needs permissions and not SuperPWA? This is because SuperPWA uses the Filesystem API of WordPress to handle file generation and deletion. So if WordPress can do it, then SuperPWA can do it too.
The ideal way to resolve this, is to contact your web host. Tell them what is happening and maybe even point them to this article. They know your server and they will know what to do.
It is a relatively simple fix and should be a very common support request to your web host and they should be able to help you out in no time.
Once the permissions are adjusted, remember to visit SuperPWA > Settings to check the status.