Support » Plugin: Progressive WordPress (PWA) » WordPress Subfolder Install – PWA Manifest Site icon error and add button

  • Hi,
    I have one site which has wordpress in the root. In that if I activate PWA then the Add to Home button shows up correctly. But in another where I have the site under a sub folder
    for example like this : pwasitedemo{.url}/subfolder/ it does not show the Add to Home button.
    Also I find errors in the pwp-manifest json as the Site Icon URL is also wrong.

    When a site is under a sub folder the home page url would be like this


    but the wp-content would be under a sub folder.

    Right now it shows the folder link like

    while the URL should actually be

    Also any reason why the Add to Homepage would not work when wordpress is installed under a subfolder?

    Any fixes to this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter cmsnext


    Hi @nico_martin. Any help?

    Plugin Author Nico Martin


    Hi @cmsnext

    What’s the homeurl of your site (as declared under Settings -> General)? Is it pwasitedemo{.url}/subfolder/ or pwasitedemo{.url}/?

    Kind regards,

    Thread Starter cmsnext


    Hi @nico_martin

    WordPress Address (URL) pwasitedemo{.url}/subfolder/
    Site Address (URL) pwasitedemo{.url}/

    Plugin Author Nico Martin


    Is there a reason why your site address is not the same as your home address? Could you update the siteadress to pwasitedemo{.url}/subfolder/ as well?

    Thread Starter cmsnext


    Hi @nico_martin. Yes WordPress allows subfolder installation so that wordpress url and main site url are different. Kindly check this –

    In a way we have URL as pwasitedemo{.url} but wordpress is actually inside the subfolder pwasitedemo{.url}/subfolder/

    Thread Starter cmsnext


    Hi @nico_martin – any update on this? Because your plugin is the most easiest to use to waiting for a fix. Because even Add to Home does not work I think mostly due to this error. Thanks

    Thread Starter cmsnext


    Hi @nico_martin as there was no response from you I did some code digging and find this

    in Classes/class-manifest.php

    line 124

    $manifest['icons'][] = [
    'src'   => $new_image[0],

    Changing this to

    $manifest['icons'][] = [
    					'src'   => get_site_icon_url($size),

    This fixes the issue

    Now even add to home page shows up successfully.

    I am not sure if the code I used is correct but that seems to fix the issue.

    So can you confirm if its right?

    Had an issue with the whole document root (/home/user/domains/ was included in the manifest json file.

    The above fix from @cmsnext fixed the issue.

    Hi @nico_martin, any update on this ? I’m having the same issue, and using @cmsnext ‘s (great) fix, as we use Composer to version and deploy our plugins, is not a good solution for us as it would be lost at each update.
    Moreover there is no easy way to get around this flaw with hooks, unfortunately, so we are kind of stuck here.

    This plugin is amazing, and supporting a subfolder installation (which is not exactly an exotic setup) would make it perfect !

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress Subfolder Install – PWA Manifest Site icon error and add button’ is closed to new replies.