Automate now

Headless WordPress: How It Works, When It Pays Off, and What It Costs

Headless WordPress means using WordPress only as the place where content is written and stored, and building the public website with a separate front end. Editors keep the WordPress dashboard they know. Visitors never touch WordPress: they get pages built by a framework such as Astro or Next.js, which fetches the content through the WordPress REST API or the WPGraphQL plugin.

Quick answer

  • What it is: WordPress as a content backend (a “headless CMS”), with the website built and hosted separately.
  • How content gets out: the built-in REST API at /wp-json/wp/v2/, or GraphQL through the free WPGraphQL plugin.
  • Worth it when: you have developers, you need a faster or more custom front end, you publish the same content to more than one place, or you want the public site to have no WordPress login or plugins exposed.
  • Not worth it when: the site depends on plugins that change the front end (page builders, forms, shops, memberships), nobody on the team writes code, or the current site works well enough.
  • What gets harder: previews, plugin compatibility, and running two systems instead of one.

How we wrote this

Beehexa’s engineering team wrote this guide. Our own site, beehexa.com, is built with Astro and hosted on Cloudflare Workers. We do not sell any of the products below and none of the links are affiliate links. API details come from developer.wordpress.org and wpgraphql.com, and every price comes from the vendor’s own pricing page, read on 30 November 2026. Sources are listed at the end.

How headless WordPress works

In a normal (“monolithic”) WordPress site, the same PHP application stores the content, applies the theme and sends the finished page to each visitor. In a headless setup those jobs are split:

Layer Traditional WordPress Headless WordPress
Where editors write WordPress dashboard WordPress dashboard (unchanged)
Where content is stored WordPress database WordPress database (unchanged)
How pages are built PHP theme, on every request (plus caching) A front-end framework, at build time or on request
How content reaches the front end Not needed: the theme reads the database directly REST API (JSON) or GraphQL
What visitors reach The WordPress server The front-end host (a CDN or edge platform)
Who can reach the WordPress admin Anyone on the internet, unless you restrict it Can be limited to your team

A typical request flow looks like this:

  1. An editor publishes a post in WordPress.
  2. The front end asks WordPress for the content, for example GET /wp-json/wp/v2/posts, or a GraphQL query to /graphql.
  3. The framework turns the JSON into HTML pages, either once at build time (static) or for each request (server-rendered).
  4. The pages are served from a host such as Cloudflare, Vercel or Netlify.

If the front end is static, a publish in WordPress has to trigger a new build, usually with a webhook to the host. If it renders on request, new content appears straight away but you are running server code again, only on a different platform.

The two APIs: REST and WPGraphQL

The WordPress REST API

The REST API is built into WordPress. The WordPress developer handbook describes it as an interface for applications to interact with a site “by sending and receiving data as JSON objects”. Points that matter for a headless build:

  • Endpoints cover what most sites need: /wp/v2/posts, /wp/v2/pages, /wp/v2/media, /wp/v2/categories, /wp/v2/tags, /wp/v2/users, /wp/v2/comments, /wp/v2/search and more, under https://your-site/wp-json/.
  • Public content needs no login. The handbook says the API provides “public data accessible to any client anonymously, as well as private data only available after authentication.”
  • Pagination is capped. per_page accepts 1 to 100, so a build that needs every post has to page through results, using the X-WP-Total and X-WP-TotalPages headers.
  • Authentication for private data. Cookie authentication only works inside WordPress for a logged-in user. For an external front end, WordPress has shipped Application Passwords since version 5.6, used over HTTPS with Basic Auth. Plugins add OAuth or JWT.

WPGraphQL

WPGraphQL is “a free, open-source WordPress plugin that provides an extendable GraphQL schema and API for any WordPress site” (GPL-3). In October 2024 WordPress.org announced that it was becoming a canonical plugin, meaning one maintained in the WordPress.org community. On 30 November 2026 its plugin page listed version 2.29.0 and 30,000+ active installations.

GraphQL lets the front end ask for exactly the fields a page needs, including related data, in one request. An extension, WPGraphQL for ACF, exposes Advanced Custom Fields to the schema, which matters because most content-heavy WordPress sites keep structured data in ACF. Astro’s WordPress guide also mentions Gato GraphQL as an alternative plugin.

Which to pick: the REST API needs nothing installed and is enough for a blog or a set of pages. WPGraphQL is the usual choice when you have custom post types, ACF fields and relations, and it is what Faust.js and the official Next.js WordPress example use.

When headless WordPress is worth it

  • You need a front end WordPress themes cannot give you, such as a design system shared with a web app, or a site that has to load fast on poor mobile connections.
  • Content goes to more than one place: a website, a mobile app, in-store screens or a partner portal, all fed by the same posts.
  • You want the public site to have nothing to attack. With a static front end, the live site is files on a CDN. WordPress can sit behind a firewall or VPN, reachable only by editors and the build.
  • Your editors are attached to WordPress, but your developers want to work in a modern JavaScript framework.
  • Traffic spikes are a problem. A static front end on a CDN does not hit WordPress at all when a page goes viral.

