A practical guide to building a headless WordPress setup where WordPress serves as a CMS via its REST API and Astro handles the frontend, deployed to Cloudflare Pages. Covers DNS migration to Cloudflare, WordPress subdomain configuration, must-use plugin setup for redirects and draft previews, Astro SSR configuration with the Cloudflare adapter, Tailwind v4 integration, and CI/CD via GitHub. Also includes security hardening tips like hiding the login URL, disabling XML-RPC, removing the users endpoint, and notes on adapter version compatibility.
Table of contents
Table of ContentsWhy Headless WordPress?The ArchitectureWhy Astro?Infrastructure SetupWordPress ConfigurationThe Astro FrontendCI/CD with Cloudflare PagesFinal ThoughtsGood to KnowSort: