Yesterday, I shutdown the VPS that has been hosting all my websites for the last ~10 years. I’ve moved everything to static content, including this website.

📝 WordPress

Since the very beginning (~2008) this blog has been powered by WordPress, it served me well, it worked, had a nice backend to make the posts, plugins and themes. After a couple years I moved from shared hosting to a VPS, I had other websites and services I needed running and all in same machine was better and cheaper. But WordPress needs a lot of things, PHP, MySQL, maintenance in all those moving parts.

So for the past couple of years I’ve been thinking in migrating it to something like Jekyll or Hugo, to serve it as static content. But the few times I looked into the process it seemed like a big task especially because I have 184 posts, I wasn’t just starting from 0, I wanted to maintain the existing content, posts, images, URLs etc. So, a couple days ago I decided it was time.

📝 Converting and Moving the websites

🔗 questofdungeons.com

This was the easier of them, it’s just not working 100% as it was before (more on that in a bit). Site was just a couple of hand-made pages I hacked in HTML/CSS/JS years ago, so that was already done.

The only problem was the stats page relied on a PHP script to pull the stats from Steam. PHP was out of the question since I wanted to host on GitHub, so I tried the full JavaScript approach, but that hits the CORS issue, and I would need a proxy for that, so for now I grabbed the last stats and it’s serving it statically. I have to think of something else later since I don’t have PHP anymore etc. But it’s not important and the numbers aren’t moving as much as they used to. I grabbed all files, pushed to a GitHub repo, activated pages, changed the nameservers, queued SSL cert, and voilá, the site is now live.

🔗 upfallStudios.com

The merging the Upfall Studios blog a while ago was not an isolated act, I was thinking about this already. After the merge, www.upfallstudios.com was left with only the front page, which was static content already. I also had a doPresskit() page, which was all PHP, and I need to keep it for games info etc. After a bit of search I found there is an alternative, serving static content, so I converted and updated the site to use it, that way 100% of the site was ready. Easy and working as before.

🔗 david-amador.com

And now I was free to focus on the one I knew would be a headache, this blog. Full wordpress site, no static content, everything dynamic using plugins, MySQL, PHP and custom .htaccess rules.

  • ❌ Jekyll

From prior research, I was inclined to Jekyll since all I read online was that it was good, also it’s been around for 15 years, so it has proved it works and should be stable. But after a couple days of messing around with configs and pre-requisites, packages versions mismatches between Jekyll, ruby, wordpress exporters etc, I gave up. Booting up a new site can be achieved fast, but I needed to also be able to import all of my content, and that proved to be hard. Also I started thinking about the future of the blog, what if in a couple years the version breaks on modern OS version, and I can’t run the latest one due to some incompatibility, even on a VM that would be a nightmare to keep around just for one site.

  • ✅ Hugo

So I decided to go for Hugo, single executable, it works, it’s fast. Highly recommend it. The documentation does lacks sometimes, but between the forums, and looking at other people’s pages on GitHub it’s perfectly doable.

I had to export the data, and there are a couple of Wordpress plugins for that, the problem was that my server was old, i386, outdated Ubuntu version, the PHP server version had no Zip support, which most of those plugins needed. After messing around a bit with the server trying to install the proper dependencies, which included actually breaking the entire thing and having to restore from backup, I decided a different approached. Created a Docker VM with wordpress, imported my existing WP files and database locally, installed the required plugins and was finally able to export all.

📄 Now that I had all the files in markdown format, it was really more of a going through Hugo documentation, placing all freshly made files in place and cleaning up stuff. One neat thing is that you can run and edit an Hugo website live.

Hugo.exe server -D

This will make the site run on localhost:1313/ , so while you edit the markdown files, it will keep refreshing, I didn’t even had to press F5, I could have it side by side and Ctrl+S, super fast to iterate.

🎥 There was a LOT of YouTube embed code, that I placed over the years, and was not ever working anymore on original website, some of it had Macromedia code, yeah, that old! So I tried to fix all that, then just regex replace some stuff like wrong image paths.

🧑‍💻 I also had to fix some of the programming code block notation. I was using

<pre lang="LANG"> 

</pre>

for code blocks, but the parser collapsed in a couple posts, leaving pre tags, which was helpful in searching for them actually. I fixed all I could find.

🗣️ As for the comments, I had Disqus installed on Upfall Studios blog, but on this blog it was on WP system, so what I did was just import all the comments on Disqus and merged both. So the comment system should work on the bottom of all posts (say Hi if you want :)

I’m not sure if all the comments are there though, one particular post I had to go back and import it manually again, but it also had over 100 comments, so it might have failed the first time. I still have all the old data, so if needed (and I can spot it) I can always import it again on Disqus.

📰 The RSS feed should theoretically still work for everyone who had from the old blog, but I’m not 100% sure, once I put this post live I guess I’ll know.

💻 So my current workflow is: I have a git repo with all the markdown and website code and I have the live website as a submodule, so whenever I made a change, I export it with Hugo, git commit all changes and GitHub pages just deploys them, feels like magic :D

🚀 Speed

Oh its much faster, obviously, but look at the changes of before (left) and after (right) using PageSpeed Insights.

Conclusion

Still there? Well so far I’m happy with the move, I do miss the nice WordPress backend thing if I’m being honest, but I can live without it. I feel like in the long run I won’t miss having to maintain that server, also the costs. Right now I’m editing this on Obsidian, about to commit and see if it goes live, RSS and all. If you find any broken stuff or have suggestions let me know, either mastodon, email or a comment here.

Until the next time, where hopefully I’ll talk about games! Thanks for reading.