
Headless CMS
How to Plan a Next.js Frontend for WordPress
Planning a headless WordPress build? Learn how to choose the right API, rendering strategy, caching, previews and hosting from the start.
Learn how Headless WordPress works, compare REST and WPGraphQL, understand performance, workflows, costs and when a unified platform makes sense for your team.
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.
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:
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.
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:
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:
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:
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:
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:
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.
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 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.
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:
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
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:
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.
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!

Headless CMS
Planning a headless WordPress build? Learn how to choose the right API, rendering strategy, caching, previews and hosting from the start.

Headless CMS
Headless WordPress promises speed and flexibility. Learn what you gain, what you lose and how to decide if it's the right architecture for your project.

Headless CMS
Headless WordPress or a native headless CMS? Compare architecture tradeoffs, infrastructure costs and SEO implications to choose the right approach for your tea