Serverless Static WordPress

I really enjoy cooking, but I often end up forgetting or losing my recipes over time. I also wanted an easy way to share my recipes with my friends and family. WordPress is a great tool for this, with all the plugins and themes to make a recipe site easily. However, I didn’t really want to pay for always-on hosting for such a low traffic site. That’s where going serverless and static with WordPress comes in!

My goal was to have a website hosted in AWS with S3 and Cloudfront to provide a really high-performance, low-cost site. After a little research, I came across a blog post by Pete Wilcock which achieves just this. Better still, it uses Terraform to build all the infrastructure too.

Taking strong inspiration from what Pete had made, I set about making my own version for my new food website – food.araines.net. The code for it is available on GitHub. The actual hosting costs basically nothing each month, and the costs of the on-demand WordPress backend are very small as well.

With page performance in mind, I chose GeneratePress as a theme and did some very basic customisation of the colours. Front-end design is not really in my wheelhouse, so it isn’t the prettiest site in the world, but it is performant!

Overall I’m pretty pleased with how this has come out. There is definitely scope for improvement here, though. I’m still a little dissatisfied at how it is all driven by terraform locally, rather than via a pipeline of kind. The terraform itself is not as clean as it could be. Also there is still a fair bit of “manual” set up which I wrote in to the README to remind myself how to do it, should I need to do it from scratch again. It would be far better if I could bake this in to code as well.