When it is not worth it

Be honest about these before you start:

  • Your site is built with a page builder. Elementor, Divi and similar tools store layout in WordPress and render it through the theme. A headless front end ignores the theme, so every page layout has to be rebuilt in code, and editors lose the visual builder.
  • You rely on plugins that output HTML. Forms, sliders, related-post widgets, cookie banners, SEO plugins and shortcodes all work by changing the theme’s output. Headless removes that output. Each one needs an API-based replacement or custom code (see “Plugin compatibility” below).
  • WooCommerce, memberships or LMS plugins are central. Checkout, carts, logins and course progress are applications, not content. Rebuilding them against an API is a large project.
  • Nobody on the team writes code. Every layout change, new page template or new field now needs a developer.
  • The current site is fast enough and secure enough. Better hosting, fewer plugins and a routine for updates cost far less than a rebuild.

Front-end options

Framework What it is WordPress fit (checked 30 November 2026)
Astro MIT-licensed framework for content-driven sites; static pages by default, server rendering per page with an adapter Official guide for WordPress as a headless CMS, using the REST API. Latest core release 7.4.13 (18 November 2026).
Next.js MIT-licensed React framework from Vercel Official cms-wordpress example with WPGraphQL, Draft Mode previews and on-demand revalidation (its README targets Next.js 14). Latest stable 16.4.6.
Faust.js WP Engine’s “Next.js Headless Toolkit for WordPress” Adds post previews and login on top of Next.js; needs the WPGraphQL and FaustWP plugins. Releases in November 2026.
Gatsby React static site generator, acquired by Netlify in February 2023 gatsby-source-wordpress exists, but Netlify has wound down Gatsby Cloud (announced in 2023) and the latest Gatsby release on GitHub (5.16.1) is from February 2026. Not a good choice for a new project.
Nuxt, SvelteKit Vue and Svelte frameworks Both work with the REST API or GraphQL; there is no WordPress-specific toolkit comparable to Faust.js.

Astro suits content sites best: pages are plain HTML unless a component needs JavaScript, and its docs show fetching posts from /wp-json/wp/v2/posts and building a page per post. In January 2026 the company behind Astro joined Cloudflare; Astro’s announcement says the framework “stays open-source and MIT-licensed” and keeps supporting other hosts. We compare it with WordPress itself in our Astro vs WordPress guide.

Next.js suits teams who already build React apps, or sites that mix content with logged-in features. Draft Mode lets editors “preview unpublished content from a headless CMS”.

Hosting the front end

The WordPress backend still needs PHP hosting. The front end goes to a separate host. The three most common, from their own pricing pages:

Cloudflare Workers Vercel Netlify
Free plan 100,000 requests per day; requests to static assets are free and unlimited Hobby: $0, 1M CDN requests and 100 GB data transfer a month; usage cannot be topped up Free: $0, 300 credits a month
First paid plan $5 a month minimum per account, 10 million requests included Pro: $20 a month per developer seat, with $20 of usage credit Personal: $9 a month (1,000 credits); Pro: $20 a month with unlimited members (3,000 credits)
Static file limits 20,000 files per site on Free, 100,000 on Paid; 25 MiB per file Static traffic counts toward data transfer Bandwidth costs 20 credits per GB; each production deploy 15 credits
Server rendering Yes, with the Astro or Next.js adapters Yes (Function invocations metered) Yes (compute metered in credits)

Two practical notes. On Netlify, every rebuild after a WordPress publish is a production deploy that uses credits, so a busy newsroom pays for its publishing rate as well as its traffic. On Cloudflare, if a Worker runs before static assets (run_worker_first) and you pass the free daily limit, Cloudflare says those requests get a 429 error instead of the static file. Vercel’s Pro plan is priced per developer seat, so cost grows with the team. If you want to see what deploying a static site to Workers looks like, our guide to hosting a site free on Cloudflare Workers walks through it.

The pain points

Previews

In classic WordPress, the Preview button shows the draft in the real theme. Headless breaks that, because the theme is no longer the website. The fixes all take setup:

  • WPGraphQL previews work with an X-GraphQL-Preview header. The request must be authenticated as a user who can edit the post; otherwise WPGraphQL silently returns the published version. Its docs also say there are no previews for people without a WordPress account.
  • Faust.js wires this up for Next.js, so editors can click “Preview” and see the page in the decoupled app.
  • Next.js Draft Mode bypasses caching for preview requests.
  • A fully static front end has no server to render a draft. You either add a server-rendered preview route, keep a second preview deployment, or accept that editors check their work after a rebuild.

Plan for previews from the start: editors judge a headless project mostly by this.

Plugin compatibility

