Starting Over: Rebuilding My Website Using Astro
Every few years, I decide to refresh and rebuild my personal website. This usually coincides with some combination of the following scenarios, in no particular order:
- Interest in learning a new technology
- Frustration with the current website platform
- Increasing overhead
- Escaping a “Burning Platform” scenario
Here I Go Again
I think this is the fifth fresh start and, in this iteration of the website, all of the above were contributing factors.
I have always used this website as a testbed for new (or new for me to learn) technology. At this time, the newish technology is a static site generator (SSG) called Astro.
The current (now previous) platform is WordPress running on a Debian LAMP (Linux, Apache, MySQL, PHP) stack. I think WordPress is great, but it is also overkill for such a small website with infrequent content updates. This website performed fine in that environment for years. I’m certain it would have continued to be fine in that environment. However, over those years, I grew frustrated with customizing WordPress. While WordPress is convenient for content editing using Gutenberg, I also find it constraining when trying to get the website to look exactly how I want. Seemingly simple changes require plugins or custom code using a mysterious sequence of callbacks. All of that convenience becomes inconvenient if I need to develop a custom theme or write custom code to get everything to look exactly the way I want. So, I might as well do it myself instead of forcing it into the WordPress framework.
WordPress and its supporting ecosystem, e.g., plugins and themes, have frequent updates. This is a positive aspect as it demonstrates continued development and support for the platform. However, it is also frustrating because there are core platform updates, plugin updates, theme updates, etc., and inevitably something on the website breaks or doesn’t quite look as expected after an update. This results in more overhead — time spent sustaining the environment — instead of actually writing and publishing content.
There is also a financial aspect to running a LAMP stack. While you can get inexpensive compute from AWS or most other cloud providers, it remains an overhead expense that is generally increasing year-over-year. Again, for a small website that generates no revenue, I have to balance cost vs. benefit.
Several times in the past 5 years, I had to relocate the website because the service provider was either removing support for a particular hosting product or they announced a price increase so exorbitant that I couldn’t justify using their services any longer. I would need to find a new host before the announced service change or pricing change went into effect, hence, the burning platform.
What’s Different This Time?
To simplify, I wanted to move away from managing a LAMP stack, WordPress, caching, and server-side rendering and return to a more static site but not necessarily editing separate HTML files. Summarizing the above points, I was simply frustrated with the constraints, maintenance, and general bloat of WordPress. If I need to run caching plugins to improve performance, then I should skip a few steps and go directly to a static site. So, I played around with Astro and I was able to quickly develop a basic site layout and produce static site files easily without having to compromise due to WordPress quirks.
Why Astro instead of 11ty or some other static site generator? Astro was the first SSG that I tried in-depth and it was easy enough to get going. Not much more analysis went into the decision. So far, it works for me.
In the end, I was able to switch the website from a self-maintained virtual private server to simple static page hosting on Cloudflare. No server-side rendering is needed and the static files generated by Astro are served quickly on Cloudflare.
While I gain the benefit of full control over the site layout, publishing new content is not as manual as I had anticipated. Automated workflow allows me to author new content or make site changes offline and then publish those changes directly to Cloudflare. It works very much like a software release.
What’s Next?
I’m sure this won’t be the last time I start over with this website. I don’t think five iterations over the past 20 years is too bad considering how much HTML and CSS standards as well as JavaScript frameworks have changed. I hope switching to Astro allows me to focus more on new content instead of site maintenance. I’ll revisit this post in about six years to find out how I did.