Skip to main content Scroll Top

Headless WordPress: How It Works, WPGraphQL and the REST API, Next.js and Astro Front Ends, Hosting, Costs, Pros and Cons

Updated September 2026 · Written and maintained by the Progression Agency strategy team

Headless WordPress keeps WordPress as the content editor and replaces the theme with a separate front end, usually Next.js or Astro, that fetches content through the REST API or WPGraphQL. Developers often shorten the setup to headless WP. This guide explains how headless WordPress works, what changes for editors and developers, previews and plugins, hosting for both halves, performance and security gains, costs, the cases where it is worth it and the cases where a well-hosted traditional WordPress site is the better answer.

On this page · 9 sections
  1. How headless WordPress works
  2. What changes for editors
  3. What changes for developers
  4. Performance and security gains
  5. Costs of headless architecture
  6. Headless architecture vs traditional WordPress
  7. Headless architecture vs a dedicated headless CMS
  8. When to go headless with WordPress
  9. How Progression Agency builds headless builds

The short answerGo headless with WordPress when the site must be very fast and secure, when content feeds more than one channel, when the front end is a custom React or Astro build anyway, or when the site is a product with logged-in features. Stay traditional when marketers must build pages with blocks and page builders unaided, when plugin-driven features (forms, memberships, WooCommerce) are central, or when the budget is under about $25,000. Typical stack: WordPress on managed hosting as the CMS, WPGraphQL, Next.js on Vercel or Astro on Cloudflare Pages, with webhooks rebuilding or revalidating pages on publish.

Comparisons are based on each project’s official documentation. Progression Agency builds with all of the technologies compared.

How headless WordPress works

WordPress runs as usual (admin, editors, media, plugins for content types) but nobody visits its theme; a separate front end requests content through the WordPress REST API or the WPGraphQL plugin and renders pages itself. On publish, WordPress calls a webhook that rebuilds static pages or revalidates cached ones. The admin can be hidden from the public internet entirely. See headless CMS vs traditional CMS for the general architecture.

Headless WordPress architectureHeadless WordPress architecture
Publish triggers a webhook that rebuilds or revalidates the front end.

WordPress as a headless CMS

Is WordPress a headless CMS? Not out of the box. A standard install renders its own pages through a theme, so it only behaves as a headless system once you stop using the theme for the public site and read the content through an API instead. Can WordPress be used as a headless CMS? Yes, because it already ships with a REST API, and the WPGraphQL plugin adds a GraphQL endpoint. Used this way, WordPress as headless CMS keeps the editor, users, media library and most plugins that manage content, and gives up the theme, the page builders and any plugin that outputs front-end markup.

What changes for editors

Content editing in the block editor stays the same; page building does not. Blocks render through the front end’s components, so new layouts need developer work, page builders such as Elementor stop meaning anything, and previews must be wired up (WPGraphQL preview support, Next.js draft mode, or WP Engine’s Faust.js). Editors gain speed and reliability and lose some independence.

What changes for developers

The front end is a normal Next.js or Astro project: routing, components, data fetching from WPGraphQL, image handling through the framework, SEO metadata from Yoast or Rank Math exposed via their GraphQL extensions, and forms handled by the front end or an API. Plugins that inject markup or scripts into the theme do nothing; plugins that model content (ACF, custom post types) matter more. See Next.js vs React and Astro vs Next.js.

Decoupled setup stack choices
LayerCommon choiceNotes
CMS hostingManaged WordPress host (Kinsta, WP Engine, Pressable) or a locked-down VPSAdmin can be IP-restricted; see WordPress hosting guide
APIWPGraphQL (plus ACF and Yoast extensions) or RESTGraphQL is easier for typed front ends
Front endNext.js (App Router) or AstroNext.js for apps, Astro for content sites
Front-end hostingVercel, Cloudflare Pages, NetlifySee Vercel vs Netlify
PreviewsNext.js draft mode with WPGraphQL, or Faust.jsMust be planned, not bolted on
RebuildsWebhooks on publish to trigger ISR revalidation or a rebuildSeconds to minutes
Forms and searchFront-end forms to an API; Algolia, Meilisearch or WP search via APITheme-dependent plugins do not apply
MediaWordPress media library served via CDN, optimized by the frameworkCloudflare or the host CDN in front

