Headless WordPress: What It Is and When to Use It

Traditional WordPress is a "coupled" system: the backend (data management, business logic) and the frontend (HTML rendering, visual presentation) are tightly integrated. WordPress handles everything — storing content in a MySQL database, assembling PHP templates, and delivering complete HTML pages to browsers.

Headless WordPress decouples these concerns: WordPress continues to manage and store content (the backend "body"), but a separate frontend application handles presentation (the "head"). WordPress's content is delivered through an API — usually the REST API or GraphQL — to whatever consumes it.

The result is a fundamentally different architecture with genuine advantages for specific use cases — and genuine trade-offs that make it wrong for many others.

Traditional vs Headless: How They Work

01
Traditional WordPress
Request Flow
Browser Request → WordPress PHP → MySQL Database → 
PHP Templates + Theme → Complete HTML → Browser

Every page request triggers WordPress to query the database, execute PHP templates, merge data with theme markup, and return a complete HTML document. The frontend is inseparable from the backend.

02
Headless WordPress
Request Flow
Content Editors → WordPress Admin → MySQL Database
                                          ↓
                              WordPress REST API / GraphQL
                                          ↓
Frontend App (Next.js / Nuxt.js / React / Mobile App)
                                          ↓
                                     End Users

WordPress becomes a pure CMS — its only job is content management and API delivery. A separate frontend application fetches data from the API and renders it.

03
Approach 1: WordPress REST API

The built-in REST API (available since WordPress 4.7) provides JSON endpoints for all WordPress content types at yourdomain.com/wp-json/wp/v2/.

JavaScript — Fetch WordPress Posts
// Next.js - fetch WordPress posts
export async function getStaticProps() {
  const res = await fetch('https://cms.yourdomain.com/wp-json/wp/v2/posts?per_page=10');
  const posts = await res.json();
  
  return { props: { posts } };
}

Advantages of REST API:

  • Built into WordPress core — no plugins needed
  • Standard HTTP conventions
  • Excellent tooling (Postman, curl, etc.)
  • Supports all WordPress content types

Limitations:

  • Multiple requests needed for complex data (e.g., post + author + categories)
  • Limited flexibility in response shape
  • No subscriptions (real-time updates)
04
Approach 2: WPGraphQL

WPGraphQL is a free plugin that adds a GraphQL API to WordPress, accessible at yourdomain.com/graphql. GraphQL allows clients to request exactly the data they need in a single query:

GraphQL — Fetch Posts with Related Data
# Single query fetching posts with author details, categories, and featured image
query GetPosts {
  posts(first: 10) {
    nodes {
      id
      title
      excerpt
      slug
      date
      author {
        node {
          name
          avatar {
            url
          }
        }
      }
      categories {
        nodes {
          name
          slug
        }
      }
      featuredImage {
        node {
          sourceUrl
          altText
        }
      }
    }
  }
}

Advantages of WPGraphQL:

  • Request exactly what you need — no over-fetching
  • Fetch related data in one request — no under-fetching
  • Strongly typed schema — excellent developer tooling
  • Works excellently with Apollo Client and URQL
  • Faust.js (from WP Engine) provides a full headless framework built on WPGraphQL

Limitations:

  • Requires installing and maintaining a plugin
  • GraphQL learning curve
  • Schema must be extended for custom data

REST API vs WPGraphQL Comparison

Aspect REST API WPGraphQL
SetupBuilt-in, zero configRequires plugin
Data fetchingMultiple endpoints, multiple requestsSingle endpoint, single query
Over-fetchingYes — returns all fieldsNo — request only what you need
Under-fetchingYes — need separate requests for related dataNo — nest related data in one query
Learning curveLow — standard HTTPMedium — GraphQL query language
Developer toolingPostman, curl, InsomniaGraphiQL, Apollo Explorer
Best forSimple sites, quick integrationsComplex sites, production headless

Headless Frontend Options

05
Next.js (Most Popular)

Next.js by Vercel is the most widely used framework for headless WordPress frontends. It supports:

  • Static Site Generation (SSG): Pages built at build time, deployed as static files. Extremely fast, globally distributable on CDNs.
  • Server Side Rendering (SSR): Pages rendered on each request — for dynamic content.
  • Incremental Static Regeneration (ISR): Pages regenerated in the background after a time interval — fresh content without full rebuilds.
JavaScript — Next.js Blog Post with ISR
// pages/blog/[slug].js
export async function getStaticPaths() {
  const res = await fetch('https://cms.yourdomain.com/wp-json/wp/v2/posts?per_page=100');
  const posts = await res.json();
  
  return {
    paths: posts.map(post => ({ params: { slug: post.slug } })),
    fallback: 'blocking'
  };
}

