Someone on your team has suggested going headless. Maybe the WordPress site feels slow, or the developers want to build in React or Astro and leave PHP templates behind.
The decision is expensive to reverse. Headless WordPress keeps WordPress as the editor and moves the pages your visitors see to a separate front end, so previews, forms, SEO tags and redirects all have to be rebuilt there. A team that picks it for the wrong reason pays for 2 systems to get what a caching plugin would have delivered.
Our advice is to stay on classic WordPress unless a specific condition applies, such as a design system shared with a product or one content source feeding several front ends. We'll start with the architecture itself, because every later choice depends on it.
Want this built instead of researched? Our headless WordPress development service plans and builds the whole stack. We also ship Next.js and React front ends and Astro content platforms, with draft previews wired in for your editors.
What Is Headless WordPress?
Headless WordPress is a setup where WordPress manages the content and a separate application renders the pages. The "head" is the theme layer. Without it, WordPress works as a content API with an admin screen.
On a classic site, one system does both jobs. An editor saves a post in wp-admin and the active theme turns it into HTML for the visitor. On a headless site the editor still works in wp-admin, but a front end built in a JavaScript framework reads the content over an API and renders the HTML itself.

A headless build has 4 parts:
- WordPress backend: the admin, database, media library, users, custom post types and custom fields.
- API layer: the built-in REST API or the WPGraphQL plugin, which hand the content out as JSON.
- Front end: a Next.js, Astro, Nuxt or SvelteKit app that fetches that JSON and builds the pages.
- Edge or CDN: the network that serves the finished pages from a location close to the visitor.
You will also see the word decoupled. It usually describes a site where WordPress still renders some pages and an app handles the rest. On a fully headless site, the theme renders nothing a visitor sees.
Headless WordPress Architecture and Rendering Modes
The front end can build a page at 4 different moments. That choice decides how fast the site feels and how soon an edit goes live.
Rendering mode | When the page is built | When an edit goes live | Good fit |
|---|---|---|---|
Static generation | Once, at build time | After the next build | Blogs, docs and marketing pages |
Incremental regeneration | At build time, then again in the background on a timer or a webhook | Within seconds to minutes | Large content sites |
Server rendering | On every request | Immediately | Personalized and logged-in pages |
Client-side fetching | In the browser, after the page loads | Immediately | Dashboards and widgets, and a poor fit for pages that need to rank |
Most headless WordPress sites mix these modes. Posts and pages are static or regenerated in the background, while search results, carts and account screens are rendered on the server.
The mode also sets what an editor sees after clicking Publish. On a fully static site nothing changes until a build finishes, so we'd plan the update path before choosing a framework.
When Headless WordPress Pays Off
Headless earns its extra work in a small set of cases. These are the ones where we'd recommend it:
- A design system shared with a product. The marketing site and the app use the same React or Vue components, and the team wants one front-end codebase.
- Several front ends from one content source. A website, a mobile app and in-store screens all read the same posts and products.
- A front-end team that already works in a framework. The developers ship Next.js or Astro every day, and the editors want to keep the WordPress editor.
- Large static sites. Tens of thousands of templated pages are built ahead of time and served as files from a CDN.
- A locked-down backend. WordPress sits behind a login or a firewall and never receives public traffic, which leaves attackers much less to reach.
When to Stay on Classic WordPress
For most sites, classic WordPress with good caching is faster to build and cheaper to run. We'd stay classic in these cases:
- A brochure site or a small marketing site. A block theme and a page cache already serve it as static HTML.
- A site that runs on plugins. WooCommerce checkout, memberships, courses, bookings and form builders all render through the theme. Each one needs custom front-end work once the theme is gone.
- No front-end developer on the team. Someone has to own the JavaScript app, its dependencies and its deploys for as long as the site lives.
- Speed is the only complaint. A slow WordPress site usually has a caching, image or hosting problem, and a new architecture fixes none of those directly.
If speed is the reason, our WordPress speed optimization guide and our comparison of WordPress caching plugins are the cheaper first step. A modern WordPress block theme also loads CSS only for the blocks a page uses.
A page cache makes classic WordPress serve static HTML too. So the speed gap between a well-cached classic site and a headless one is often smaller than a sales pitch suggests.
WPGraphQL vs REST API
WordPress can hand content to a front end in 2 ways. The REST API is part of WordPress core and answers at /wp-json/. WPGraphQL is a free plugin that adds a single /graphql endpoint, where each query names the exact fields it wants.
WPGraphQL has solid backing. It became a canonical plugin on WordPress.org in October 2024, when its creator Jason Bahl joined Automattic to keep working on it. It is now on version 2 and runs on more than 30,000 sites.
Aspect | REST API | WPGraphQL |
|---|---|---|
Setup | Built into WordPress core | Free plugin |
Request shape | One URL per resource | One endpoint, and one query can fetch nested data |
Trimming the response |
| Each query lists its own fields |
Custom fields from ACF | A "Show in REST API" setting on each field group | The WPGraphQL for ACF plugin |
Menus | Need an authenticated request | Public for menus assigned to a theme location |
TypeScript types | Mostly written by hand | Generated from the schema |
Caching | Standard HTTP caching on GET requests | WPGraphQL Smart Cache stores GET queries and clears them when content changes |
Good fit | Simple sites, mobile apps and automation | Component-driven front ends with nested data |
The 2 calls below fetch the 5 latest posts with only the fields a listing page needs. Both run in Node 18 or later and inside any of the frameworks covered next.
// REST API: 5 latest posts, trimmed with _fields
const url = 'https://cms.example.com/wp-json/wp/v2/posts'
+ '?per_page=5&_fields=id,slug,title,excerpt,date';
const res = await fetch(url);
if (!res.ok) throw new Error(`REST request failed: ${res.status}`);
const posts = await res.json();
console.log(posts.map((post) => post.title.rendered));// WPGraphQL: the same 5 posts from the /graphql endpoint
const query = `
query LatestPosts($first: Int!) {
posts(first: $first) {
nodes { id slug title excerpt date }
}
}
`;
const res = await fetch('https://cms.example.com/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query, variables: { first: 5 } }),
});
const { data, errors } = await res.json();
if (errors) throw new Error(errors[0].message);
console.log(data.posts.nodes.map((post) => post.title));We'd use WPGraphQL for a new build whose pages pull posts, authors, categories, menus and custom fields together. One query replaces several REST calls, and the schema generates the TypeScript types.
We'd use the REST API when the front end is simple, when the client is a mobile app or an automation tool or when nobody on the team has written GraphQL. Our WordPress REST API guide covers its routes, authentication and caching in detail.
Front-End Frameworks for Headless WordPress
These 4 frameworks cover almost every headless WordPress build in 2026. The team's existing skills should decide more than any benchmark.
Framework | Built on | Current major version | We'd choose it for |
|---|---|---|---|
Next.js | React | 16 | Product-led sites and interactive front ends |
Astro | Its own component format, with React, Vue or Svelte for interactive parts | 7 | Content sites |
Nuxt | Vue | 4 | Teams that already write Vue |
SvelteKit | Svelte | 3 | Small projects with Svelte experience in house |
Next.js
Next.js is the React framework most headless WordPress projects start with. Version 16 arrived in October 2025. Its App Router can build a page ahead of time, render it on the server or regenerate it in the background, all from the same codebase.
2 features matter for WordPress in particular. Draft Mode lets an editor view unpublished content on the real front end. On-demand revalidation rebuilds a single page when a webhook reports that a post changed.
Faust.js is WP Engine's open-source toolkit for Next.js and WordPress. It is still maintained: WP Engine rebuilt it from scratch, and its WordPress plugin received an update in October 2026. It adds post previews and a WordPress-style template hierarchy, so we'd consider it when the team wants a library to handle those.
We'd choose Next.js when the team writes React, when the site shares components with a product or when the front end needs filters, search and account screens.
Astro
Astro is built for content sites. It renders pages to HTML and sends JavaScript only for the components that need it, which suits blogs, magazines, documentation and marketing pages.
Astro 7 shipped in June 2026 with a compiler rewritten in Rust for faster builds. Since Astro 6, live content collections can fetch content at request time with no rebuild, next to the usual build-time collections.
The company behind Astro joined Cloudflare in January 2026. Astro stays MIT-licensed and still deploys to other hosts. We'd choose Astro when the site is mostly content with a few interactive parts.
Nuxt
Nuxt is the Vue counterpart to Next.js, with the same mix of static, server and hybrid rendering. Nuxt 4 has been the current major version since July 2025, and Nuxt 3 reached end of life on July 31, 2026. We'd choose Nuxt only when the team already writes Vue.
SvelteKit
SvelteKit compiles components into small bundles and reached version 3 in October 2026. Its WordPress ecosystem is thinner, with fewer starters and helper libraries, so the team builds previews and data fetching itself. We'd choose it for a small project with Svelte experience in house.
What Breaks When You Go Headless
The theme does more than draw pages. When it goes away, these features go with it and have to be rebuilt on the front end.
Feature | What happens | The usual fix |
|---|---|---|
Post previews | The Preview button still opens the old theme URL | Next.js Draft Mode or Faust.js previews, with the preview link pointed at the front end |
Forms | Form plugins render through the theme | A form built in the front end that posts to the plugin's REST endpoint or to a form service |
Menus | The REST API hides menus from anonymous requests | WPGraphQL, or a small custom REST route |
Block content | Posts arrive as rendered HTML without the theme's block styles | Block CSS loaded on the front end, or blocks queried as data with WPGraphQL Content Blocks |
Comments | The theme's comment form disappears | A form that posts to the comments endpoint, or a hosted comment tool |
Search | Theme search templates are gone | A search page that queries the API, or a search service |
Plugins that print HTML | Popups, chat widgets, related posts and ad inserts never reach the visitor | Each one rebuilt, or its script loaded on the front end |
Redirects | Redirect plugins only act on the WordPress domain | The same rules copied into the front end's redirect config |
Contact Form 7 and Gravity Forms both accept submissions over REST, so the form itself can move to the front end while entries and notifications stay in WordPress.
Authentication needs a decision early. These are the options we'd weigh:
- Server-to-server requests: Application Passwords, built into WordPress since version 5.6, are the method the WPGraphQL documentation recommends.
- Visitor logins: a JWT plugin such as WPGraphQL JWT Authentication, or Headless Login for WPGraphQL when visitors sign in through an OAuth provider.
- Secrets: every credential stays in a server-side environment variable and never ships in browser code.
Caching and Revalidation
Caching decides whether editors trust the site. A headless page is fast because it was built ahead of time, and for the same reason an edit can sit unseen until something rebuilds that page.
These are the 3 patterns we'd choose between:
- Rebuild on publish. A webhook from WordPress triggers a full build. This is simple and works well for a few hundred pages.
- On-demand revalidation. WordPress calls a front-end endpoint on save, and the framework regenerates only the affected pages. In Next.js, that endpoint calls
revalidatePathorrevalidateTag. - Request-time content. The front end fetches from WordPress on each request, and the CDN caches the response for a short time. Astro's live content collections and server-rendered routes work this way.
The API needs its own cache as well. WordPress boots PHP and queries the database for every uncached API call, so a build that requests thousands of pages can overload a small server. A persistent object cache helps both APIs, and WPGraphQL Smart Cache stores GET query results until the related content changes.
SEO for Headless WordPress
A headless site can rank as well as a classic one, because Google indexes the HTML the front end serves. The risk is that the SEO plugin keeps working inside WordPress while none of its output reaches that HTML.
We'd check these 6 items before launch:
- Titles, descriptions and schema. Yoast SEO adds a
yoast_head_jsonfield to REST responses by default, and the WPGraphQL Yoast SEO Addon exposes the same data to GraphQL. Rank Math needs its Headless CMS Support setting switched on, and then returns the head tags from/wp-json/rankmath/v1/getHead?url=. Rank Math has no built-in GraphQL support. - Canonical URLs. Every canonical and Open Graph URL should point to the front-end domain and never to the WordPress one.
- Sitemaps. The sitemap has to live on the front-end domain. The framework can generate it, or the front end can proxy the WordPress sitemap with the URLs rewritten.
- Redirects. Rules stored in a WordPress redirect plugin need a copy on the front end.
- The WordPress backend. The backend domain should be closed to search engines. Otherwise Google can index the same content on 2 domains.
- Rendered HTML. Content that matters for ranking belongs in the static or server-rendered HTML. Content fetched in the browser after load is easy for crawlers to miss.
Our roundup of the best SEO plugins for WordPress compares Yoast SEO and Rank Math in more depth.
Headless WordPress Hosting
A headless site has 2 hosting bills, because the backend and the front end need different things.
- WordPress backend: any managed WordPress host with a persistent object cache. The backend serves editors and API calls, so it sees far less traffic than a classic site would.
- Front end: Vercel, Netlify and Cloudflare Workers all host static and server-rendered apps, and each has a free tier to start on. A Node server on a VPS also works when the team wants full control.
- One vendor for both: WP Engine sells a headless platform that hosts the WordPress backend and a Node.js front end together, which gives the team one support desk for both halves.
These are the hosting practices we'd follow on any provider:
- WordPress on its own subdomain such as
cms.example.com, with the main domain pointed at the front end. - The backend closed to search engines, and wp-admin limited to the team.
- GraphQL queries sent as GET requests where the host supports it, so the network cache can store them.
- Public schema introspection left off, which is the WPGraphQL default.
- Images served through a CDN or the framework's image component, and not straight from the WordPress server.
Our best managed WordPress hosting comparison covers the backend side.
Headless WordPress Cost
Headless costs more than a classic build of the same site, and the gap comes from labor more than hosting. Front-end hosting for a small site can start on a free tier. Developer time has no free tier.
This is where the extra money goes:
Cost line | Classic WordPress | Headless WordPress |
|---|---|---|
Build | One theme | A front-end app plus the WordPress setup |
Features the theme provides | Included | Previews, forms, search, menus and redirects rebuilt by hand |
Hosting | One host | A WordPress host and a front-end host |
Ongoing updates | WordPress core, the theme and plugins | The same, plus framework upgrades and npm dependencies |
People | A WordPress developer | A WordPress developer and a JavaScript developer, or one person who is both |
Framework upgrades deserve their own line in the budget. Next.js, Astro and SvelteKit each shipped a new major version between October 2025 and October 2026, and Nuxt 3 reached end of life in July 2026.
We'd ask any agency for a quote that lists these lines separately. A single headless price hides which features are being rebuilt and which are being dropped.
Should You Go Headless?
If you are still unsure, we'd let your list of reasons decide. Our suggestion is to write down what you expect headless to fix and check each item against the conditions above.
If the list is mostly about speed, classic WordPress with proper caching is the better buy, and a comprehensive website audit will show where the time goes. If the list includes a shared design system, several front ends or a team that already ships a JavaScript framework, headless WordPress is a sound choice. In that case the extra cost buys something specific.
FAQs on Headless WordPress
Is headless WordPress faster than regular WordPress?
It can be, because the pages are built ahead of time and served from a CDN. A classic WordPress site with a page cache also serves static HTML, so the gap is often small. Headless helps most when the front end needs heavy interactivity or has to share code with an app.
Is headless WordPress good for SEO?
Yes, as long as the front end sends complete HTML. The titles, descriptions, canonical URLs, schema, sitemap and redirects that the SEO plugin produces inside WordPress all have to be carried over to the front end. We'd also block the WordPress backend domain from indexing, so Google doesn't find the same content twice.
Do WordPress plugins work with headless WordPress?
Plugins that store data or extend the API keep working. Custom field, custom post type and SEO plugins fall in this group. Plugins that print HTML through the theme stop reaching visitors, which covers popups, chat widgets, related posts and most form builders. Each of those needs a front-end replacement.
Can I use WooCommerce with headless WordPress?
Yes, but it is the hardest kind of headless build. The WooCommerce Store API exposes products, the cart and checkout over REST, and the front end has to rebuild the cart, checkout, account pages and every payment step on top of it. We'd keep most stores on classic WooCommerce and reserve headless for teams with a dedicated front-end developer.
Do I need WPGraphQL for headless WordPress?
No. The REST API is part of WordPress core and can power a complete headless site. WPGraphQL is a free plugin that becomes worth adding when pages combine posts, authors, menus and custom fields, because one query can fetch all of them.
Is Faust.js still maintained?
Yes. WP Engine rebuilt Faust.js from scratch and still releases updates. Its WordPress plugin was last updated in October 2026. Faust.js works with Next.js and handles post previews and a WordPress-style template hierarchy.
Can editors still preview posts on a headless site?
Yes, once the preview route is set up. In Next.js, Draft Mode lets a logged-in editor see unpublished content on the real front end, and Faust.js ships previews out of the box. We'd plan this before launch, because the default Preview button still points at the old theme.
Is headless WordPress worth it for a small site?
Usually not. A small marketing site or blog gets close to the same speed from a block theme, a page cache and a CDN, with one system to maintain instead of two. We'd consider headless for a small site only when it has to share components with a product.
Can I move back from headless to classic WordPress?
Yes. The content never left WordPress, so moving back means building or installing a theme and pointing the main domain at WordPress again. We recommend keeping the same URL structure on both sides, so a move in either direction needs no redirects.



