Headless WordPress with Astro: the free, fast way to ship a WP-backed site
Run WordPress as a headless CMS and render the front end with Astro, a fast, free local setup with real HTTPS .test domains and no terminal, via ReDock.
Headless WordPress with Astro means keeping WordPress as the content editor your team knows, while a separate Astro front end fetches that content and renders fast static pages. You get the WordPress admin experience and a modern, quick site — decoupled. ReDock is a free native macOS app that runs both halves locally: a real WordPress install and an Astro project, each on its own trusted https://name.test domain, no terminal required.
Why go headless
A traditional WordPress site couples the editor and the front end: the same PHP that stores your posts also renders every visitor’s page. Headless splits them. WordPress becomes a content API; Astro (or another framework) becomes the presentation layer that reads from it.
The tradeoff is real on both sides. You gain a fast, framework-native front end and freedom to build the UI however you like. You give up some plugins that assume they control rendering, and you take on a build step. For content-heavy marketing sites, docs, and blogs where speed and control matter, the trade is usually worth it.
Why Astro fits WordPress content
Astro renders to static HTML by default and ships little to no JavaScript unless you ask for it. That’s a good match for WordPress content, which is mostly text, images, and structured pages. You fetch posts from the WordPress REST API at build time, render them as Astro pages, and serve plain HTML.
Astro is also framework-agnostic for the interactive bits — drop in a React or Svelte island where you actually need interactivity, and leave the rest static. The result is a WP-backed site that loads fast without dragging a heavy client runtime along.
Running both halves locally, without a terminal
The friction in headless setups is usually the local environment: two projects, two runtimes, two sets of ports and certificates. ReDock removes that. It hosts WordPress, headless WordPress, Astro, Next.js, Node, Bun, PHP, and MySQL, and it provisions each with one click.
For a headless-Astro project that means:
- a real WordPress site with PHP (pinned per site), MySQL, and the install done in one provisioning step
- an Astro site alongside it, each with its own
https://name.testdomain and a locally trusted certificate - no terminal — the runtimes, ports, and HTTPS are handled for you
Both sites are also agent-operable over MCP, so an assistant can create the WordPress backend, seed its content as real Gutenberg blocks, and scaffold the Astro front end that reads from it. The stacks docs list every supported runtime, and the first-site guide walks through provisioning one.
What driving it looks like
You tell the agent: “Create a WordPress backend for the blog and an Astro front end that renders its posts.” It creates the WordPress site, writes a few posts using block patterns, then creates the Astro site and wires its content fetch to the WordPress REST endpoint on that site’s .test domain. You open the Astro site in your browser over real HTTPS and see the posts rendered as static pages. When you’re ready to ship, ReDock’s one-click Cloudflare deploy and custom domains take the front end live.
Where this fits
Headless is one shape among several ReDock supports. If you want the classic coupled setup instead, see Local WordPress environment on your Mac. For driving WordPress content with an agent, read WordPress MCP: let Claude build, edit, and manage WordPress for you and AI edits your WordPress site: patterns-first authoring explained. Database access for the WordPress half is covered in the databases docs.
FAQ
Do I need to run two dev servers myself?
No. ReDock provisions and runs both the WordPress backend and the Astro front end, each on its own trusted .test domain. There’s no terminal step and no manual port or certificate juggling.
Can I use Next.js instead of Astro?
Yes. ReDock supports Next.js, Node, and Bun alongside Astro, so you can pair a headless WordPress backend with whichever front-end runtime you prefer. See the stacks docs for the full list.
Is this free?
Yes, ReDock is free. It’s a native macOS app (macOS 12+, built with Tauri and Rust). Windows isn’t supported.
If you want a fast headless WordPress site without the local-setup headache, download ReDock — one download and a five-minute install.