Joy
(@joyously)
Yes, WP2Static is a SSG. And since they removed that plugin from the repository, we don’t support it here. I’m not sure I understand the difference between WP2Static and the plugin they had here: https://wordpress.org/plugins/static-html-output-plugin/ which they have in a different GitHub repository. (Maybe that’s the original name, and they are moving forward in a new repo with WP2Static name.)
The trick with making a static site with WP is you need two separate places: one for the PHP to run and the other to serve the static output. (so where does your domain name point?)
If you have your host for the PHP, you might as well simply serve the result as normal, since it is still online and vulnerable to hacks. So it makes sense to use WP locally, and deploy to Netlify (usually via GitHub). Or use one of the services to host WP behind a firewall, and deploy for you. (Sitesauce, Shifter, Strattic)
Running it as headless still requires a PHP backend, so it’s no faster or more secure than normal, although you can host on a service that does this for you.
Consider the interactive parts of your site: comments, forms, search, login, ecommerce before you switch. You have to remove all of that (or find static substitutes) before you deploy what WP2Static generates. I found a plugin Remove WP Overhead recently, which helps with some of the stuff in the <head> section.
I’ve been working on a plugin for generating a static search index for the Lunr search since I don’t want a branded external search on my client’s site.
Is it feasible to move the WP site to an in-house computer. Then use an SSG to create static files and Netlify to deploy?
Joy
(@joyously)
it makes sense to use WP locally, and deploy to Netlify (usually via GitHub). Or use one of the services to host WP behind a firewall, and deploy for you. (Sitesauce, Shifter, Strattic)
Does “in-house computer” equate to “use WP locally”? If so, yes, that’s what I was referring to. (install WP on your computer)
Thanks. If I deploy WP locally, does the domain name point to my computer somehow or to Netlify? In this scenario, would Netlify get its updates from the localhost and not from Github? Will users be able to use the interactive features of the site (sign-in, forums, etc.)?
-
This reply was modified 5 years, 7 months ago by
Engine44.
Joy
(@joyously)
No, by putting WP on your computer, you are removing it from its online presence. You would have the only access to it. You would make whatever changes you want locally, and then run WP2Static to generate the static files that are then deployed to GitHub, where Netlify picks them up. Your domain name would point to where Netlify tells you to point it, to serve the static files from their CDN.
The interactive features of WP have to be replaced with Javascript interacting with external APIs, for things like sign-in (MemberSpace, MemberStack), contact forms (FormKeep, or just use a mailto link), searches (Algolia or Google), forums (maybe Discourse).
A static site is not a good fit for all. It just depends on what interactive things your site does.
Thanks. Do hou know of an API for the creation and management of groups?
Joy
(@joyously)
I assume you mean groups of people. If you are doing some sort of membership site, it’s not a good match for static.
Take a look at https://www.tnd.dev/ for resources.
https://jamstackfns.com/ also has some.
You can write interfaces yourself, see https://functions.netlify.com/