DEV Community

Maina Wycliffe
Maina Wycliffe

Posted on • Originally published at

I Migrated From WordPress to Hugo

This article is a few months too late - around 6 months - but as they say, better late than never. A couple of years ago, I started my blog under a different name - - initially, it was meant to be a general tech blog, but slowly I found my niche. I started with one Angular article and when the reception was good, I stuck with it.

About the Old Blog

I build it using WordPress, with a free theme. It cost me around $20 per year, with most of the cost going to the domain name. The cost of shared hosting was about $5. That’s not a lot of money, but If you happen to be fresh out of college and jobless, it’s not little either.

In a few months, the blog had outgrown my cheap shared hosting plan as I was getting some decent traffic. This led me to move to a Virtual Private Server (VPS) – AWS LightSail. I started out with the $5 plan, and soon that also wasn’t enough and upgraded to the $10 plan.

This worked well for a brief period, but at least once a week, my website would go offline randomly. This was despite using Cloudflare proxy to reduce traffic to my blogs' servers and did a very good job. When the site went offline, I had to shut down my LightSail instance, then start it up manually. The problem would then disappear for another week or so. It was common for me to wake up in the morning to find that my blog was down for quite some time.

Finding an Alternative to WordPress

The way forward was to upgrade to an even larger plan. And while this alleviated the problem, the cost of running the blog was piling up. For someone without a paying day job - I work for a start-up – keeping the costs down is essential.

I started to look for an alternative solution. I considered a few solutions including using WordPress as a backend only, with Angular as the frontend. To keep the costs low, I would use a CDN – CloudFront – to aggressively cache API calls, because I only posted about 3 times a week. For a time, I also toyed around with the idea of migrating to Medium or a similar site.

I was strongly considering the Angular + WordPress solution until I came across Static Site Generators (SSGs). This solution was mainly inspired by, when Jeff Delaney, decided to start a new site and he open-sourced the code. While inspecting the code, I came across Hugo and did some research.

I compared different Static Site Generators and finally settled on Hugo. It had glowing reviews from people who used it and loved the fact that it was built using Go – sentiments, I guess. And I started working on my new blog.

My New Blog

I quickly learned how to use Hugo and I was able to quickly build my own theme for my blog. This is because, for the themes I liked, I had seen a few other blogs using them. Funny enough, I didn’t have the same problem with WordPress. But I am guessing that has more to do with my lack of interest in building WordPress Themes. For some reason, I never grew into it despite working with PHP for years.

Back to my blog, within a matter of weeks, I had a new blog. I rebranded it from to and launched it, with the least amount of fanfare possible. I just happen to be poor at this Social Media thing.

I was able to migrate successfully while maintaining Google Search ranks that I had earned with my previous blog. In fact, traffic from Google Search increased and almost doubled. Google Search accounts for most of the traffic I get on my blog.

The blog – this one – is currently hosted on Firebase, and the cost of running it is very low. Firebase has a very good free plan, and you only get charged when you go over it. Since I always do, the cost comes to around $1 a month. I am working on improvements over the next few weeks on my blog to improve reader experience and provide more value to my readers.

WordPress comes with a decent built-in comment system. It has very good spam detection, which I really needed as only 1% of the comments I received were not spam. There are several descent comment systems out there, but they can be quite costly. I found this quite challenging.

I finally settled on utterances widget which is a comment Widget powered GitHub issues. In a nutshell, you create a GitHub repository for your blog comments and each article/post gets an issue on the repository. Then users can comment on the issue. Utterances handles this automatically for you, you just need to point it to the correct repository.


It is not all roses though, as, with any solution, Hugo is not perfect. There are a lot of things I really do miss on WordPress. The first one has to do with the WordPress plugins ecosystem, which has a huge number of decent plugins to help you automate tasks and add functionality. On the other hand, Hugo and I am guessing most SSGs, you need to do it manually for tasks and build the functionality you need yourself. For instance, inserting ads into content or setting up redirects after changing the path to posts.

Another challenge has to do with posts statistics. With WordPress, if you want to add the most popular posts section, it is easy. On the other hand, with Hugo, you can’t, at least not directly. You would need to build a data API that pulls the data from some analytics service and exposes it to Hugo during build time. You can also use JavaScript to pull the data dynamically.

Another challenge comes up when working with clients. With WordPress, all you need is to show them how to update their content. Once they update the content, the content will be reflected on the site automatically. Hugo on the other hand, if you want a content update to be reflected, you need to rebuild and deploy. For someone like me, this is easy, for a client not so much. There are solutions to automate the process such as using Netlify and a Git backend. This involves setting up a build and deployment pipeline, but as you can tell, it is not as straight forward as WordPress.

Don’t get me wrong, I enjoy working with Hugo, but these are some of the drawbacks of working with it – and most SSGs out there. I am just pointing out some of the drawbacks to consider before jumping get started. For me, the benefits simply outweigh the drawbacks.

Top comments (0)