I set up this site in 2012 as a Wordpress site. I did so because I was familiar with Wordpress, and teenage me was not familiar enough with web development to try homerolling it. Wordpress was easy enough to setup and had many themes and plugins to choose from, but it also came with many downsides:
- slow and bloated, even when I installed caching plugins since this site is mostly static
- usually had to pay for hosting unless willing to use branded domain (eg myname.wordpress.com)
- constant security issues, to the point where I had to install plugins to prevent frequent DDOS and malicious login attempts
With my latest hosting term about to expire, I finally was pushed to do what inertia had stopped me from doing before, which was migrate the site to a static site generator (SSG). A SSG is a framework that creates a “static” site – that is, a collection of web pages with no dynamic content rendering. There’s no admin login, database calls, or anything else. The result is that page sizes are much smaller, there are far fewer http requests, and annoying things like layout shifts as content loads don’t really happen. Static sites load muc, much faster than WordPress sites!
SSGs didn’t really exist in 2012, but there are now many to choose from such as:
and many others. The downside is they do require a degree of technical knowledge to use – if you aren’t proficient with markdown, the command line, git/GitHub, and web deployments, they aren’t going to feel accessible for you (that being said, with ChatGPT’s help I think many less technical people could use them).
I chose Hugo because there was more support for exporting content from WordPress sites and because it’s written in Go, a programming language I’d like to learn better, so any tinkering would naturally offer more Go exposure. Hugo is also popular enough that there are many themes to choose from.
I used the plugin wordpress-to-hugo-exporter, which worked reasonably well. Unfortunately, many links and images broke or disappeared altogether, and some plugins – such as one I used to display chess PGN files to create interactive chess games readers could click through – no longer work. I’m incrementally fixing these over time rather than waiting, so apologies in advance for any issues you come across.
How much did speed improve?
Metric | Wordpress | Static Site (Hugo) |
---|---|---|
Desktop Performance Score (Google Page speed) | 91/100 | 100/100 |
Mobile Performance Score (Google Page Speed) | 39/100 | 96/100 |
Homepage Load Time (Pingdom) | 3.07 seconds | 0.16 seconds |
Homepage Size (Pingdom) | 9.9 MB | 0.12 MB |
Homepage # Requests (Pingdom) | 378 | 9 |
Random Post Load Time (Pingdom) | 1.32 seconds | 0.15 seconds |
Random Post Size (Pingdom) | 0.51 MB | .12 MB |
Random Post # of Requests (Pingdom) | 39 | 9 |
It’s worth noting it’s not 100% a 1:1 comparison, as I plan on enabling comments, mailing list signup, and some kind of traffic analytics on the static site but haven’t done so yet, while the WordPress site had all three. Still, it’s clear there’s a massive speed improvement, on top of all the quality of life improvements from the publishing side.
To quote the Github repo description from wordpress-to-hugo-exporter:
Hugo is static site generator written in golang. Wordpress is a tool for remote access to your server ;-)