I like writing in WordPress’s block editor, but I didn’t want to pay for, patch and secure a WordPress server for a site that’s read far more often than it’s written. With static-wordpress, WordPress only exists while I’m editing. This site and its CMS run on it.

How it works

  • Opening the CMS boots WordPress Playgroundwordpress.org favicon, which is WordPress and PHP compiled to WebAssembly, in the browser and restores the last saved snapshot.
  • Saving stores a database snapshot in Cloudflare D1 and media in R2, then triggers a Workers Builds run of the site.
  • At build time, a Nuxt module reads a token-protected content feed from the CMS Worker and prepares the posts, images and sitemap.

Between edits, nothing runs except Cloudflare’s storage.

What went into it

  • An editing lock, so two open tabs can’t overwrite each other’s snapshot.
  • Custom fields defined in config that become native WordPress metaboxes. The links and tech stack on this page come from them.
  • Importing a WordPress backup or WXR export, which is how this site’s existing posts moved over.
  • Two TypeScript packages in a pnpm monorepo, with tests, released to GitHub Packages with changesets, and prereleases from every branch.

Built with

TypeScript, Cloudflare Workers, D1, R2, Workers Builds, WordPress Playground and Nuxt.

View repo