Hi, I'm Matthew 👋

I'm a Software Developer from New Zealand

Updating the blog from Wordpress to Hugo + Netlify

3 minutes
June 9, 2019

For many years I’ve hosted this blog on Linode, running it on WordPress. This has gone pretty well for the most part, but it has a couple of downsides. Firstly, and most importantly, it’s a bit annoying to maintain - having to maintain a VM, patching it occassionally, and then making sure that WordPress gets backed up and updated is a little frustrating for what is really a pretty simple blog. The second is cost, while linode is super cheap - it’s still another bill that needs to be paid.

I’ve been on the lookout for an easy and viable alternative that I could switch to without too much effort. Static site generators like Jekyll, Hugo, and Hexo came to my attention - along with powerful and free content hosting tools like Netlify. I did a bit of research and decided to give Hugo + Netlify a try.

Exporting content for my existing WordPress blog was probably the hardest challenge. I tried some of the suggested methods, none of these seemed to work - in the end blog2md, plus a bunch of manual edits to update broken links and the like seemed to work. Getting Hugo to build was easy, understanding themes slightly harder - especially if you want to do a bit of customization but not roll-your-own entirely.

Hugo is pretty powerful, at the same time I decided to do this, because I now had a bit more control over the structure of the site, I decided to roll by personal webpage into the blog as well and reduce the amount of sites I had to manage. The two challenges I had here were lots of images - which didn’t really need to be on the site directly, so have been rolled up into shared Google Photos albums. The other was that I had a page in my personal site that used D3 to generate a complex graph from a CSV file which mapped one of my early attempts at using data to track health and weight. Moving this across was a little tricky - figuring out where libraries should be referenced and making the whole chart responsive took far more time that it should have, but it seems to work now.

The biggest hero in all of this is Netlify - I cannot recommend it enough. It’s simple to use, intuitive, powerful, and free. It integrates well with GitHub which makes CD type deploy flows super-easy.It’s also really quick to configure - if you’ve got a static site sitting somewhere, you can have it up in just a few clicks.

I’ve now removed my old blog, so with any luck having done this will encourage me to get back into blogging and simplify the ammount of maintenance I need to need on my personal tech stack!