JavaScript Framework vs PHP CMS, How to Choose Your Stack
Full-stack JavaScript or a PHP CMS with a decoupled front end? Judge it on build complexity, hosting operations, editor experience and maintenance cost, not on framework fashion.
WordPress powers 38.5% of all websites, according to W3Techs usage data. That is why so many rebuild briefs start with the wrong question. Developers usually choose the stack. Editors live with it, operations teams patch it, and finance pays for every upgrade after launch.
The choice between a full-stack JavaScript framework and a PHP CMS with a decoupled front end is not really about technology. It is about where your complexity will live for the next five years, and who will be holding it.
Get an independent architecture review before you commit budget to a JavaScript or PHP-based rebuild.
Two architectures that look identical on a slide
Most proposals show the same diagram for both options: a content source, an API and a fast front end. The differences show up when you count the moving parts.
Option A: a full-stack JavaScript framework. Next.js, Nuxt or SvelteKit handles routing, rendering, data fetching and server logic in one Node.js codebase. Content comes from a JavaScript-native CMS such as Payload, from a SaaS headless platform such as Sanity or Contentful, or from Markdown files in the repository. You run one runtime and write in one language.
Option B: a PHP CMS with a decoupled front end. WordPress or Drupal stays the system of record for content, users and editorial workflow. It exposes content through the WordPress REST API, WPGraphQL or Drupal’s JSON:API module. A separate front end, very often Next.js as well, renders the public site.
Notice the catch. Option B usually contains Option A. A decoupled WordPress build is a full-stack JavaScript application plus a PHP application, connected by an API contract. So the real question is whether the editorial strength of a mature PHP CMS is worth running a second platform. For the backend comparison on its own, see our breakdown of Node.js versus PHP.
Build complexity hides in the features nobody lists
Rendering pages from an API is the easy part. The cost sits in everything a monolithic CMS gave you for free, which the decoupled build now has to rebuild.
Take preview. In a traditional WordPress theme, the Preview button just works. In a decoupled build, the front end has to accept a signed preview request, switch into Next.js Draft Mode, fetch the unpublished revision with an authenticated API call, and render it with the same components the live site uses. That is real engineering, and it breaks quietly whenever authentication or caching changes.
The same applies to redirects managed in a plugin, menus, SEO metadata from Yoast or Rank Math, sitemaps, search, forms and gated content. Each one needs a decision: does the CMS stay in charge while the front end consumes it, or does the front end take ownership? Either answer works. Trouble starts when nobody decides and the answer changes from feature to feature.
A full-stack JavaScript build avoids that split but moves the work elsewhere. You choose the content platform, define the schema in code and build the editorial tools you need. With Payload or Sanity, that is often less work than it sounds. With a home-built admin, it is almost always more.
Ask every supplier to list each feature your current CMS gives you out of the box and to say who owns it after the rebuild. A competent team has that list before it quotes. A plausible one finds out during the build.
How many things can break at 2am?
Operations is where decoupled PHP builds cost the most in practice. You run two applications with different runtimes, release calendars and hosting needs.
Both calendars are fixed and published. On php.net’s supported versions page, each PHP branch gets two years of full support, then two more years of critical security fixes only, and reaches end of life after four years. The Node.js release policy says an LTS release typically guarantees critical bug fixes for a total of 30 months, and production applications should only use Active LTS or Maintenance LTS releases. A decoupled build follows both schedules, along with the CMS core, plugins, the framework and its dependencies.
Then there is the layer between the two: cache invalidation. When an editor publishes, a webhook from WordPress or Drupal has to tell the front end to revalidate the right paths or cache tags. If that webhook fails silently, the editor sees “Published” and the public site does not change.
Self-hosting adds a less obvious trap. The Next.js self-hosting guide explains that the server cache sits on the local filesystem of each instance by default. On a platform like Kubernetes, the cache is not shared between pods unless you configure a custom cache handler. Skip that step and different visitors can see different versions of the same page. On Vercel or Netlify the platform handles this for you, which is a real part of what their pricing covers.
A full-stack JavaScript build with a SaaS CMS cuts this down to one application you operate and one vendor you depend on. Your rendering strategy shapes the bill as well. Our guide to SSR versus SSG covers how that choice affects caching and hosting.
The editor experience decides whether the project succeeds
Engineering teams underweight this factor more often than any other. A site launches on time and scores well on Core Web Vitals. Six months later, marketing is asking for a page builder because it cannot ship a landing page without filing a ticket.
This is the strongest argument for a PHP CMS. WordPress’s block editor, and Drupal’s Layout Builder, content moderation and translation workflows, are mature tools that non-technical editors already know. Revisions, scheduled publishing, roles and media libraries are well understood. Your team may have years of training in them.
Decoupling puts much of that at risk. Every Gutenberg block an editor can insert needs a matching React component on the front end. If someone installs a plugin that adds a new block, the CMS will save it happily and the front end will not know how to render it. You end up maintaining a block allowlist and a component library in lockstep, and editors lose some of the flexibility that justified keeping WordPress.
JavaScript-native platforms have closed much of the gap. Sanity’s Presentation tool, Storyblok’s visual editor and Payload’s live preview all let editors see changes in context. They are still not WordPress, and retraining a large editorial team costs time and goodwill. Watch real editors complete real tasks in a sandbox before you sign. Do not decide from a demo.
If your editors assemble pages from structured components, either option works. If they lay pages out freely, a decoupled front end will either restrict them or leave you with an ever-growing component library.
Long-term maintenance: count the upgrade events
Licences and hosting are easy to compare, and they rarely decide total cost. Upgrade events do. An upgrade event is any change you did not choose but must respond to.
The JavaScript ecosystem changes quickly. Framework major versions arrive often, and some change the architecture as well as the API. The move from the Pages Router to the App Router in Next.js is the obvious example (see our guide to App Router versus Pages Router). React, the bundler, the CSS tooling and dozens of transitive dependencies each move on their own schedule.
PHP CMS cores change more slowly. The risk sits in plugins and modules. A WordPress install with forty plugins has forty maintainers, each with their own release habits and security record. Drupal major upgrades are far smoother than they used to be, but contributed modules still have to be ready before you can move.
A decoupled build carries both kinds of churn. It also needs both skill sets for as long as the site exists: PHP developers who know the CMS internals and JavaScript developers who own the front end. For many brands, that staffing cost outweighs any hosting difference.
A decision framework you can run in a workshop
Inventory the editorial reality:
List who publishes, how often, in how many languages and with what approval steps. Record which CMS features editors use every week, not which ones appear on the feature list.
Map the integration surface:
Identify every system the site touches, such as CRM, commerce, search, authentication and analytics. Decide whether each integration belongs in the CMS or in the application layer.
Assign ownership of inherited features:
For preview, redirects, SEO metadata, sitemaps, forms and search, name the platform that owns each one after launch and the person who maintains it.
Count the runtimes and calendars:
Write down every runtime, framework and platform you will operate, with its published support lifecycle. Each one is a recurring upgrade commitment.
Plan for the team you will have:
Choose the architecture for the in-house or agency team that will maintain the site in three years, not the team that builds it.
Prototype the riskiest path:
Before full commitment, build preview, publish-to-live cache invalidation and one complex page template end to end. That spike will expose most of the hidden cost.
When each option usually wins
A PHP CMS with a decoupled front end fits best when a large editorial team is productive in WordPress or Drupal today, the content model is complex and multilingual, and there is a clear front-end need the theme layer cannot meet. Typical examples are app-like interactivity, a shared design system across properties or strict performance targets.
A full-stack JavaScript framework fits best when the site behaves more like a product than a publication, editors work within structured components, or the same team also builds web apps on a shared codebase. If the site is mostly marketing content, also compare Next.js and Astro, because a lighter framework may reduce maintenance further.
Leaving a legacy PHP estate does not have to be a big-bang switch. An incremental Next.js migration moves the site route by route while the CMS keeps serving editors.
FAQs
Is a decoupled WordPress site faster than a traditional WordPress site?
It can be, because the front end can be statically generated or edge-cached and send less theme and plugin code to the browser. A well-optimised traditional theme behind a good page cache can also perform very well, so measure real templates before assuming you need to decouple for speed.
Does a full-stack JavaScript framework mean we have no CMS?
No. Frameworks such as Next.js are usually paired with a headless CMS such as Sanity, Contentful, Storyblok or Payload. The difference is that the CMS is JavaScript-native or SaaS, so you operate one runtime instead of a PHP application and a Node.js application side by side.
What is the biggest hidden cost of a decoupled PHP CMS?
Running two platforms. You patch, monitor and upgrade both the PHP CMS and the JavaScript front end, keep cache invalidation between them reliable, and keep both PHP and JavaScript skills on the team for the life of the site.
Can editors still preview content in a headless setup?
Yes, but someone has to build it. The front end needs a secure preview route, such as Next.js Draft Mode, that fetches unpublished revisions from the CMS and renders them with the live components. Ask suppliers to demonstrate working preview early in the project.
Should we choose based on what our developers prefer?
Developer preference matters, but it should not decide on its own. Weigh editorial workflow, operational ownership and the team that will maintain the site in three years, because those factors drive most of the long-term cost.
Next step: run the six-step workshop with your editors and operations lead in the room. Then build the preview and publish-to-live spike before you sign the build contract. If that spike is painful, choose the option with fewer runtimes.
Choose your stack on maintenance cost, not fashion
You now know where the real cost of a full-stack JavaScript or decoupled PHP build sits: preview, cache invalidation, editor workflow and upgrade churn. Moburst Digital Experience can run that assessment with your team and turn it into an architecture your editors and engineers can both maintain.