export async function getStaticProps({ params }) {
  const res = await fetch(
    `https://cms.yourdomain.com/wp-json/wp/v2/posts?slug=${params.slug}`
  );
  const [post] = await res.json();
  
  return {
    props: { post },
    revalidate: 3600 // Regenerate every hour
  };
}

export default function BlogPost({ post }) {
  return (
    <article>
      <h1 dangerouslySetInnerHTML={{ __html: post.title.rendered }} />
      <div dangerouslySetInnerHTML={{ __html: post.content.rendered }} />
    </article>
  );
}
06
Other Frontend Options

Nuxt.js: The Vue.js equivalent of Next.js. Excellent documentation, strong ecosystem. Use if your team prefers Vue over React.

Gatsby: Previously the dominant headless WordPress framework, Gatsby fell from favour due to long build times for large sites. Still used but less common for new projects in 2025.

Plain React / Vue: For simpler applications or SPAs (Single Page Applications), using plain React or Vue without a meta-framework is viable — but lacks SSR/SSG benefits.

Mobile Apps: React Native, Flutter, iOS, and Android apps can consume the WordPress REST API directly — a common pattern for content-driven mobile apps.

Recommendation: For most new headless WordPress projects, Next.js with WPGraphQL is the strongest combination in 2025. It offers the best performance, tooling, and community support.

Faust.js: The Official WordPress Headless Framework

Faust.js (maintained by WP Engine) is a purpose-built framework for headless WordPress using Next.js and WPGraphQL. It handles:

  • Authentication and preview mode (previewing unpublished content in the frontend)
  • Seed queries and hydration
  • WordPress block rendering in the frontend
  • Template hierarchy equivalent for Next.js

For production headless WordPress projects, Faust.js eliminates significant boilerplate.

07
Preview Mode: A Critical Headless Challenge

The most practical challenge in headless WordPress is preview mode — when a content editor clicks "Preview" on an unpublished draft, they need to see the frontend's rendered version, not WordPress's PHP preview.

The problem: Your frontend is a deployed static site. Unpublished content isn't in the deployed build.

Solutions:

Next.js Preview Mode / Draft Mode:

JavaScript — Preview API Route
// pages/api/preview.js
export default async function handler(req, res) {
  // Validate the preview request (check secret token)
  if (req.query.secret !== process.env.PREVIEW_SECRET) {
    return res.status(401).json({ message: 'Invalid token' });
  }

  // Enable draft mode
  res.setDraftMode({ enable: true });
  
  // Redirect to the previewed post slug
  res.redirect(req.query.slug);
}

Configure WordPress to call this endpoint when Preview is clicked (WPGraphQL plugin supports this natively).

Faust.js: Handles preview mode automatically — one of its biggest advantages over a custom Next.js setup.

When Headless WordPress Makes Sense

Headless architecture is genuinely beneficial in specific scenarios:

  • Multi-channel content delivery: One WordPress backend delivering content to a web app, mobile iOS app, Android app, smart TV app, and kiosk — all via the same API. Traditional WordPress can only output web HTML.
  • Maximum frontend performance: Next.js with ISR and a global CDN (Vercel, Netlify) can achieve sub-100ms load times globally — impossible with WordPress PHP rendering, regardless of optimisation.
  • Modern frontend developer experience: Teams with strong React/Vue skills who find PHP templating limiting. Headless lets frontend developers work in their preferred environment while content editors work in familiar WordPress.
  • Integration with complex systems: Applications that need to combine WordPress content with data from other services (Salesforce, custom APIs, third-party databases) in a single frontend — Next.js handles this naturally.
  • Enterprise editorial workflows at scale: Large publishing operations where the CMS stability, security, and familiarity of WordPress needs to coexist with a performance-optimised, CDN-deployed frontend.

When Headless WordPress Does NOT Make Sense

Despite its architectural elegance, headless WordPress is wrong for many situations:

  • Small business websites and blogs: A standard WordPress site with good caching achieves excellent performance. The complexity, hosting costs (separate CMS + frontend deployment), and maintenance overhead of headless architecture isn't justified for a 20-page business website or a personal blog.
  • WooCommerce stores (mostly): WooCommerce's headless story is improving but still complex. Cart state, real-time inventory, checkout flows, payment gateways — all require significant custom work in a headless setup. Traditional WooCommerce is faster to implement and easier to maintain for most stores.
  • Clients without development teams: Headless WordPress requires ongoing frontend development. A client who manages their own site via the WordPress admin but has no developer on staff gets none of the frontend benefits and all of the complexity.
  • Tight budgets and deadlines: Headless WordPress costs more to build (separate frontend development), more to deploy (separate hosting for CMS and frontend), and more to maintain. If budget or timeline is constrained, traditional WordPress delivers faster and cheaper.

The Performance Reality Check

Headless WordPress proponents often cite performance as the primary benefit. This is real — but worth nuancing:

