Infrastructure · Web OpsLive
WordPress → Cloudflare Workers fleet
WordPress to Cloudflare Workers Migration
15 WordPress sites converted to static Astro and 3 new sites launched—18 live on Cloudflare Workers from one Astro monorepo and a self-hosted build VM.
stack: Astro · Cloudflare Workers · pnpm Monorepo · Markdown-in-Git · 301 Redirect Maps · Self-Hosted Build VM · Axe & Lighthouse QA
01 / Problem
The problem
Running 15 separate WordPress sites meant ongoing PHP security maintenance, database backups, and page-builder bloat across domains that really needed fast static delivery.
02 / Architecture
The build
- Astro monorepo combining a shared core package and per-theme packages, deploying one Cloudflare Worker per site to serve static assets.
- Parity tooling verifying legacy URLs, titles, and canonicals alongside explicit 301 redirect maps and Markdown-in-Git content.
- Self-hosted build VM with a deploy timer and rollback tags instead of hosted CI.
- Per-site release gates running a strict validator, visual QA at 3 widths in light and dark, axe accessibility checks, and Lighthouse.
03 / Diagram
System schematic
04 / Scope
Status & scale
Sites live
18 (15 WP + 3 new)
Content migrated
~945 posts, ~60 pages
Themes
11 monorepo themes
CI / deploy
Self-hosted build VM
05 / Stack
Components
- Astro
- Cloudflare Workers
- pnpm Monorepo
- Markdown-in-Git
- 301 Redirect Maps
- Self-Hosted Build VM
- Axe & Lighthouse QA
06 / Writing
Related writing
- WordPress migration with AI agents: 861 commits across 15 sitesHow 128 request and report files ran a WordPress migration with AI agents across 15 sites and two machines, and what 861 commits on main looked like.
- A client sign-off app on Cloudflare D1, Workers and AccessA Cloudflare D1 sign-off app: a Worker, an append-only decisions table and Cloudflare Access JWT checks, plus the OpenNext crash that upgrading fixed.
- Hono in production: a typed API on Node, with a path to WorkersHow we structure a production Hono API: app factory, typed context, auth middleware, one error shape and tests, on Node and portable to Cloudflare Workers.
- Cloudflare R2 in production: images, backups and static assetsWhat Cloudflare R2 is good for in production: customer uploads, public images and S3-compatible backups, with lifecycle rules, pricing and our mistakes.
- Cloudflare Tunnel and Access: zero open ports in front of everythingHow a Cloudflare Tunnel plus Cloudflare Access puts internal apps, private Git and GPU services online with no inbound ports, and what broke along the way.
- When a Worker never runs: static assets and run_worker_firstWhy Cloudflare served 404s to browser navigations while fetch() reached the Worker, and how generated run_worker_first routes fixed it.