Featured image of post So Long Wordpress...Hello Hugo

So Long Wordpress...Hello Hugo

Moving again...just the blog, but if you're pondering such a move yourself, read on...

Moving Again

So, it’s that time again. Most folks probably know the feeling. Every so often, you need to make a change. Sometimes it’s a career change, sometimes it’s moving to a different city, and if you’re a developer who blogs, sometimes it’s re-platforming an app, blog, or other tool you’ve had for a long time.

For me, it was time to move my blog…again. This blog has been through a number of iterations. I started with Orchard CMS (later rebuilt as Orchard Core on top of dotnet core), a .NET-based platform, thinking that my experience with C# and ASP.NET would make it easy to troubleshoot and write my own extensions for it. But that became a bit like a mechanic working on his own car…like taking your day job home with you.

So I eventually moved to WordPress, a process I discussed in this post, initially hosting it on my Azure account, and later on SiteGround for a more hands-off hosting experience. And to Siteground’s credit, it’s largely been a hands-off experience, with all major upgrades automated, and zero issues over the 6+ years I’ve been hosting with them.

So Why Move?

An astute reader might notice that my blogging frequency hasn’t been high of late. And while I hope to change that to a bit more frequent pace, it’s difficult to justify the cost of hosting for the amount of use I’m getting from the blog. The cost has steadily risen over the years to the point that it just doesn’t make sense to pay for the level of hosting that I was using.

Add to that the fact that WordPress, while a dominant and excellent tool for blogging and CMS use, is huge and complex, particularly in relation to my current needs. So while I could have looked at cheaper hosting, or trying to stand up a WordPress instance in a VM or container on my network and open up the firewall to let traffic into it, that would require more time and expertise than I have, or care to gain.

At the same time, I didn’t want to simply shut the blog down. While there’s a large amount of content on the blog that is of limited practical value today (looking at you, Windows 8 content), I am both delighted and surprised that I have some posts, including one that is 10 years old, that are still helping people to this day. While link rot on the internet is largely inevitable, I want to do my best to keep the information on my blog available for as long as I can manage.

Why Hugo?

Given the relatively low level of traffic the blog sees now, and the low volume of posting, I thought it might make sense to look into static site generators. When I made the move from Orchard to WordPress, these were still pretty immature, and I wanted more than they could offer at the time.

I recently had the opportunity to help one of my sons evaluate options for a promo website he is planning for a game he has in development. We looked at a few options, and Hugo seemed like it might be a good fit. I took it for a spin to see how quickly I could get up to speed, and liked what I saw.

Getting from Point A to Point B

As with previous migrations, one tricky question was how to get all my content moved. Fortunately, unlike my experience in moving from Orchard to WordPress, there are a number of migration tools available, including several for WordPress. An advantage of working with two mature and popular platforms.

I ended up going with the WordPress to Hugo Exporter, which seemed the simplest, as it installed as a plugin inside of WordPress, and provided essentially one-click export. It took a couple of tries, and a bit of a learning curve to understand what it produced, and how that works in tandem with various themes in Hugo, but in less than a week of working on it periodically, I was able to get the new site up and running.

I’m currently hosting using Azure Static Web Apps, which offers a free tier with what may be sufficient capacity for my needs, and with a full CI/CD pipeline using GitHub Actions to automatically build and deploy a new version of the site when I make changes and commit them to the Github repo. And there are many other options for hosting Hugo sites, so if Azure doesn’t suit my needs long-term, it’s pretty easy to move the content later.

With the plugin, a decent theme (currently using the Stack theme), and some time spent in tweaking the configuration, I was able to get my posts showing up using the same permalinks as on my WordPress blog, meaning no broken links for others who’ve linked to the content. And since a great many of the images in my blog were already hosted on Azure Blob Storage, there was little work necessary to get those images properly formatted on the new blog, though it turned out that at some point I’d enabled the Jetpack plugin which rewrote most of the URLs to use their CDN. A simple find and replace in VS Code took care of that. The other images were exported by the Hugo exporter plugin, so I just had to make sure those pointed to the correct location, and they were showing up, too.

The Markdown Question

The one piece I’m not yet sure of is using Markdown for editing. I know lots of people, particularly developers, love it. I’ve just never gotten particularly comfortable with it, so it will take some getting used to. I am writing this post in VS Code, and using the side-by-side preview to see at least some of the formatting (though not at all how it will appear on my blog…for that I need to run the local Hugo server, which is an extra step), and I feel like images will be a bigger pain to deal with for sure.

But life’s full of tradeoffs, and saving a few hundred bucks every couple of years on hosting is probably worth a little inconvenience. I’d like to find a better Markdown editor, but for now VS Code will do.

Conclusion

Time will tell whether I think the move was worth it. I think it probably will be. But change can be good, even if it’s not perfect. After all, it motivated me to write again, and to learn some new stuff, which has been fun. And the experience I gained should make it easier for me to help my son with his site…whether he’ll take that help is another question.

I would ask you to chime in on your experiences with change in the comments…but that’s a piece I’ve not yet sorted out. Hugo offers many options, so it’s really a matter of choosing one, and then figuring out how to configure it.

Code, Community, and Coffee
Built with Hugo
Theme Stack designed by Jimmy