
“Let's just rewrite it” is one of the most expensive sentences in software development. The old application holds years of business rules, edge cases and fixes that are documented nowhere. A rewrite has to rediscover all of that while the old system still needs changes in parallel.
Step 1: Put up a safety net
Before anything changes, I write tests for the most important flows: ordering, invoicing, login. Not for every line of code, but for what must never break.
Step 2: Clean up what's cheap
Update dependencies, raise the PHP or framework version, remove dead code paths. This work is unspectacular, but it immediately lowers security risks and maintenance costs.
Step 3: Carve out parts
A clearly bounded area, such as billing, is rebuilt as its own service. A translation layer makes sure the old and new systems talk to each other cleanly. Only once the new part runs stably is the old one switched off.
Step 4: Repeat
Area by area, the new system grows and the old one shrinks. Each step delivers value on its own, and the project can be paused at any time without leaving a half-finished construction site.
This approach is less spectacular than a fresh start. But it actually arrives.