Headless WordPress with Next.js

Next.js is the most common front end for this setup. It fetches posts and pages from WPGraphQL or the REST API, builds them ahead of time or regenerates them on a schedule, and serves them from an edge network. People write it as headless WordPress Nextjs or headless WordPress Next JS, and both describe this same stack. The pieces to plan for are preview of unpublished posts, a webhook that tells the front end when content changes, image handling and a routing scheme that mirrors your WordPress permalinks, so no existing URL is lost at launch.

Performance and security gains

The public site becomes static or edge-rendered HTML with a small JavaScript footprint, which is why headless builds sites usually pass Core Web Vitals comfortably. The WordPress admin and PHP runtime can sit behind authentication or an IP allowlist, removing the most attacked surface of a WordPress site from the public internet. See speed optimization and website security services.

Costs of headless architecture

Headless architecture costs more than a themed WordPress site because the front end is custom code and previews have to be built, and the ranges below are the price figures we use.

Decoupled setup cost (US price figures)
ItemRangeNotes
Build (business site, 20-50 pages)$25,000-$90,000Custom front end plus content modeling and previews
CMS hosting$20-$300 per monthManaged WordPress host
Front-end hosting$0-$200 per monthStatic is nearly free; SSR costs usage
Layout changesDeveloper timeMarketers edit content, not layouts
Maintenance$150-$800 per monthTwo systems; see WordPress maintenance services

Market ranges only.

Edit: Familiar editing. Block editor stays..
GQL: WPGraphQL. Typed content API..
Fast: Fast front end. Static or edge..
Private: Private admin. Off the public web..
Cost: Higher build. Two systems..
Fit: Fit. Speed, channels, products..

Pricing depends on scope and is confirmed in a written proposal. Published prices are subject to change.

Headless WordPress hosting

Two decisions, not one, make up headless WordPress hosting. The WordPress back end needs a host that runs PHP and a database reliably, such as a managed WordPress host or a small VPS, and it can be locked down so that only the front end and your editors can reach it. The front end needs a host for the JavaScript framework, such as Vercel, Netlify, Cloudflare Pages or your own server. Where to host headless WordPress depends on traffic and team: a static-first front end on an edge platform is cheap and fast, while a server-rendered front end needs compute that scales with visitors. Budget for both bills, plus the webhook between them, before comparing it with a single traditional host.

Headless architecture vs traditional WordPress

The difference between headless and traditional WordPress is who renders the page: WordPress itself, or a separate front end reading its API. The table shows what that changes for editors, developers and hosting.

Headless or traditional WordPress?
Traditional WordPressHeadless architecture
Page building by marketersYes (blocks, builders)Limited to designed components
Plugins for featuresFull ecosystemContent-modeling plugins only
PerformanceDepends on hosting and themeExcellent by default
Security surfacePublic PHP siteAdmin can be private; public site static
Multi-channel contentVia API, with effortNative
Build costLowerHigher
Best forMarketing sites, plugin-driven featuresFast custom sites, products, multi-channel

Headless architecture vs a dedicated headless CMS

Headless builds wins when the team already knows WordPress and the content lives there; Sanity, Storyblok or Payload win when you are starting fresh and want purpose-built modeling, previews and hosting without running WordPress at all. See best headless CMS platforms.

When to go headless with WordPress

Go headless with WordPress only when speed, multi-channel content or a custom front end demands it; most sites are better served by a well-hosted traditional install. The cases that justify it:

  • The site must be among the fastest in its category and pass Core Web Vitals without tuning.
  • Content feeds an app, kiosks, partner sites or several brands.
  • The front end is a Next.js or Astro build anyway (product site, portal, custom design).
  • Security policy wants the CMS off the public internet.
  • Editors are happy editing content and do not need to build pages themselves.

