A guide for businesses
Rewrite a legacy system or modernize it in stages?
An old system does not always need a full rewrite. If the problem concerns a particular workflow, screen or integration, phased modernization may be enough. I explain when that approach makes sense, when rebuilding is worth considering and what to assess before commissioning changes.
By Michał Drab ·
Age alone is not a reason
A working system holds knowledge about the business: billing rules, exceptions for particular customers, bug fixes collected over years. They are rarely written down, because they “just work”. A new system has to reproduce all of them before it delivers anything more than the old one.
So the starting point is not whether the code is old, but what exactly gets in the company’s way and whether it can be changed within the current solution.
When modernization is usually enough
- The data and core business rules are correct, and the problem concerns a specific process, screen or connection to another program.
- The company has the source code and access, and the system can be run in a test environment.
- The technology can be upgraded to a supported version without rewriting most of the code.
- The team expects improvements, not a completely different way of working.
In that case changes can be made in stages, and each stage delivers results before decisions on the next one are made.
When a rebuild makes sense
- The system runs on unsupported technology (for example a PHP version without security fixes), and upgrading it would mean rewriting most of the code.
- The company has neither the source code nor the rights to it and cannot recover them.
- The data model no longer fits how the business works today, and every change has to work around it.
- Almost every fix breaks something elsewhere, and nobody can predict the effects of a change.
- The company is changing how it operates, and the old system now covers only part of the processes.
Even then, a rebuild does not have to mean switching the old system off one day and the new one on the next.
The risks of a full rewrite
- For a long time there are two systems: the old one still needs maintenance and fixes, while the new one does not yet deliver value.
- Undocumented rules and exceptions surface only after go-live, when users report that “this used to work”.
- Moving years of data requires agreeing on formats, statuses and the links between records.
- All users have to switch at once, often while the business keeps running.
- The real cost and timeline become clear only near the end of the project, when it is hard to back out.
Joel Spolsky described this risk in his essay “Things You Should Never Do”, using the example of the Netscape browser, which was rewritten from scratch over several years.
A third way: replacing it piece by piece
Between “leave it” and “rewrite everything” there is a step-by-step approach. New modules are built alongside the working system and take over functions one by one, while the old part is gradually retired. Martin Fowler calls this pattern the Strangler Fig.
This approach requires deciding which system owns the data during the transition and planning the switchover carefully. Each stage can be checked in a test environment first, before it reaches the company’s daily work.
How to decide
Before you compare quotes, answer a few questions:
- What specific problem should the change solve, and how will you know it has been solved?
- Which parts of the system work well and should stay?
- Do you have the source code, access and documentation?
- What technology does the system run on, and is it still supported?
- What does the current state cost: time spent on workarounds, mistakes, delays?
- What must keep working without interruption during the changes?
Reliable answers come from reviewing the code, data, documentation and integrations. That is where I start work on an existing system. Only then is it clear what can be developed further and what needs rebuilding.
What to avoid
- Deciding based only on the system’s age or the technology it was built with.
- Getting a quote for a rewrite without an analysis of the current solution.
- Freezing all fixes to the old system while the new one is built, without a plan for what must work in the meantime.
- Moving every feature over one-to-one. First check which ones people actually use.
Questions about rewriting and modernization
How long does a rewrite from scratch take?
It cannot be estimated reliably without reviewing the current system. When work is done in stages, the first stage usually takes 4–8 weeks and delivers results before decisions on the next ones are made.
Does old technology mean the system has to go?
No. First check whether the environment can be upgraded to a supported version and how much work that takes. A rebuild makes sense only when an upgrade would mean rewriting most of the code.
Can an old system work with new modules?
Often, yes. You then need to decide which system owns which data, how they communicate and in what order the new modules take over functions.
Who owns the code of a new or modernized system?
The client. If I do not provide ongoing maintenance, I prepare documentation for the future team.
What should I prepare for a conversation?
A description of the problem the change should solve, information about access to the code and documentation, a list of integrations and the functions that must keep working without interruption.
Related guides
Every fix breaks something else — where should you start?
Upgrading an old PHP application: where to start
Critical PHP vulnerabilities: what to do with an app on an old PHP version
An old system slowing work down — how to simplify everyday tasks
Business system modernization: how to limit downtime