Hooboy, hugs going out to devops and bloggers everywhere. Here's a breakdown of what happened.

If you're still on a self-hosted Wordpress site, migrating to a statically generated version is pretty easy. I've done that recently (and installed Blogclaw on top of it to keep a blog running). The only prerequisites are having your own domain, creating a Cloudflare account and doing the following…

Migrating a WordPress blog to a static site on Cloudflare Pages

  • Snapshot the site: crawl it with wget --mirror --convert-links --adjust-extension --page-requisites, or use a static-export plugin like Simply Static. Make sure wp-content/uploads comes along.
  • Keep URLs stable: preserve the permalink structure (/yyyy/mm/slug/index.html) so existing links and search results keep working.
  • Clean out the dynamic parts: remove or replace comments, search, contact forms, xmlrpc.php and wp-json references, and the admin-bar remnants.
  • Fix links: rewrite absolute http:// and old-domain URLs to relative paths or the new domain.
  • Keep feeds working: make sure /feed/ serves the RSS file, adding a _redirects rule or setting the content type if needed.
  • Add redirects: use a _redirects file for old paths like ?p=123, category and tag pages, and anything you dropped.
  • Deploy: commit to a GitHub repo and connect it to Cloudflare Pages with no build step and the output directory set to the site root. Alternatively, run wrangler pages deploy ./site.
  • Cut over DNS: add the custom domain in Pages and check HTTPS and a sample of URLs. Retire the WordPress host only after that.