Hi,
I’m a big fan of Netlify, but have been having an issue where wordpress static exports made with simply static or wp2static (the most popular static generator plugins for Wordpress) seem to export and display perfectly on localhost, but are ruined/distorted once they are uploaded to Netlify in terms of style, menu, and overall display. Any idea how to fix this issue? Thanks.
P.S. Screenshots/links of the proper and improper display should be posted below.
In my experience, none of the WordPress SSG plugins works perfectly. wp2static has about a million options, IIRC, so you might try changing some of your settings. FWIW, when I need to do this I create a custom theme that contains the bare minimum of WordPress code, with placeholders that allow me to mass-update the site with the code I want (typically: headers, footers, navigation, and search). I then use SiteSucker to create an HTML version of the site, and then I use BBEdit includes, which make mass-updates easy … once everything is set up. It’s still a long, iterative process and not much fun. You can see the results of one such site here: https://non-intervention.netlify.com
Thanks. I was able to resolve the issue. Simply replacing all of the exported http:// links to https:// in my text editor seems to have fixed the problem of http content not being displayed properly when uploaded to Netlify.
Sure, my pleasure. Netlify is great, and Simply Static seems to do a good job of creating a clean(for wordpress) static zip export of most wordpress (.org) websites. I believe the switch to https by default for new Netlify deployments was what blocked the old http:// links from displaying or displaying properly, which is why I’m guessing replacing all http:// links with https:// worked so well. The new version of the website has been deployed (startup-systems.com) and seems to be working better than before (no more mixed content warning). Thanks again.
Sure, you can unzip the exported wordpress simply static file on your computer, then open the folder in VSCode (or any other code editor), search and replace all instances of “http://” with “https://”, save the changes and upload/import to netlify.