Keep WordPress as your CMS and move the frontend to a static-fast headless Next.js app powered by WPGraphQL. Here’s why, when, and how.
WordPress to headless Next.js, in one paragraph
Most people hear “migration” and picture content moving somewhere. This one doesn’t. A WordPress to headless Next.js migration leaves WordPress exactly where it is, still your content management system, and swaps the public-facing theme for a separate, static-fast Next.js application. Editors keep the admin they already know. The frontend turns into a modern React app that pulls content through WPGraphQL, renders pages as static HTML, and refreshes the moment something changes. You keep WordPress for writing. You get JAMstack speed, security, and developer experience for everything visitors touch.
This is the exact stack I build. A direct-to-consumer farm and food business came to me boxed into a closed platform called GrazeCart, and I moved their content operation into WordPress and served it to the frontend over WPGraphQL. Same pattern this guide teaches, shipped for a real client who needed a blog they actually owned. So I’m not theorizing here. I’ve also done the uglier half of this work, prying content loose from a proprietary builder before it could be served headless at all. That one nearly broke me. More on it further down.
Nothing in your content actually goes anywhere. WordPress stays the source of truth. What you’re doing is decoupling the frontend, and the prize at the end of both jobs is the same thing, portability. This guide walks through when headless earns its keep, when it doesn’t, how the architecture fits together, the actual process, and the trade-offs nobody puts in the sales deck. Decoupled WordPress frontends are what I build at jbe.works. If you’d rather hand it off, the headless WordPress migration service is right there.
What “headless WordPress” actually means
Think of standard WordPress as one machine doing two jobs at once. The same PHP application stores your content and draws every page a visitor sees, through a theme. That’s what “coupled” means. Going headless rips out the rendering half, the “head,” and hands your content over as plain data through an API. Some other application picks up that data and builds the interface. The body keeps the content. A different program grows the new head.
That data layer is almost always WPGraphQL. It’s a free, open-source plugin that, in its own WordPress.org words, “provides an extendable GraphQL schema and API for any WordPress site.” The numbers back it. More than 30,000 active installations, a 4.9-star rating, and it’s on its way to becoming a Canonical Plugin on WordPress.org with real support from Automattic behind it. So this is no longer a fringe community bet. It has institutional weight now.
I keep coming back to that GrazeCart job because of where WPGraphQL slotted in. The farm-and-food client’s content lived inside a subscription commerce platform that was never designed to let it out the front door. Getting the content into WordPress was step one. The thing that actually unlocked the project was WPGraphQL, because once their posts were exposed as a clean GraphQL schema, I could render that content however the new frontend wanted it. No platform dictating the markup. That is the whole reason the API layer matters. It turns your content into data you own, not pages someone else draws for you.
Where Next.js fits
WPGraphQL hands out the content. Next.js takes it and builds the site. The WPGraphQL docs themselves point at Next.js, Gatsby, Astro, and SvelteKit. So why does Next.js win most of the time? Because it carries every rendering strategy under one roof. Static generation for content pages. Server rendering when a page has to be dynamic. Incremental static regeneration, ISR, so a content edit ships without rebuilding the whole site. One framework, all three modes.
Why go headless, and when you shouldn’t
Nobody should go headless because it sounds modern. It’s a real architectural trade, and it earns its place in some situations and just piles on complexity in others. Here’s how I sort it.
Go headless when you want
- Speed. Pre-rendered static pages off a CDN routinely clear Core Web Vitals targets that a plugin-heavy PHP theme can’t touch.
- Security and uptime. The public site is just static files, so the attack surface collapses. No live PHP, no database for visitors to reach, and you can wall the WordPress admin off behind a firewall or a private network.
- A modern developer experience. React components, TypeScript, a real build pipeline, the whole JavaScript ecosystem instead of PHP templating.
- Multi-channel content. One WPGraphQL API can feed a website, a mobile app, and whatever surface comes next, all from a single CMS.
- Custom, app-like interactivity that fights you the moment you try to build it inside a traditional theme.
Stay coupled (traditional WordPress) when
- The site is small or simple and the performance is already fine.
- You lean on page builders like Elementor or Divi, or plugins that render their own front-end markup. Most of those don’t survive the move.
- You need plug-and-play preview, forms, and plugin features with zero custom code.
- You’ve got no front-end development on hand and no appetite for maintaining a build-and-deploy pipeline.
Headless WordPress wins when performance, security, and developer experience matter more to you than out-of-the-box plugin convenience. None of those hurting? Then plain WordPress is cheaper, simpler, and the smarter call.
Still on the fence? Run a free performance audit first. If a content site is already flunking Core Web Vitals, going headless is usually the single highest-leverage fix on the table.
The headless architecture, piece by piece
Five moving parts. That’s the whole production stack once you strip the mystery off it. Walk through each one and the architecture stops feeling like magic.
1. WordPress (the CMS)
Your existing install, untouched from the editor’s seat. It still stores content, runs the admin, and hosts back-end plugins like ACF for structured fields. The one thing it gives up is rendering the public site.
2. WPGraphQL (the data layer)
This is the plugin that turns your posts, pages, custom post types, and ACF fields into a GraphQL API. Next.js then asks for exactly the fields a given page needs. Nothing extra, no over-fetching.
3. Next.js (the frontend)
Here’s the React application that grabs content at build time and renders it as static HTML, leaning on React Server Components for lean data fetching. This is the code your visitors actually download.
4. The CDN / edge (delivery)
Once built, those static pages ship to a global edge network like Vercel. A visitor pulls HTML from the nearest node in milliseconds. No waiting on a PHP server to wake up and assemble a response.
5. Revalidation webhooks (freshness)
Save a post in WordPress and a webhook pokes Next.js to regenerate just the pages that changed, via ISR. Static stops meaning stale. Edits land in seconds, no full-site rebuild required.
| Layer | Technology | Job |
|---|---|---|
| CMS | WordPress + ACF | Author and store content |
| API | WPGraphQL | Expose content as GraphQL data |
| Frontend | Next.js (React) | Fetch and render static pages |
| Delivery | CDN / edge network | Serve static HTML globally, fast |
| Freshness | Webhook + ISR | Revalidate changed pages on save |
How to migrate WordPress to a headless Next.js frontend
Your content never leaves WordPress, so forget about moving data. This whole migration is really one thing. You’re building a new frontend and cutting over to it. Here’s the order I work in.
1. Audit content and choose what’s headless-compatible
Start with an inventory. Post types, ACF fields, and every plugin that renders front-end markup. Anything that spits out its own HTML, and that means most page builders plus a fair number of form and gallery plugins, needs either a headless-friendly swap or a custom component to replace it.
2. Install and configure WPGraphQL
Drop WPGraphQL onto your existing WordPress, plus WPGraphQL for ACF if you use custom fields. Now your content is available as an API and your editors haven’t noticed a thing.
3. Scaffold the Next.js app
Spin up a Next.js project and point a GraphQL client at your WPGraphQL endpoint. Then build the data-fetching layer, with each query scoped tightly to what that template actually needs.
4. Rebuild templates as React components
Now the real work. Recreate your theme’s templates, home, post, page, archive, custom post types, as React components fed by WPGraphQL data. Static generation for content pages. ISR for the stuff that changes often.
5. Match URLs exactly
Map every existing WordPress URL onto a Next.js route so the structure lines up one-to-one. Don’t shortcut this. It’s the SEO-critical step. Identical URLs mean zero redirects and zero ranking loss.
6. Wire up revalidation
Set up a webhook from WordPress to Next.js so saving a post fires ISR revalidation on just the pages it touched. Bolt on draft and preview support too, if your editors live in preview.
7. Handle forms, search, and dynamic features
Theme-rendered features now need API-driven stand-ins. Forms post to an endpoint. Search runs through the API. Comments come from a service or the REST/GraphQL layer. Each one is its own little rebuild.
8. QA, deploy to the edge, and cut over DNS
Test every template and every URL on a staging deployment. Confirm Core Web Vitals hold up. Then deploy to your CDN and swing DNS over to the Next.js app, keeping WordPress reachable, usually on a subdomain, for the admin and the API. Submit a fresh sitemap once you’ve cut over.
Let me flag something I’ve learned the hard way. The scope doesn’t hide in the content. It hides in the API surface and the rebuild. Steps 4 and 7 are where the hours vanish. The content move almost never bites you. It’s the theme-rendered odds and ends, the forms, the widgets, the one plugin nobody remembers installing, plus every field you assumed WPGraphQL would expose and then had to register by hand. On more than one project the thing that ate a week wasn’t the posts. It was a single dynamic feature that the old theme rendered for free and the new frontend had to earn from scratch. Catch those back in step 1 and they won’t ambush you on cutover day.
Performance, Core Web Vitals, and SEO
Speed is the headline reason anyone goes headless. It also happens to line up almost perfectly with the metrics Google rewards. Google’s Core Web Vitals draw the line you have to clear. Largest Contentful Paint (LCP) inside 2.5 seconds. Interaction to Next Paint (INP) at 200 milliseconds or under. Cumulative Layout Shift (CLS) of 0.1 or less. All measured at the 75th percentile of real page loads, not your fast laptop.
Pre-rendered static pages off a CDN are built for thresholds like these. No server round-trip to assemble HTML. No pile of plugins firing on every single request. And a headless frontend hands you tight control over what JavaScript ships, how images load, and how layout space gets reserved. Those three levers are LCP, INP, and CLS, more or less.
How big is the gain? Bigger than most people guess. I once took on a regional building-materials and tile store carrying roughly 2,000 products, and unwinding it was genuinely brutal. Every single page had been built in Divi Builder, buried under Divi shortcodes, proprietary markup, and a tangle of tightly-coupled paid plugins. The content was a prisoner of that builder’s ecosystem. You couldn’t lift a product description out without dragging a nest of shortcode wrappers along with it. My first parsing scripts caught the obvious patterns and missed the nested ones, so I’d run a batch, find mangled output, and tighten the rules again. Over and over. Dozens of passes before the markup came off clean across all 2,000 products plus the pages and posts. What finally came out the other side was a standard architecture with no paid-builder dependency and every original feature intact. Performance jumped by more than 200%. That job wasn’t headless, but it taught me the lesson that carries straight into headless work. Clean, portable content raises your speed ceiling before you touch anything else. Headless then takes that same liberated content and flings it onto a CDN. Content trapped in a builder can’t go headless at all until you free it first.
SEO is fully preserved when done right
Here’s where headless gets unfairly maligned. Modern Next.js renders complete HTML on the server or at build time, so a crawler sees a finished page, not an empty shell waiting on JavaScript. Replicate your metadata, your structured data, and your XML sitemap, match URLs one-to-one, and headless WordPress indexes just fine. Two things are non-negotiable. Server-rendered HTML, so your content never depends on the client to paint it. And identical URLs. Skip either and you’re asking for trouble.
For the SEO fundamentals that apply to any move, redirects, metadata, sitemap resubmission and the rest, the complete WordPress migration guide covers them.
The honest trade-offs
Headless is powerful. It isn’t free. Walk in clear-eyed and you won’t end up resenting the decision six months later.
Higher complexity
You’re now running two systems instead of one, WordPress on one side and a Next.js app on the other, with a build-and-deploy pipeline stitching them together. That takes front-end engineering muscle you might not have sitting in-house.
Plugin features need rebuilding
Plenty of plugins assume they own the front end. Forms, related-posts widgets, page builders, pop-ups. Each of those tends to need a headless-friendly replacement or a custom component built from scratch. Audit it early. Page builders are the worst offenders. If a site leans on Divi or Elementor, half the migration becomes rebuilding what the builder used to draw, and I’ve watched that single fact double an estimate before anyone wrote a line of React.
Preview and editor experience take setup
Live preview and draft viewing don’t come for free in a headless world. You have to wire them up so editors can still eyeball changes before anything goes public.
Cost
Up front, this costs more than installing a theme, and you’ll be maintaining a frontend codebase from then on. What claws it back is hosting. Static hosting is dirt cheap, and you pocket better performance and a tighter security posture on top.
| Dimension | Traditional WordPress | Headless WordPress + Next.js |
|---|---|---|
| Performance ceiling | Limited by PHP + plugins | Very high (static + CDN) |
| Security surface | Public PHP + DB | Static front end; admin can be private |
| Editor experience | Full, out of the box | Same admin; preview needs setup |
| Plugin compatibility | Everything works | Front-end plugins need rebuilding |
| Build/deploy | None required | Build pipeline required |
| Initial cost | Lower | Higher |
| Hosting cost | Standard WP hosting | Often cheaper (static) |
| Dev resources | WordPress/PHP | React/JS + WordPress |
Your next step
Done well, a WordPress to headless Next.js migration hands you both halves of the deal. Editors stay in the WordPress they already know. Visitors get a static-fast, secure, modern site served straight off the edge. It’s the right call when performance, security, and developer experience genuinely matter. It’s overkill when a simple site already runs fine. Keep your URLs identical and your content never budges, which keeps the SEO risk tiny and the speed payoff large.
A decoupled WordPress frontend done properly is what I do at jbe.works. WPGraphQL underneath, server-rendered Next.js, ISR revalidation, one-to-one URL mapping the whole way through. The same shape I built for that farm-and-food client, just tuned to whatever you’re running. Have a look at the headless WordPress migration service, or start smaller with a free performance audit and see how much speed you’d actually gain before you commit a dime. Earlier in the journey? Still moving onto WordPress in the first place? Get your content there with the Joomla to WordPress or Drupal to WordPress guides. The headless door stays open the moment your content lives in WordPress.
Frequently asked questions
Do I lose the WordPress admin if I go headless?
No, and that’s the entire point. WordPress stays your CMS and your editors keep the same admin they’ve always used. The only thing that moves is the public-facing rendering, which shifts over to Next.js. Next.js reads its content from WordPress through WPGraphQL.
Does headless WordPress hurt SEO?
Not when it’s built right. Next.js renders complete HTML at build time or on the server, so crawlers get full pages. Keep your URLs identical, copy over metadata and structured data, resubmit your sitemap, and your rankings hold. The one way it goes wrong is rendering content client-side only.
What is WPGraphQL and do I need it?
It’s a free, open-source plugin that turns your WordPress content into a GraphQL API for a headless frontend to read. More than 30,000 active installations, and it’s on its way to Canonical Plugin status with Automattic backing it. For a headless WordPress and Next.js stack, it’s the standard data layer. So yes, you need it.
Will my page builder and plugins still work headless?
Front-end plugins and page builders like Elementor or Divi mostly won’t, because they render their own HTML inside the WordPress theme. You rebuild that functionality as React components or swap in headless-friendly tools. Back-end plugins are a different story. Something like ACF works perfectly fine.
Is headless WordPress worth it for a small site?
Usually not. Small site, already performing well? The extra complexity and the build pipeline aren’t worth what you get back. Headless earns its keep when speed, security, scale, or a modern developer experience are genuine priorities for you.