The https://linux.uk (and formerly https://linux.co.uk) website has been a dynamic website for many years, for the last 10+ running on Wordpress and before that on a platform called “Plone”. While on the one hand running on a dynamic platform is great for flexibility and ease of use, when it comes to publishing content it’s can be a bit of a liability when in terms of performance and security. Just to give this some context, generating the current home page can take maybe half a second, whereas serving a static copy of the generated page, maybe 1/1000th of a second (or less). Currently the site leans heavily on in-Wordpress caching, and asset caching provided by CloudFlare.
So as of today, whereas the Linux.uk website is generated by Wordpress, it will now be served up as static pages. i.e. there will be a statically generated version of the site which will be updated each time a change is made to the dynamic copy. Net result being a much faster website that’s more difficult to compromise.
So the Wordpress instance can run anywhere with an Internet connection, say a desktop machine (currently running in a container). The MakeMEStatic crawler is either a service or a self-hosted low-power Linux server (also currently running in a container). There are a number of Git providers with free-tier static hosting services (Gitlab, GitHub and CloudFlare to name three) and many (many) Domain registries. So essentially this can all be done, with the exception of the domain name hosting, using free-tier services.
- The MakeMEStatic plugin for Wordpress
- A free account with GitLab
- A working domain name with a domain registrar (linux.uk in this instance)
- Create a repository for your pages in the Gitlab control panel
- Create a Gitlab access token in the Gitlab control panel
- Install the MakeMeStatic plugin from the Wordpress control panel
- Create a new instance in the MakeMEStatic admin panel
- Enter your real domain name
- Enter your Gitlab repository name
- Enter your access token
- Select and “Run” your profile, this will crawl your site storing the resulting static copies in your selected GitLab repository.
- In your GitLab control panel, in Settings → General, change the “Pages” “Visibility” to everyone
- In your GitLab control panel, in Deploy → Pages and add your domain name
- Add the TXT record to your DNS as described by the GitLab control panel
- Re-point your domain to the GitLab URL described by the GitLab control panel
And we’re live! … Ok, so a large site takes a while to crawl on the first pass, but each time you change something and re-run the profile, it will only re-sync the changes, which typically takes seconds. Alternatively you can set an automatic refresh in the profile so it looks for changes and automatically re-runs the profile in the background.
Well, if you’re not into Wordpress, I guess it’s just another content management system. However, there are, depending on who you listen to, somewhere between 32M and 800M Wordpress websites currently active on the Internet. Being able to reduce hosting costs to ~ zero and increase the page delivery speed of these sites by 1000x, seems significant. I’m also looking forward to not getting pinged multiple times every single day because some bad actor has decided to try a denial of service attack, brute force login, hack login, vulnerability exploit etc etc.
If anyone sees a problem with the new static site, please ping me and I’ll take a look. In the meantime if anyone out there has a Wordpress site (or wants one) and would like to give this a try, again please ping me and I’ll try to send you a copy of the plugin. I suspect there maybe many edge-cases I’ve yet to encounter so the more testers the better.
1 post - 1 participant