• Hi,

    I am working on a project and I needed to have relative path URL so as to make netlify enable its CDN for the site’s assets.

    In your plugin even when I choose the relative path option and no matter what I type in the root path field, the STATIC output generated by wp2static doesn’t have relative URLs.

    I have tried it with Pantheon Host, hosted demo account on Google cloud and tried to sync to Netlify, tried Manual Upload >> Zip, Manual Upload >> Save to sub-dir.

    No matter what I choose, the relative path is not generated.

    As of now, I have enabled “Simply static” and its relative feature is working.

    Can you please check this feature on your system and if you succeed can you please share the steps you followed.

    Kindly, help me with this issue.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Leon Stafford

    (@leonstafford)

    Hi @themeswarrior,

    I’ll be doing some deep-diving into the relative link settings soon and adding more automated tests.

    In the meantime, can you try setting the full https://mysite.netlify.com or https://mysite.com and deploy it to Netlify, either via ZIP (deselect Offline option) or using the Netlify deploy method.

    Disable the checkbox for relative URLs and empty the Base HREF field.

    That allows for full site serving via Netlify, so you’ll get the benefits of their CDN.

    If using the Netlify deploy method, you have more control over the _headers and _redirects files.

    If you’re not on version 6.4 yet, please upgrade to that.

    Also, it may help to use full URLs in your theme files, ie don’t use /link.jpg or link.jpg but {WP_SITE_URL}/link.jpg

    As this is the more common case the plugin has been tested with.

    You may also try to troubleshoot by switching to a default theme, like TwentySeventeen and seeing if you get the expected links out from that.

    Plugin Author Leon Stafford

    (@leonstafford)

    Also, if you can create a clearly reproducible issue on the project’s GitHub page, that will speed up a solution:

    https://github.com/leonstafford/wp2static/issues

    I’ll need:

    – example original source code from your WP dev site (INPUT)
    – example of how the static output incorrectly generates the same source code (OUTPUT)
    – environmental settings (run an export in Advanced > Debug Mode from version 6.4 and include the relative parts, making sure no sensitive information is shared)

    Cheers,

    Leon

    Thread Starter Themeswarrior

    (@themeswarrior)

    Hi,

    Thanks for the quick reply.

    I followed your instructions. I am using the latest wp2static with latest WordPress and I am testing your plugin on the server with following specs:

    Ram: 6GB
    Processor: 4 Cores
    Ubuntu: 18.04 LTS
    Server: Nginx with FastCGI Cache
    SSL: Letsencrypt

    Please check the images in sequence:
    https://techswami.in/wp-content/uploads/2019/01/1.png

    https://techswami.in/wp-content/uploads/2019/01/2.png

    https://techswami.in/wp-content/uploads/2019/01/3.png

    I did the same with Manual >> Zip ( with offline UNCHECKED ).

    Base URL is present in the head but still, wp2static is not rewriting absolute URLs.

    Thread Starter Themeswarrior

    (@themeswarrior)

    Please close this support thread if this issue cannot be resolved.

    Thanks for your time and effort on building such a great extension.

    Plugin Author Leon Stafford

    (@leonstafford)

    Hi @themeswarrior,

    Fix for the issue in Offline ZIP deploy mode just released today.

    I need to do more testing for other deploy methods using the Relative URLs / Base HREF settings. It may have been improved with this release, but likely still needs a bit more work.

    You can try the Offline ZIP method in 6.6.5 to confirm it’s outputting as expected for you.

    Cheers,

    Leon

    Thread Starter Themeswarrior

    (@themeswarrior)

    Hi,

    Thanks for the update and working on this issue.

    The Manual deploy > Zip > offline is working fine (the relative path is correct ).

    But in any other option relative path is not working.

    And now, Netlify deploys ( automatic ) is not working for me.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Relative URL is not working – Not working with offline, zip, netlify, etc’ is closed to new replies.