Why I'm not using wordpress
Wordpress is a great blogging platform, with excellent CMS tooling.
It’s just not quite right for me though.
I’m moving back to a static site generator (Hugo, specifically).
The main reason is because of self-hosting.
I previously had the blog as a static site: pushed to GitHub, built and hosted by Netlify.
I recently created a small homelab using a raspberry pi and an old laptop. I configured it to use k3s to deploy apps.
This presented an opportunity to host the blog myself.
I’m not expecting much traffic, so I’m not concerned about impact on my network. If there are issues, I can just turn off the Cloudflare tunnel that handles traffic.
I decided to deploy a Wordpress image, thinking it would be a good learning experience, and offer me a better writing environment than markdown files. It did both those things.
However, Wordpress eats up a good chunk of resource, and - more crucially - I don’t have a good back-up solution for it.
I don’t have a NAS to store the blog on, so the laptop is the node that hosts the persistent volume. If the laptop dies, I can’t simply spin up the site again on the pi.
I tried configuring a resilient database system, but couldn’t get it to work.
So I’ve decided to return to Hugo.
My site is stored in GitHub. K3s will ensure the site is always accessible, even if the laptop is unreachable. I can spin up extra pods if I - remarkably - have the traffic to require it.
A static site is dead fast. My set up - as it stands - involves an
initContainer that does a shallow clone of my site repository and builds the
site, storing the files into an emptyDir volume.
That emptyDir is then mounted onto an Nginx container, where Nginx delivers
the content.
Images could become an issue. If I have too many in the repository, downloading them every time the container builds will start to slow down the pod initialisation and build.
For now, I’m going to store images in a cloudflare R2 bucket.
This site is now lightweight, quick to deploy, and quick to load.
I will lose analytics and comments, but I don’t really care too much about that.