From WordPress to Astro
Contents
b3n.org is no longer on WordPress. It's plain HTML+CSS generated by Astro, hosted by Cloudflare. Completely serverless. Content now appears 2.5x faster.
Getting rid of JavaScript #
JavaScript has become overused. It has its place, but it never seemed right to have the browser assemble a page with JS when the server can send the final HTML.
WordPress bloat & security #
I've been happy with WordPress--but to build a fast site requires a lot of effort in removing CSS and JavaScript that isn't needed, and using caching plugins like LiteSpeed Cache or Cloudflare APO.
There is also the security risk of the WordPress stack--I need to run security updates daily to keep it updated between PHP, MariaDB, OpenLiteSpeed/NGINX, Redis, all the WP plugins, and WordPress itself. The WordPress stack is a legacy design. I can try to make it lean, but it's easier to start with a clean stack and put features in than start with too much and take things out.
Astro migration #
I re-built the site into static HTML and CSS (had a lot of help from Claude). All the old links from WordPress still work.
Now there is almost no JavaScript. The only page that uses JavaScript is the search.
Cloudflare workers static assets #
I deployed it straight to Cloudflare. It feels wrong to not have it on a server. This site is 17,507 files, which fits just under the workers free plan limit of 20,000. So right now I could drop APO and save five dollars a month... but I'll have to add the five dollar worker plan once I reach 20K.
Rendering performance: WordPress vs. Astro #
I ran Lighthouse to test performance on the WordPress site the day before the switch and on the Astro site right after it. Each result is the median of three simulated runs on a mobile phone.
| WordPress | Astro | |
|---|---|---|
| Performance score | 97 | 100 |
| Best Practices score | 79 | 100 |
| First paint | 1.85 s | 0.95 s |
| Largest paint (main content shown) | 2.45 s | 0.95 s |
| Total blocking time | 33 ms | 0 ms |
| Page weight | 195 KB | about 110 KB |
| Requests | 25 | 5 |
| Stylesheets | 9 | 1 |
| JavaScript | 7 scripts, 47 KB | none |
On desktop first paint went from 0.53s to 0.29s.
Network performance #
Because I was paying for Cloudflare APO, the site was already caching on the edge. On the network side there was no improvement. The differences are normal variation.
Measuring from 8 cities around the world across 3 pages:
| Time to first byte | WordPress + APO | Astro |
|---|---|---|
| Median, first visit | 44 ms | 43 ms |
| Median, repeat visit | 34 ms | 42 ms |
| Slowest single result | 114 ms | 89 ms |
History of blog migrations #
This is not the first migration--
- March 2001 -- The beginning. Started off with handwritten PHP+HTML.
- April 2008 -- Moved to blogger.
- Don't remember. -- I think I moved the site to WordPress
- June 2010 -- Back to blogger.
- May 2013 -- WordPress, self-hosted. (sometimes at Jeff's house)
- November 2026 -- Astro
...and this likely won't be the last.