All posts

Headless WordPress with Astro: the best of both, or the worst?

Headless WordPress with Astro gives you fast static pages while writers keep the editor they know. It works well for large archives and WordPress-trained teams, but you still maintain WordPress, and many plugins stop working.

Headless WordPress with Astro can be the best of both: your writers keep the WordPress editor they know, and visitors get fast static pages. It's a good fit for big archives and teams trained on WordPress. It becomes the worst of both when you still pay to host, patch and secure WordPress, while losing the plugins that made it useful.

I've rebuilt WordPress sites in Astro, including Iceberg Quest. For most small businesses I move the content into Sanity instead. Here's how to decide.

What "headless" means

Normally WordPress does two jobs: it stores your content and it builds the pages visitors see. "Headless" means you switch off the second job. WordPress becomes only the place where content is written, and something else, here Astro, builds the pages.

Astro's docs have an official Headless WordPress and Astro guide. Content comes from WordPress's built-in REST API, at `/wp-json/wp/v2/`, or from GraphQL through a plugin such as WPGraphQL.

How it works day to day

  1. Writers log in to WordPress and publish a post as usual.
  2. A webhook tells your host to rebuild the Astro site.
  3. Astro fetches the posts from WordPress during the build and writes static HTML.
  4. Visitors get the Astro pages. They never touch WordPress.

The WordPress site can sit on a private address, so the public never sees it.

Four steps: write in WordPress, webhook, Astro build, visitors get static pages
WordPress becomes the editor only.

The best of both

Writers keep their editor

No retraining. The block editor, media library, categories and authors all stay the same. For a team with years of WordPress habits, that's the main reason to go headless.

Visitors get fast pages

The public pages are static HTML built by Astro, with only the JavaScript you add. On Iceberg Quest, the full rebuild took the home page from 112 files to 16 and from 11.0 seconds to 1.4 seconds before the main content appeared, measured with Lighthouse on 8 November 2026. That was a full move, not headless, but the front end is the same idea.

Bar chart: Iceberg Quest page weight fell from 1.5 MB to 864 KB, files from 112 to 16 and main content time from 11.0 s to 1.4 s
Iceberg Quest: a full move from WordPress to Astro, not headless, but the same front end.

A smaller attack surface on the public site

Most attacks target the public WordPress site: login pages, forms and plugin endpoints. If WordPress is hidden and the public site is static files, most of that disappears.

Large archives stay put

If you have thousands of posts, keeping them in WordPress avoids a big migration.

The worst of both

You still run WordPress

WordPress still needs hosting, updates, backups and security. Patchstack's State of WordPress Security in 2026 counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 91% in plugins. Hiding the admin reduces risk, but it doesn't remove the upkeep.

Three statistics: 11,334 new WordPress vulnerabilities in 2025, 91% in plugins, 46% unpatched at disclosure
The risk is mostly in plugins, not WordPress itself.

Many plugins stop working

Any plugin that changes what visitors see does nothing in a headless setup, because WordPress no longer builds the pages. That includes:

  • Page builders and theme features.
  • Form plugins: the form has to be rebuilt in Astro.
  • SEO plugins: their fields can still be fetched, but the plugin no longer writes the head tags or sitemap.
  • Related posts, popups, sliders and shortcodes.

Some popular plugins offer extra add-ons that expose their data to GraphQL. Each one is another plugin to maintain.

Two systems to pay for and understand

You now have a WordPress host and an Astro host, plus a developer who understands both. For a small business, that's more moving parts than either system alone.

Preview is harder

In normal WordPress, "Preview" shows the real page. Headless, the preview button points at WordPress's own theme, not your Astro site. Fixing that takes extra development.

When headless WordPress makes sense

  • Thousands of posts and a migration you can't justify.
  • A team deeply trained on WordPress that would resist a new editor.
  • Custom WordPress data, such as custom post types and fields, that other systems already depend on.
  • A step on the way out: go headless first, then move the content later.

When moving to Sanity is simpler

For most small businesses with tens or a few hundred posts, I move the content into Sanity and retire WordPress. Sanity has a full course on migrating from WordPress, which reads posts from the REST API, converts the HTML into structured rich text and uploads the images.

After that, there's one content system, no WordPress to patch, and an editor shaped around the business. I compare the two editors in Astro + Sanity vs WordPress for blogging.

A quick way to decide

Ask three questions:

  1. How many posts do you have? Thousands: headless is worth considering. Hundreds or fewer: move them.
  2. How attached is your team to WordPress? Very: headless. Open to change: Sanity.
  3. Who will keep WordPress updated? If nobody, don't keep WordPress at all.
Two lists: when to go headless with WordPress and when to move content to Sanity
For most small businesses, the right column.

What it costs

  • Headless WordPress: WordPress hosting, plus a static host, plus developer time for both. Plugins you relied on may need replacing with custom code.
  • Astro and Sanity: Sanity's pricing lists a free plan, with Growth at $15 per seat a month, checked December 2026. Plus a static host, often free.

For a typical small business, the Sanity route costs less to run after the move.

What I'd check before going headless

If you're leaning towards headless WordPress, list these before any build starts:

  • Every plugin, and what it does for visitors. Anything that changes the public page has to be rebuilt in Astro.
  • Forms. Where submissions go today, and what will replace the form plugin.
  • SEO data. Whether your SEO plugin's titles and descriptions can be read through the API.
  • Rebuild triggers. A webhook from WordPress to your host, so publishing still feels instant enough.
  • Who owns WordPress updates. A name, not "someone".

If that list looks long, it's usually a sign that a clean move would be simpler.

Frequently asked questions

Does Astro officially support WordPress?

Yes. Astro's docs include a guide for using WordPress as a headless CMS through its REST API or GraphQL.

Do I need WPGraphQL?

No. WordPress's built-in REST API is enough for most blogs. GraphQL can make complex queries tidier.

Will my SEO plugin still work?

Not as before. Its fields can be fetched, but Astro has to output the titles, descriptions, schema and sitemap itself.

Can I go headless now and move off WordPress later?

Yes, and it's a sensible path. Once the Astro front end exists, swapping the content source is a smaller job.

Sources

Weighing up headless or a full move? See my WordPress to Astro page, or book a free call.

Work with Jeo Web Studio

Tell us about your business and what you want the site to do. Rough notes are fine. We will reply with honest advice, a plan and a fixed price, or tell you plainly if we are not the right fit.

Book a discovery call

A free 30 minute video call. Talk it through before you commit to anything.

Pick a time

Or tell us about your project

We only use your details to reply. See our privacy policy.