GoogleChromeLabs / pwa-wp

WordPress feature plugin to bring Progressive Web Apps (PWA) to Core
https://wordpress.org/plugins/pwa/
GNU General Public License v2.0
609 stars 97 forks source link

How to install? #245

Closed Mululu closed 4 years ago

Mululu commented 4 years ago

Hello,

Unfortunately the plugin does not work after I have installed it in WordPress.

What do I have to do to make this work?

Thanks a lot!

westonruter commented 4 years ago

Do you mean the service worker is still operating even though you have uninstalled the plugin?

Mululu commented 4 years ago

No, I installed the plugin from the Wordpress plugin directory. Unfortunately, the PWA does not work. Tested with my smartphone and Google Lighthouse.

Is there a howto somewhere how to install this app?

Thanks a lot!

westonruter commented 4 years ago

Oh, I misread your comment.

Here is an example plugin that you can add that configures the PWA plugin to enable a network-first caching strategy which will allow previously-visited pages to be served offline: https://gist.github.com/westonruter/1a63d052beb579842461f6ad837715fb

Mululu commented 4 years ago

OK thanks, but why doesn't the PWA plugin work from the start or is it not intended for this? There are no settings anywhere.

Where do I have to insert your code or the file.

Lighthouse currently says that. Lighthouse

westonruter commented 4 years ago

@Mululu The PWA plugin is intended to provide tools for you to create your own tailored experience. It's primarily a set of APIs. We're still investigating what makes sense to bake-in as a default. Having a network-first caching strategy as shown in the above Gist is something that increasingly seems to make sense to be a default.

The code is just a plugin. Add it to your wp-content/plugins directory and activate in the WP Admin.

Mululu commented 4 years ago

OK thanks for the clarification. I was amazed that it didn't work right away. I've used the Avada theme so far. I installed the plugin there and it worked immediately. In Lighthouse almost everything was green. Now I want to switch to Elementor, for testing I installed the plugin but it doesn't work as expected. Yes there are other PWA plugins but they don't work either. I would also like to use this plugin because I have had good experience so far and because Google is a co-developer. I still don't quite understand why the whole thing doesn't work now. The code in Wordpress would probably have to be adjusted. Maybe there will be a howto in the future. Thank you very much @westonruter

westonruter commented 4 years ago

Yes, we need to provide more samples for how to leverage the plugin, and we need to include more use cases built into the plugin.

Mululu commented 4 years ago

Hi there,

unfortunately the plugin still doesn't work in context. Lighthouse says there is no manifest installed etc.

Where, in which file, do I have to insert something that the plugin works and Lighthouse shows everything green?

I hope I'm not too annoying.

Thank you very much!

EDIT: On another page with Avada Theme the plugin works without problems -> www.feuerwehr-gebirge.de

westonruter commented 4 years ago

@Mululu What is the URL for the site that you are testing?