How Progression Agency builds headless builds: headless WordPress development

Managed WordPress hosting for the CMS with WPGraphQL and ACF, a Next.js or Astro front end on Vercel or Cloudflare, previews and webhooks wired up, and a migration path that keeps URLs and rankings. See WordPress development company, Next.js development company and website migration services.

Thinking about headless architecture?

Tell us who edits the site and what it must do; we will say whether headless is worth it and quote both routes.

Get a recommendation

Frequently asked questions

What is headless WordPress?
Using WordPress only as a content editor and API, with a separate front end (Next.js or Astro) rendering the site.
Headless CMS vs WordPress: which should I choose?
In the headless CMS vs WordPress question, choose traditional WordPress when marketers must build pages and plugins drive features; choose headless architecture or a dedicated headless CMS when speed, security, multi-channel content or a custom front end come first.
Is headless architecture better?
For speed, security and multi-channel content, yes; for marketer page-building and plugin-driven features, traditional WordPress is better.
What is WPGraphQL?
A plugin that exposes WordPress content through a GraphQL API, the common choice for headless front ends.
Can editors still use the block editor?
Yes for content; layouts render through the front end’s components.
Do WordPress plugins work with headless?
Content-modeling plugins (ACF, custom post types, Yoast data) do; theme-dependent plugins (page builders, most forms) do not.
Is headless architecture good for SEO?
Yes; the front end serves fast, complete HTML and metadata can come from Yoast via GraphQL.
How much does headless builds cost?
$25,000-$90,000 (market range) to build a business site, plus hosting for two systems and maintenance.
Where do you host decoupled setup?
WordPress on a managed host, the front end on Vercel, Cloudflare Pages or Netlify.
Do previews work in decoupled setup?
Yes when built in: Next.js draft mode with WPGraphQL, or WP Engine’s Faust.js.
Can WooCommerce go headless?
Yes, through the WooCommerce Store API and WPGraphQL for WooCommerce, but it is a larger project; see Shopify vs WooCommerce.
Decoupled setup or Sanity?
Decoupled setup if the team and content are already in WordPress; Sanity if starting fresh with a developer-led team.
Can I migrate my WordPress site to headless?
Yes, keeping WordPress as the CMS and rebuilding the front end, with redirects preserved.
Does Progression Agency build decoupled setup sites?
Yes, with Next.js or Astro front ends.
Is WordPress headless CMS use common?
Yes. WordPress headless CMS setups are common on publisher and marketing sites where editors want the WordPress editor and developers want a Next.js or Astro front end. WPGraphQL and the REST API make WordPress a capable headless CMS; the trade-offs are covered above.
Is headless WordPress more secure?
Often, because visitors reach a separate front end and not the WordPress login, themes and plugins. But the back end still holds your content and users, so it needs patching, restricted access and strong authentication. Headless reduces exposure; it does not make a site secure by itself.
How do you set up headless WordPress?
Install WordPress as the content back end, enable the REST API or add WPGraphQL, and build a front end in a framework such as Next.js or Astro that fetches content from it. Then set up preview, a content-change webhook, image handling and redirects that preserve existing URLs.
Where should you host headless WordPress?
Host the back end on a managed WordPress host or a small VPS, restricted to editors and the front end. Host the front end on a platform made for it, such as Vercel, Netlify or Cloudflare Pages. You pay for both, so compare the total against a single traditional host.

Planning a website or web app?We design, build, deploy and host custom websites, React and Next.js applications and WordPress sites, with a written scope first.

Get a web proposal

Get a free marketing proposal

Tell us what you are trying to grow and we will come back with a plan, not a pitch deck. Same-day reply on weekdays.

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.
Contact Us