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.
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.
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.
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/.
// 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:
Limitations:
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:
# 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:
Limitations:
| Aspect | REST API | WPGraphQL |
|---|---|---|
| Setup | Built-in, zero config | Requires plugin |
| Data fetching | Multiple endpoints, multiple requests | Single endpoint, single query |
| Over-fetching | Yes — returns all fields | No — request only what you need |
| Under-fetching | Yes — need separate requests for related data | No — nest related data in one query |
| Learning curve | Low — standard HTTP | Medium — GraphQL query language |
| Developer tooling | Postman, curl, Insomnia | GraphiQL, Apollo Explorer |
| Best for | Simple sites, quick integrations | Complex sites, production headless |
Next.js by Vercel is the most widely used framework for headless WordPress frontends. It supports:
// 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>
);
}
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.
Faust.js (maintained by WP Engine) is a purpose-built framework for headless WordPress using Next.js and WPGraphQL. It handles:
For production headless WordPress projects, Faust.js eliminates significant boilerplate.
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:
// 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).
Headless architecture is genuinely beneficial in specific scenarios:
Despite its architectural elegance, headless WordPress is wrong for many situations:
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 TTFB | 200–500ms | 50–150ms (edge cached) |
| PageSpeed Score | 90–95 (optimised) | 95–100 |
| Global CDN | Static assets only | Entire page cached at edge |
| Setup complexity | Low | High |
| Monthly hosting cost | ₹500–₹5,000 | ₹2,000–₹15,000+ (CMS + frontend) |
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 |
|---|---|---|
| Vercel | Next.js projects | Built by Next.js team, global edge network |
| Netlify | JAMstack sites | Excellent build system, good Next.js support |
| AWS Amplify | AWS-centric teams | Full AWS integration |
| Plugin Type | Works in Headless? | Details |
|---|---|---|
| SEO plugins (Rank Math, Yoast) | Yes (backend) | Metadata management works; frontend rendering must be rebuilt |
| Security plugins (Wordfence) | Yes | Protects the CMS admin and API |
| Backup plugins (UpdraftPlus) | Yes | Backs up the CMS database and files |
| Page builders (Elementor) | No | Output requires PHP rendering — must rebuild in React/Vue |
| Contact form plugins | Partial | Form submission works; frontend form must be rebuilt |
| Shortcode plugins | No | Shortcode processing is PHP-only — rebuild in frontend |
| WooCommerce | Complex | Data management works; cart/checkout UI must be custom-built |
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.