Why I moved this WordPress site to Astro on Cloudflare
Every WordPress site eventually hits the same wall. Plugins pile up, the database slows down, every page view spins up PHP, and the hosting bill quietly creeps from $9 to $120 a month. This site used to be one of those.
Here’s what changed when I rebuilt it as a static Astro site on Cloudflare Pages.
What actually got faster
The first page load dropped from around 3.8 seconds to under half a second. The reason isn’t magic — it’s what isn’t there anymore. A static Astro build ships plain HTML, CSS, and a tiny bit of JavaScript only where it’s needed. There’s no PHP round-trip, no database query on every request, no theme to render.
Astro’s default is zero JavaScript in the browser. Interactive components opt in with a client: directive, so most of the page is just markup. That’s the single biggest lever for Core Web Vitals.
What got cheaper
The hosting bill went to exactly $0. Cloudflare Pages serves static builds for free, globally, with DDoS protection included. Media moved to Cloudflare R2, and any dynamic bits — like forms and comments — sit in D1, Cloudflare’s serverless SQL. No VPS, no uptime monitoring, no renewal emails.
What had to stay
SEO doesn’t survive a migration by accident. Three things did the heavy lifting:
- Every URL kept its slug. The old
/2024/03/launch-checklistbecame/blog/launch-checklist, and every legacy URL got a 301 redirect in Cloudflare’s_redirectsfile. - The sitemap regenerated. Astro’s sitemap integration rebuilt it automatically from the new structure.
- Meta came along. Titles, descriptions, and Open Graph tags were ported page by page.
The migration order that works
- Crawl the old site and export every URL.
- Convert posts and pages to Markdown with frontmatter.
- Convert images to WebP or AVIF and upload them to R2.
- Rebuild the layout and components in Astro.
- Write the 301 map and deploy.
The whole thing is methodical. If you skip the redirect map, you lose rankings. If you skip image conversion, you keep the bloat. Do it in order and the migration is boring — which is exactly how you want a migration to feel.