Plugin type What happens in headless Typical fix
SEO (Yoast, Rank Math) Titles, meta and schema are no longer printed by the theme Expose the SEO fields through the API (check what your SEO plugin offers) and output them in the front end
Forms (Contact Form 7, Gravity Forms) The form HTML and submit handler are gone Rebuild the form in the front end and post to the plugin’s API where it has one, a form service or a small serverless function
Page builders Layout is not usable outside the theme Rebuild templates in code; use blocks or ACF fields for structure
Custom fields (ACF) Data is fine, but must be exposed Enable REST output or install WPGraphQL for ACF
Caching and speed plugins Mostly irrelevant for the public site Remove them; caching moves to the front-end host
Shortcodes Arrive as raw [shortcode] text or theme-dependent HTML Replace with blocks or front-end components
WooCommerce Product data is available, cart and checkout are not simple to rebuild Keep a WordPress-rendered checkout, or treat it as a separate commerce project

SEO

Headless does not hurt SEO by itself, and a fast static front end helps Core Web Vitals. The risk is in what you have to rebuild by hand: title tags, meta descriptions, canonical URLs, structured data, the XML sitemap, redirects and robots.txt all used to come from a plugin. Check each one on the new front end before launch, keep URLs the same, and 301 any that change. Make sure the WordPress backend itself is not indexed, or Google may find two copies of every page.

Two systems to run

You now maintain WordPress (core, plugins, PHP hosting and backups) and a JavaScript project (dependencies, builds and a second host). Headless reduces what is exposed to the public, but it does not remove WordPress updates.

What headless WordPress costs

The software is free: WordPress, the REST API, WPGraphQL, Astro, Next.js and Faust.js are all open source. The costs are:

  • WordPress hosting, as today. It can be cheaper if the backend only serves editors and builds, not visitors. WP Engine sells a headless platform with a free sandbox, but its paid price is on request.
  • Front-end hosting: from free (Cloudflare Workers static assets, Vercel Hobby, Netlify Free) to $5–$20 a month or more, per the table above.
  • Development: this is the real cost. Every template, form, preview flow and SEO field the old theme and plugins gave you has to be built.
  • Maintenance: two codebases to keep up to date.

Alternatives: a dedicated headless CMS

If you are rebuilding the front end anyway, ask whether WordPress should stay as the backend. A headless CMS is built for API delivery from the start, with structured content models and preview tooling. Prices from each vendor’s page on 30 November 2026:

CMS Free plan First paid plan Self-host
Contentful Free: 10 users, 100K API calls a month, 10,000 records Lite: $300 a month No
Sanity Free: up to 20 seats, 10,000 documents Growth: $15 per seat a month Studio is open source; content backend is hosted
Strapi Community edition free to self-host (MIT) Strapi Cloud Starter: $35 per project a month; self-hosted Growth: $45 a month with 3 users Yes
Storyblok Starter: 1 seat (up to 2), 20,000 stories, 100k API requests Growth: $99 a month, or $90.75 a month billed yearly, 5 seats No

Stay with WordPress as the backend when your editors, content and custom fields are already there and migrating them would cost more than the API work. Choose a headless CMS when you are starting fresh, or when the content model has outgrown posts, pages and ACF. For a wider look at moving off WordPress entirely, see our WordPress alternatives guide.

A simpler option: drop the backend

Some sites go headless only to get speed and security, then find their editors change a page a month. For those, a fully static site, with content in Markdown files and no WordPress behind it, removes the second system altogether. Beehexa’s AI static website builder moves a WordPress site to a static Astro site on Cloudflare: every old URL is kept and checked, pages are compared with the live site, and you review a preview that search engines do not index before go-live. Forms, site search and stores need a replacement, as they would in any headless build. You can start with a free three-page sample.

FAQ

What is headless WordPress?

It is WordPress used only as a content backend. Editors write in the WordPress dashboard, and a separate front end, such as an Astro or Next.js site, fetches the content through the REST API or WPGraphQL and shows it to visitors.

Is WordPress a headless CMS?

It can be. WordPress has a built-in REST API that serves posts, pages, media and taxonomies as JSON, and the WPGraphQL plugin adds a GraphQL API. It was not designed as a headless CMS, so previews, plugins and custom content models need extra work.

Is headless WordPress faster?

The public site usually is, because pages can be built ahead of time and served from a CDN instead of being assembled by PHP for each visitor. The editing side is not faster, and a static front end adds a build delay before changes go live.

Is headless WordPress more secure?

It reduces what visitors can reach: with a static front end there is no WordPress login or plugin code on the public site, and WordPress can be restricted to your team. WordPress itself still needs updates, and the JavaScript front end adds its own dependencies to keep current.

Is WordPress outdated in 2026?

No. WordPress is actively developed and still a sensible choice for many sites. Headless is one way to keep its editor while modernizing the front end; for small sites, staying on a well-hosted traditional WordPress is often the better trade.

What are the main headless CMS alternatives to WordPress?

Contentful, Sanity, Storyblok and Strapi are widely used. Contentful, Sanity and Storyblok are hosted services with free tiers; Strapi can be self-hosted for free under the MIT licence or run on Strapi Cloud. Compare their plans in the table above.

Sources (checked 2026-11-30)