Rebuilding a Legacy PHP system from scratch and switching over in one go feels clean and decisive. Experienced practitioners warn it is the plan most likely to fail. Here's why, and what a safer route looks like.
Sooner or later, every organisation running an ageing PHP system hears the same proposal: stop patching the old thing, build a clean replacement on a modern stack, and switch everyone over on a single date. It sounds decisive. It promises a fresh start without years of accumulated compromises.
It is also, by the account of some of the most experienced voices in software, the modernisation plan most likely to fail. Martin Fowler, one of the best-known writers on software architecture, says this "simple-sounding plan" to rebuild a system tends to "go down in flames most of the time". That is a practitioner's observation rather than a measured statistic, but it is shared widely enough to take seriously before you commit a budget, a team and several years to one large bet.
For a CTO or IT manager, the question isn't whether to modernise a Legacy PHP application. It's how to do it without putting the business at risk along the way.
The decision you're facing
There are broadly two ways to replace a system that the business depends on.
The first is the big-bang rewrite. A team builds a complete replacement alongside the old system, aiming to match everything it does. When the new system is judged ready, the old one is switched off and everyone moves across at once.
The second is incremental replacement. The new system starts small and takes over one piece of the old system's work at a time: a group of pages, a report, a customer journey. Each piece goes live, proves itself with real users and real data, and only then does the next one move. The old system shrinks until there is nothing left worth keeping.
Fowler named this second approach after the strangler fig, a vine he saw in the rain forests of Queensland. It starts in a nook of a host tree, grows around it over many years, and can eventually stand on its own after the host is gone.
What goes wrong when it's done carelessly
The big-bang rewrite tends to fail in predictable ways. None of these is guaranteed to happen to your project, but each is common enough that published accounts return to it again and again.
Nobody fully knows what the old system does. A system that has run for ten or fifteen years contains rules that were never written down: a discount that applies only to one customer group, a tax rounding quirk, a nightly job that tidies up orders. In their 2024 work "Patterns of Legacy Displacement", Thoughtworks technical directors Ian Cartwright, Rob Horn and James Lewis describe programmes where "even defining and agreeing current 'as is' functionality was a huge effort".
Odd-looking code is often hard-won knowledge. Writing in 2000, the software entrepreneur Joel Spolsky argued that the messy parts of an old program are often bug fixes, each one a lesson learned in production. In his words, "When you throw away code and start from scratch, you are throwing away all that knowledge." His essay is opinion, and deliberately provocative, but the point applies directly to long-lived Legacy PHP applications.
The target keeps moving. The business doesn't stop while the replacement is built. New requirements land in the old system, and the rewrite has to catch up. Cartwright, Horn and Lewis describe "a widening gap between what the business actually needed" and what the programme was building, which grew more acute the longer each programme ran.
Years pass with nothing delivered. Fowler notes that replacing a serious IT system takes a long time, and users can't wait for new features. A big-bang plan delivers no value until the very end. Spolsky's best-known example was Netscape: when he wrote his essay, its last major browser release, version 4.0, was almost three years old, and he called the decision to rewrite the code from scratch "the single worst strategic mistake" a software company can make. Again, that is his judgement, not an independent post-mortem.
Everything rides on one day. When the switch finally happens, every untested assumption is exposed at once, to every user, with live data. If something goes badly wrong, moving back to the old system may no longer be straightforward.
The work is abandoned half-done. Cartwright, Horn and Lewis write: "Too often we've seen organizations stuck on a treadmill of half-done legacy replacement efforts." The result can be the worst of both worlds: the old system still in production, a partly built new one, and two codebases to pay for.
The defensive approach
Modernising defensively means accepting that a large change is safest when it is made as a series of small ones.
In practice, that means a few principles:
- Break the system into parts that can move separately. Cartwright, Horn and Lewis describe "breaking this displacement in parts, incrementally delivering these parts", with each part deliverable with minimal dependencies on the others.
- Put each part into real use early. Fowler argues that once a new component is working, the business can reap its value, "allowing earlier return on the investment", and the team learns how to approach the next part.
- Keep the old system running while the new one grows. Both run side by side, and work moves across gradually rather than in one switch.
- Keep a way back. If a newly moved piece misbehaves, it can be returned to the old system while the problem is fixed.
- Don't rebuild what nobody needs. Fowler points out that much of an old system's behaviour isn't really wanted any more. Moving piece by piece forces a useful question each time: does this still earn its place?
Incremental replacement is not free. Running two systems side by side needs temporary connecting work that will eventually be thrown away, and it takes discipline to keep going until the old system is fully retired. Fowler acknowledges that cost directly, and still concludes that the reduced risk and earlier value of the gradual approach outweigh it.
Where Node.js fits, and where it doesn't
Node.js can be a sensible destination for many Legacy PHP applications, particularly where the business needs real-time features, modern APIs or a single language across web and back-end teams. But the language you move to does not decide whether a modernisation succeeds. A big-bang rewrite into Node.js carries exactly the same risks as a big-bang rewrite into anything else.
Node.js also brings its own responsibilities: a large ecosystem of third-party packages to govern, a release and support schedule to keep up with, and security practices your team must own. And for some applications, upgrading to a current, well-maintained version of PHP is the better answer. The goal is a system your team can run and maintain safely, not a particular technology.
What this means for your organisation
Before approving any modernisation plan, ask a few direct questions of it:
- Does the plan deliver anything to real users before the final switch-over? If not, how long is the business willing to wait?
- Who can describe, in full, what the current system does, including its scheduled jobs, integrations and unwritten business rules?
- What happens to new feature requests while the replacement is being built?
- If the new system misbehaves on its first day, how do you get back, and how long would that take?
- If funding or priorities change halfway through, what will you be left with?
If the honest answers point to one large switch-over date and no value before it, the plan is carrying more risk than it needs to.
Recommended next step
Before you commit to a rewrite, map what your Legacy PHP system actually does and look for the parts that could move first with the least disruption. That picture shows whether incremental replacement is practical for your application, and where it should begin.
Free Modernisation Readiness Review
Not sure where to start? Sketchmonk offers a free Modernisation Readiness Review for organisations running Legacy PHP applications. We look at what your system does today, the integrations and data it depends on, where the biggest risks sit, and which parts could move first with the least disruption. You'll talk to engineers who build on the modern Node.js stack, and there's no obligation to proceed.




