Headless WordPress with Next.js: when it is worth it
Headless WordPress promises speed and freedom, and it adds real cost. This guide explains what changes, what you lose and when the trade-off makes sense.
Headless WordPress means using WordPress as a content backend only. Editors still write and manage content in the WordPress admin, but the public website is a separate application, often built with Next.js, that fetches the content through an API. It can be a good architecture, and it is often chosen for the wrong reasons. Here is what actually changes.
How it works
- WordPress stores pages, posts, media and custom fields, and exposes them through the REST API or a GraphQL layer such as WPGraphQL.
- A Next.js application fetches that content and renders pages, either ahead of time or on request.
- The two run separately, and you deploy and maintain both.
The WordPress theme no longer produces the public pages, so everything the theme and plugins used to do on the front end has to be rebuilt in the new application.
Why people choose it
- Design and interface freedom. The front end is not limited by a theme and can be as custom as the product needs.
- Performance potential. Pages can be pre-rendered and served from a fast edge network.
- One content source for several outputs: a website, an app and other channels can all read the same content.
- Team preference. A team that works in React and TypeScript may prefer it to PHP templates.
These are real benefits for the right project.
What you give up
This is the part that is easy to underestimate.
- Plugin features that render on the front end stop working by default. Forms, SEO output, sliders, search, popups and many others have to be rebuilt or replaced.
- Previews. Editors expect to see a draft before publishing. In a headless setup, previews need to be built and maintained.
- Two applications to deploy, monitor, secure and update, instead of one.
- More developer skill is needed, in WordPress and in JavaScript, and the cost of change is higher.
- SEO details such as metadata, sitemaps, redirects and structured data must be handled in the front end.
Headless and WooCommerce
A store depends on carts, sessions, accounts, payment gateways and a large plugin ecosystem, all designed for the WordPress front end. Going headless for a store means rebuilding those or keeping part of the site on WordPress. A common compromise is a headless catalogue and content with the cart and checkout still handled by WordPress. It can work, but it is a substantial project, so treat it as such.
Speed is not enough of a reason
A common argument is that headless is faster. It can be, but a well-built WordPress site, with a light theme, careful plugins, good hosting and caching, can also be very fast. Compare what you would gain with what it costs to build and maintain, and measure your current site first. Often the biggest speed problems are heavy themes and plugins that can be fixed without changing the architecture.
When it is worth it
Headless tends to pay off when most of these are true.
- The design or interaction needs are beyond what a theme can reasonably deliver.
- The same content must feed several channels.
- The team has the JavaScript skill to build and maintain a second application.
- The site depends on few front-end plugins.
- There is budget for the extra build and the ongoing upkeep.
When to stay with normal WordPress
- A small business or brochure site.
- Heavy reliance on plugins that render on the front end.
- Editors who need simple publishing and live previews.
- No one to maintain a separate front end.
In these cases a well-built WordPress theme, optimised and kept lean, is usually the better choice.
A practical middle path
You do not have to go fully headless. WordPress can serve most pages as usual while one section, such as an application or a landing page set, is built separately and connected through the API. This keeps editing simple where it matters and gives freedom where it is needed.
How I approach it
I build with WordPress and WooCommerce, and with Next.js, React and Laravel. This website is built with Next.js. If you are weighing headless against a conventional build, describe the project and I will give you a straight recommendation, including when the simpler option is the right one.
Frequently asked questions
What is headless WordPress?
It means using WordPress only to manage and store content, while a separate front end, for example a Next.js application, fetches that content through an API and displays it.
Is headless WordPress faster?
It can be, because the front end can be pre-rendered and served statically. But a well-built normal WordPress site with good hosting and caching can also be fast, so speed alone is not a reason to go headless.
Does headless WordPress work with WooCommerce?
It can, but carts, checkout, accounts and plugins become much harder because they were built for the WordPress front end. Many stores keep the checkout on WordPress even when the rest is headless.
When should I not go headless?
When you have a small business site, rely on plugins that render on the front end, have no JavaScript developers to maintain a second application or need to publish and preview content simply.