I recently migrated the book website from Wordpress to the Hugo serverless hosting infrastructure I’ve previously posted about.

Background Link to heading

When the first edition came out back in 2017 the book got a very basic website. Pretty much an afterthought. When the second edition started to become a reality I wanted a much more professional website with resources and a blog. I choose the Wix and that’s where the website lived when the book launched.

Wix was nice but abstracted you so much from the css/html that changes that should be really quick and simple seemed not to be. A Wix developer I hired actually recommend I move to WordPress!

I’ve never liked WordPress. I think the UX is horrible, the plugin ecosystem is a massive attack surface, and there are a lot of places for resource bottlenecks between the web server, the database, the file storage, etc.

But I relented because you can mitigate some of those issues by paying for additional services that wrap around Wordpress and keep it updated and put a WAF in front of it.

So that’s where the site lived until a few days ago. Last blog update was in 2024. Lots of nearly finished draft posts on my laptop. Same frustrations with using web interfaces to publish. Except this was worse as my web developer had installed an additional editor interface that was apparently required for the custom theme. It was even more clunky than the native WordPress one which is impressive in its own way.

The migration Link to heading

The website had text, blog posts, and a contact form. The contact form was protected by reCaptcha.

I used the interactive NPM package wordpress-export-to-markdown to quickly extract all of the text and preserve the timestamps.

Hugo does not support contact forms and server-side secrets storage (for reCaptcha) so I decided to just replace the whole thing with an contact email address - which is where the form was going anyway.

I chose the PaperMod theme and started to build out the site. It was a very quick process. I only needed to make some small modifications to the theme and the extracted markdown needed to be re-formatted. I think the whole process was completed over a few evenings on the couch.

Benefits Link to heading

Usability Like with this website I get that frictionless experience of writing and publishing.

Security Attack surface is massively reduced by taking Wordpress alone out of the equation. Going serverless is the cherry on top.

Speed Major improvement here. The Speed Index is 0.3s now, it was in the 5-7s range. Some of that gain is indeed because it’s a static site but I think a lot is down to moving away from a bare metal server too.

Cost Similar to this website my motivation to migrate was not cost-driven. But I definitely will reduce my hosting costs.

Wordpress hosting costs:

ItemCost
Wordpress hosting and backup service€129.33
SSL certificate€29.99
Sub-total€159.32
Sales tax (23%)€36.64
Total€195.96

That annual number breaks down to approximately €16 per month. I forecast that my AWS bill for this site will probably not exceed €2-3 per month. Even if you take out the sales tax there’s a decent saving there. A real bonus is not being shaken down for the SSL cert.

Conclusion Link to heading

This was another successful Hugo and serverless hosting migration. But keep in mind that both of those sites were perfect fits for static website hosting. Not every website is.

I now plan to work though that backlog of unfinished posts.