What Is Headless WordPress and Should You Use It?
WordPress is often treated as a complete website system, but it does not have to control the experience visitors see. In a headless setup, teams keep WordPress for content management while replacing its theme layer with a separate frontend built in a framework such as Next.js.
That architectural freedom can support faster experiences, more flexible interfaces and content delivery across multiple channels. However, it also introduces another application, deployment pipeline, hosting layer and set of technical decisions to manage.
This guide explains how headless WordPress works and what it changes for developers and content teams.
How does a headless WordPress architecture work?
Headless WordPress is a setup where WordPress manages content while a separate frontend, built in a framework like Next.js, controls what visitors see – separating content management from presentation.
WordPress remains the backend where teams create, organize and publish content, but its theme no longer generates the public website. A separate frontend application controls the URLs, page layouts, components and experience delivered to visitors.
A headless setup is worth considering when the frontend has requirements that a conventional WordPress theme cannot meet efficiently. It is a strong fit for organizations that need to publish the same content across websites, apps, kiosks or other channels, build highly customized interfaces, support multiple brands or regions or give frontend teams independent control over rendering and releases.
It is also more realistic for teams with dedicated developers who can maintain WordPress, APIs, JavaScript frameworks, previews, caching and deployment pipelines over time.
The WordPress headless architecture typically works like this:
- Editors manage content in WordPress: Posts, pages, media, taxonomies, custom post types and structured fields remain in the WordPress database and are managed through the familiar admin interface.
- WordPress exposes that content through an API: The frontend requests the content it needs through the WordPress REST API or a GraphQL endpoint provided by WPGraphQL. The REST API is included in WordPress core and exchanges data with external applications using JSON.
- The frontend turns the data into pages: A framework such as Next.js retrieves the content and renders the HTML visitors receive. Pages may be generated during a build, rendered when someone requests them or regenerated selectively after content changes. Headless does not automatically mean that every page is static or that the site behaves like a client-rendered single-page application.
- Publishing triggers a content refresh: Depending on the rendering strategy, new content may appear immediately on the next request, after a scheduled revalidation period or when WordPress sends a webhook that tells the frontend to rebuild or refresh the affected page.
This setup gives teams more control over the frontend, but it also means WordPress and the public website no longer share the same rendering layer. Features that a traditional theme or plugin would normally handle automatically, such as previews, search, forms, redirects, SEO metadata and cache updates, must be connected to the frontend deliberately.
Choosing between the REST API and WPGraphQL
Headless WordPress commonly exposes content through either the WordPress REST API or WPGraphQL. Both can support production websites and neither is automatically faster. The right choice depends on how the frontend needs to retrieve content, how complex the content model is and how the team plans to cache and maintain the API layer:
- Choose the WordPress REST API for a simpler, core-first setup: The WordPress REST API is included with WordPress and exposes resources such as posts, pages, media and taxonomies through predictable URLs that return JSON. This works well for sites whose pages mostly map to individual WordPress resources and for teams that are comfortable making several straightforward requests. Developers can use _fields to limit the response and _embed to include related resources such as authors or terms, although heavily structured pages may still require custom fields, additional endpoints or multiple requests.
- Choose WPGraphQL when the frontend needs precise, interconnected data: WPGraphQL is a plugin that adds a typed GraphQL schema to WordPress. Instead of requesting a predefined endpoint response, the frontend describes the exact fields and related objects it needs and the returned data follows the same shape as the query. That makes it particularly useful for component-based applications where one page may combine content from several post types, taxonomies, menus, authors and structured field groups.
Neither option removes the need for API design. Large REST responses can transfer unnecessary data, while deeply nested GraphQL queries can increase processing work and become harder to cache or debug.
The best choice is the API your team can extend, secure, cache and maintain reliably over the life of the site:
- For a relatively conventional content site, the REST API is often the most direct starting point.
- For a content-heavy application with reusable components and complex relationships, WPGraphQL can reduce frontend data plumbing and keep queries aligned with the content model.
Performance, Core Web Vitals and SEO in a headless setup
Headless WordPress can create a faster frontend, but separating WordPress from the presentation layer does not improve performance or SEO by itself. The advantage is control – developers can decide how each page is rendered, cached and delivered instead of sending every public request through a WordPress theme.
For performance, the rendering strategy has the greatest architectural impact:
- Articles, landing pages and documentation can be generated ahead of time and served from a content delivery network (CDN).
- Incremental Static Regeneration can refresh individual pages after content changes without rebuilding the entire site.
- Personalized or frequently changing pages can use server-side rendering, although those responses may still need caching to avoid slow server response times.
The right approach often combines these methods rather than applying one rendering model to every page.
The frontend implementation determines whether that architecture translates into good Core Web Vitals. Google defines a good experience as:
- Largest contentful paint (LCP) of 2.5 seconds or less, measuring how quickly the main content becomes visible.
- Interaction to next paint (INP) of 200 milliseconds or less, measuring responsiveness to user interactions.
- Cumulative layout shift (CLS) of 0.1 or less, measuring unexpected movement while the page loads.
These targets should be met at the 75th percentile of real visits, evaluated separately for mobile and desktop users.
Pre-rendered HTML, CDN delivery, optimized images and reduced dependency on PHP execution can help LCP. However, a JavaScript-heavy frontend can produce poor Interaction to Next Paint, while late-loading fonts, images without reserved dimensions and dynamically inserted components can increase layout shift. Teams therefore need to control bundle size, limit unnecessary client-side hydration, optimize media and measure real-user data rather than assuming that a React or Next.js build is automatically fast.
SEO responsibilities also move to the frontend. Google can process JavaScript, but important content and links should be present in the rendered HTML rather than depending entirely on browser-side requests.
The frontend must correctly generate:
- Page titles and meta descriptions.
- Canonical URLs and robots directives.
- Structured data.
- XML sitemaps.
- Redirects.
- Language annotations for multilingual sites.
An SEO plugin running in WordPress cannot automatically insert this information into HTML produced by a separate frontend. Its settings must be exposed through the API and rendered by the frontend application.
So, while headless WordPress provides more control over performance and technical SEO, the results depend on choosing appropriate rendering methods, caching effectively, minimizing frontend overhead and rebuilding the SEO capabilities that a conventional WordPress theme would normally provide.
What changes for content editors and marketing teams?
A headless architecture can preserve the familiar WordPress editing interface, but it changes the connection between what editors create and what visitors ultimately see. Here’s what changes:
- The editor is no longer a guaranteed visual representation of the page: Gutenberg still provides a block-based authoring interface, but the frontend controls the final markup and styling. Teams should provide purpose-built blocks, patterns or structured fields that map directly to frontend components. Content-only editing and block locking can prevent accidental layout changes while keeping text and media editable.
- Previewing requires a deliberate integration: WordPress can supply unpublished content, but the frontend must authenticate the request and render the draft. Next.js Draft Mode, for example, temporarily bypasses static output so an authorized editor can view unpublished changes without rebuilding the whole site.
- Publishing may not update the website immediately by default: Static or cached pages need a webhook, on-demand revalidation or another cache-invalidation process. Editors should receive clear confirmation that the frontend has refreshed and visible error reporting when it has not.
- Marketing plugins must be evaluated feature by feature: A plugin may still store SEO fields, form submissions, redirects or campaign settings in WordPress, but its theme output and browser scripts will not automatically appear on the separate frontend. Developers must expose the required data through the API and recreate or integrate the visitor-facing functionality.
The best headless editorial experience hides this architectural complexity. Before launch, teams should test previews, scheduled publishing, revisions, redirects, forms, analytics and campaign launches with the people who will use them – not only with developers.
Hosting and maintaining two systems instead of one
Headless WordPress creates two applications, but it does not have to create two separate operating models. The usual setup places WordPress with one provider and the Next.js frontend with another, then adds separate CDN, monitoring, security and support services. That leaves teams coordinating environments, deployments, permissions, caching, billing and troubleshooting across several vendors.
Alternatively, Pantheon keeps WordPress and Next.js properly decoupled while bringing them into one WebOps platform. Editors continue managing content in WordPress, developers continue building a standard Next.js application and both sides move through a shared workflow rather than separate hosting silos.
With Pantheon, teams get:
- A managed Next.js runtime: Pantheon runs applications in isolated, production-grade containers with horizontal scaling. It supports Server Components, Server Actions, Middleware, image optimization and ISR without forcing teams to rebuild a standard Next.js application around proprietary conventions.
- Cache invalidation that spans both systems: The Next.js Cache Handler (@pantheon-systems/nextjs-cache-handler on npm) connects Next.js's revalidateTag() and revalidatePath() calls to Pantheon's persistent cache and Global CDN. A webhook from WordPress or Drupal can trigger revalidation for just the routes and tags that changed, clearing them across every container and at the edge instead of waiting for a full rebuild.
- One workflow for the complete stack: Pantheon’s Dev, Test, Live workflow provides a defined path to production, while Multidev creates isolated Next.js environments for pull requests and selected branches. GitHub commits trigger builds, and teams can manage environment-specific secrets and inspect logs centrally.
- More flexible content workflows: Pantheon’s Content Publisher adds another publishing workflow; content teams can draft, collaborate, preview, approve and publish from Google Docs or Microsoft Word to a Next.js site without copying content manually or waiting for a developer deployment.
- Fewer vendors and more predictable operations: WordPress hosting, Next.js hosting, CDN delivery, monitoring, environments and WebOps support sit under one platform, price structure and invoice. That replaces usage-based surprises and divided support ownership with predictable traffic tiers and one team responsible for the stack.
Pantheon simply removes much of the infrastructure assembly around a headless architecture, so teams can focus on the content model, frontend experience and release process instead of maintaining the connections between several platforms.
For instance, SPS Commerce’s WordPress marketing site already ran on Pantheon, while SupplierWiki’s Next.js frontend ran on Netlify. Managing roughly 1,600 pages across five languages meant coordinating two dashboards, support relationships, billing arrangements and deployment models for one user-facing website. To fix that, SPS moved SupplierWiki to Pantheon, bringing WordPress and Next.js together on one platform. The team integrated the Next.js Cache Handler to coordinate invalidation between the two systems, so content updates from WordPress appear on the frontend quickly and reliably, and gained the operating model its content-heavy site had been missing.
We've been using Pantheon for over 12 years, and that boosted a lot of our confidence. When Next.js became available on Pantheon, having that opportunity to consolidate our services was a no-brainer for us.”
– Ryan Walker, Development Manager, SPS Commerce
The total cost of ownership for a headless WordPress site
WordPress itself is free and open-source, but the headless architecture introduces additional work that should be included in the business case. The main cost areas include:
- Initial development, including content modeling, frontend components, API queries, previews, redirects, forms, search, analytics and SEO output.
- Two hosting workloads, with separate resource requirements for WordPress and the frontend runtime.
- Integration and deployment, covering webhooks, cache invalidation, environment configuration, automated testing and coordinated releases.
- Ongoing maintenance, because WordPress, plugins, APIs, frontend dependencies and framework versions can change independently.
- Specialist skills, particularly when the team must support PHP, JavaScript, React, Next.js, APIs and cloud infrastructure.
The investment is easier to justify when the frontend will support multiple channels, highly customized experiences or performance requirements that a conventional theme cannot meet efficiently. For a straightforward marketing site, the added complexity may deliver little practical return.
Platform choice can also change the cost equation. Pantheon combines WordPress hosting, Next.js hosting, CDN delivery, environments, monitoring and support within one platform. Its Next.js plans use contract-based pricing without bandwidth overages or per-invocation charges, making infrastructure costs easier to forecast than a separately assembled, usage-based stack.
Running headless WordPress on a unified platform
Headless WordPress makes sense when the frontend needs more freedom than a traditional theme can provide, and the organization is prepared to operate the CMS and presentation layer as a connected system. It is not automatically faster, easier or cheaper. Its value comes from using that separation deliberately, with the right content model, rendering strategy, editorial workflow and infrastructure.
Pantheon removes much of the operational friction that can make the headless architecture difficult to sustain. WordPress and Next.js remain independently deployable, but teams can manage them through one WebOps platform with coordinated Dev, Test, Live environments, Multidev previews, automated builds, managed scaling, persistent caching, Global CDN delivery and centralized governance. That gives developers the freedom to build a modern frontend without forcing editors, marketers and operations teams to work across a fragmented stack.
Bring your WordPress backend and Next.js frontend together on Pantheon to build, publish and scale your headless site through one unified workflow!