Traditional WordPress with excellent optimisation (WP Rocket, Redis caching, Cloudflare CDN, Kinsta hosting) achieves PageSpeed scores of 95+ and sub-1-second load times on most pages.

Headless WordPress with Next.js ISR on Vercel achieves faster-than-any-server times (edge-cached static files) but requires architectural complexity that traditional WordPress doesn't.

For most sites, the performance ceiling of optimised traditional WordPress is sufficient. Headless performance advantages become compelling only when you need globally distributed, sub-100ms edge performance at scale.

Factor Traditional WordPress Headless WordPress
Typical TTFB200–500ms50–150ms (edge cached)
PageSpeed Score90–95 (optimised)95–100
Global CDNStatic assets onlyEntire page cached at edge
Setup complexityLowHigh
Monthly hosting cost₹500–₹5,000₹2,000–₹15,000+ (CMS + frontend)

Hosting Headless WordPress

WordPress CMS (backend):

Any WordPress hosting works. Many headless implementations specifically choose managed WordPress hosting (Kinsta, WP Engine, Cloudways) for the CMS — optimised for the API response times that the frontend depends on.

Frontend (Next.js/Nuxt.js):

Platform Best For Key Feature
VercelNext.js projectsBuilt by Next.js team, global edge network
NetlifyJAMstack sitesExcellent build system, good Next.js support
AWS AmplifyAWS-centric teamsFull AWS integration

What Happens to WordPress Plugins in Headless?

Plugin Type Works in Headless? Details
SEO plugins (Rank Math, Yoast)Yes (backend)Metadata management works; frontend rendering must be rebuilt
Security plugins (Wordfence)YesProtects the CMS admin and API
Backup plugins (UpdraftPlus)YesBacks up the CMS database and files
Page builders (Elementor)NoOutput requires PHP rendering — must rebuild in React/Vue
Contact form pluginsPartialForm submission works; frontend form must be rebuilt
Shortcode pluginsNoShortcode processing is PHP-only — rebuild in frontend
WooCommerceComplexData management works; cart/checkout UI must be custom-built
Key takeaway: Backend plugins (data management, security, backups) work fine in headless. Frontend plugins (shortcodes, widgets, visual components) don't work — their functionality must be rebuilt in your frontend framework.

Frequently Asked Questions

Q: Is headless WordPress harder to SEO?
A: With server-side rendering (Next.js SSR or SSG), headless WordPress can achieve identical or better SEO than traditional WordPress. Avoid client-side-only rendering (CSR) where Google must execute JavaScript to see content — this can hurt crawlability.
Q: Can WordPress plugins still work in headless mode?
A: Backend plugins (SEO plugins for managing metadata, WooCommerce for data management) work fine. Frontend plugins that output shortcodes, widgets, or visual components don't work in a headless frontend — their functionality must be rebuilt in the frontend framework.
Q: What about the Gutenberg editor in headless mode?
A: Gutenberg block data can be served via the REST API or WPGraphQL. However, rendering Gutenberg blocks in a custom frontend requires work — either parsing the block JSON and building React components for each block, or using WPGraphQL's Gutenberg extension.
Q: Is headless WordPress more expensive?
A: Yes — significantly. You're paying for WordPress hosting plus a separate frontend hosting platform (Vercel/Netlify). Development costs are higher because you're building a custom frontend. Maintenance requires developers who understand both WordPress and your frontend framework. Budget 2–5x more than traditional WordPress for equivalent functionality.
Q: Can I go partially headless — use WordPress for some pages and Next.js for others?
A: Technically possible (via reverse proxy routing) but architecturally messy. You lose the clean separation that makes headless valuable. If you're not going fully headless, the complexity usually isn't worth it — stick with traditional WordPress and optimise performance instead.
Q: What's the difference between headless and decoupled WordPress?
A: The terms are often used interchangeably, but technically: decoupled means the frontend and backend are separate but the frontend is still WordPress-based (using the REST API to serve a WP theme). Headless means the frontend is an entirely different technology (Next.js, React Native, etc.) with no WordPress PHP rendering at all. In practice, most people mean "headless" when they say either term.

Final Thoughts

Headless WordPress is a powerful architectural pattern — and genuinely the right choice for multi-channel delivery, performance at scale, and teams with strong JavaScript expertise.

It's also overused. The architectural complexity and development cost are substantial, and for the majority of WordPress projects, optimised traditional WordPress delivers everything that's needed faster and cheaper.

Evaluate each project on its actual requirements. If you need sub-100ms edge performance globally, multi-platform delivery, or are building with a JavaScript-first team — headless is compelling. If you're building a business website, blog, or even a moderately complex eCommerce store — traditional WordPress almost certainly serves you better.

Need help deciding whether headless WordPress is right for your project? Our architecture team provides honest, experience-based consulting — no upselling, just the right recommendation.

Contact us today and we'll sort it out.
Views: 74