3 minute read Published:

Converting This Blog

About 8 years ago I decided to start a blog to encourage writing. Recently I decided that I should also use the blog as a method of learning. The following is a break down of how I converted the blog from WordPress to it’s current form.

WordPress has been good for me. The free version has all the features I require, easy to use, analytics, and the WordPress social ecosystem is nice. This is definitely not a condemnation of that platform but an explanation of how to do it the hard way. Below I’ll walk through all the decisions I made and why. Some of the choices will seem unnecessarily complex but were based on my desire to learn something.

The first choice I made was to host on AWS. Instead of using AWS Lightsail and spinning up a WordPress blog, I wanted to use the individual resource of AWS, like S3 and Route53.

In order to generate my new website, I picked Hugo. I was starting work with Helm and thought this would give me an another opportunity to work with Go Templating. Hugo also boasts a super fast build time, and that claim held up. I needed to be able to export my previous blog from WordPress and move it into Hugo. Exporting was simple enough, WordPress will let you do that with a click of a button. The only format that WordPress supports is their own, if you want to convert to another format, you’ll need a plugin, which is a paid feature. I wasn’t paying for WordPress, so I had to figure another way of converting my blog. Fortunately, I had a Kubernetes instance running and with a simple Helm command, was able to load up a new instance of WordPress and the necessary plugin. (At the time, there was no zip converter.) There was a little manual work involved after the conversion to correct some of the WYSIWYG artifacts, but that only took about 30 minutes with vi.

Picking the design and the tools to use were based on some technologies that I wanted to work with. For CSS Framework, I had used Bootstrap in the past but decided to try out Bulma. It seem to have a good following. The documentation and examples were a little sparse, but when I got use to the new nomenclature everything seemed to fill out nicely. The blog is by no means super polished. I may continue to tweak it in the future.

On a project many years ago, we had the need to implement webpack. I wasn’t on that project long enough to set it up, so I decided that I would try and use this opportunity to figure it out. It was one of the bigger learning exercises in this process as I needed to go through the basics of webpack before I could learn what I needed. Arguably, using webpack is overkill and I’m sure I’ll end up removing that requirement as the size of my the artifact is too big for a blog.

Building the blog is pretty straight forward. Use NPM to package the artifacts, use Hugo to build the content, then push to S3. The hosting part works just about how you would expect it to. Like every tutorial you’ll find for hosting a blog on AWS. S3 serves up the content, Route53 for DNS, and Cloudfront for both CDN and SSL termination. All in all for a website that has little to no traffic, it cost less than 2 dollars a month to run.