While there are currently nice tools which exist to generate static websites, such as Hugo or Jekyll, there is also WordPress combined with a static site generating plug-in. Thus, WordPress can be used just like Hugo and Jekyll to create a set of static files to be hosted on the web via a service like IPFS or Github pages.
I was forced to investigate this topic thanks to Openshift 3, Redhat’s new upgrade for their web application hosting platform. For the past three years this site and two others have been running on Openshift’s version 2 for basically free (around $2.00 per month for total).
But Redhat decided to discontinue Openshift 2 and in the process switch their target customers away from the little guys. Normal people just wanting to blog cannot afford the $50 per month they want for their paid platform hosting account. And just to download their development kit requires filling out private information like phone number, address, and clicking a promise check-box that you agree you are using their CDK for development only. They are now as frustrating as Oracle, where you can’t download an old Java version without filling out the same identifying information.
Well, I then started to look around for WordPress hosting, expecting that I could get-by paying a small fee each month – around $5 for all sites. Nope — nothing, everywhere that I looked they wanted an exorbitant amount just to host a WordPress application. Namecheap was the best I found, 10 for the first year for three sites and then 50 per year after that. So it then seemed like a no-brainer to create a static site and put it on either IPFS or Github, which would be free. Github does have some restrictions like 1GB storage and I think they even have a monthly bandwidth limit. Since Github is free and since this site is not that popular, it was perfect. IPFS would also be nice, but I have a slow Internet connection and I already host one IPFS site and an Openbazaar storefront. And in any-case, with a static site it is rather simple to transfer or simultaneously host on other services.
I had been thinking for some time about switching to static websites, and now I was being forced to actually make the switch. Sacrificing the comment and search functionality in WordPress for a static site was something I didn’t mind, but for some people this might not be an option. I then spent about a day installing WordPress on my local desktop and transferring all data from my existing sites to the local install. This was near pain-free, although it may be headache for some who are unfamiliar with the internal structure of WordPress or terminal commands. You just have to follow the instructions listed below with the knowledge that online instructions are not always 100% correct due to differences in operating system versions, previously installed programs, etc…
And if you are copying existing WordPress data, be sure to export only the necessary tables correctly and remember to transfer all your previous uploads. Once you have the code on your Github repository, you just need to set the CNAME properties on Github and your domain name provider correctly and you are up and running.