Websites11 min read

Legacy PHP App Modernization in Berlin: Rewrite vs Refactor, Cost and Risk in 2026

Mohamed Bah·Fondateur, Kolonell
October 15, 2026
Share:
Legacy PHP App Modernization in Berlin: Rewrite vs Refactor, Cost and Risk in 2026

Legacy PHP App Modernization in Berlin: Rewrite vs Refactor, Cost and Risk in 2026

Websites

The verdict in three sentences

For the IT director of a Berlin SME whose 2012 business tool still runs on PHP 5, with no automated tests or documentation, the status quo has become the riskiest choice: no security patches since 2018, hosts dropping obsolete versions, original developers gone. Incremental refactoring (50,000 to 90,000 EUR) is almost always better than a full rewrite (90,000 to 250,000 EUR), unless the data model itself no longer fits the business. Either way, freeze scope before signing: projects without a frozen scope overrun by 30 to 50% on average.

Refactor or rewrite: the 2026 comparison

Orders of magnitude for an application of 80,000 to 150,000 lines of code, Berlin vendors (2026 estimates).

CriterionIncremental refactoringFull rewrite
Budget50,000 to 90,000 EUR90,000 to 250,000 EUR
Duration3 to 8 months, in batches6 to 18 months
App usable during the workYes, continuouslyOld version frozen until cutover
Overrun risk10 to 20%30 to 50% without frozen scope
Business rules hidden in codePreservedTo be rediscovered, the top source of bugs
Performance gain2 to 5 times after upgrading to PHP 8.3Varies with the new architecture
Relevant ifThe data model is still validThe business has changed deeply since 2012

At Kolonell, these projects fall into our complex applications range: 7,000,000 to 15,000,000+ FCFA (about 10,670 to 22,870+ EUR), with an initial audit, regression tests and a supported cutover.

The step-by-step refactoring plan

The safest method is the strangler fig pattern: replace the application module by module, with the old code still serving whatever has not migrated yet.

StepContentIndicative costDuration
1. AuditCode map, dependencies, vulnerabilities, data volumes6,000 to 12,000 EUR2 to 3 weeks
2. Safety netEnd-to-end tests on the 20 critical user flows8,000 to 15,000 EUR3 to 4 weeks
3. Version upgradePHP 5 to PHP 8.3, replacing removed functions (mysql_*)12,000 to 22,000 EUR4 to 8 weeks
4. FrameworkGradual migration to Symfony or Laravel, module by module18,000 to 30,000 EUR2 to 4 months
5. InfrastructureContainers, automated deployment, backups6,000 to 11,000 EUR2 to 3 weeks

Signals that demand action in 2026

  • Hosting: most shared hosts no longer offer PHP 5, and extended support fees are soaring.
  • Security: SQL injection and insecure sessions are common in code from that era.
  • Hiring: a freelance PHP developer willing to maintain untested legacy code costs 700 to 950 EUR a day in Berlin.
  • Compliance: an incident affecting customer data exposes the company under GDPR, with the Berlin data protection authority as regulator.

Mini case study

Illustration: Lukas, IT director of a fictional 120-employee wholesale SME in Berlin-Spandau, pays 30,000 EUR a year in corrective maintenance and 8,000 EUR for special hosting on a PHP 5 tool. He is torn between a rewrite quoted at 180,000 EUR and a refactoring at 75,000 EUR. With a likely 40% overrun, the rewrite would actually cost about 252,000 EUR. The refactoring, even with a 15% overrun, comes to 86,250 EUR and brings maintenance down to 12,000 EUR a year: the 26,000 EUR in annual savings repays the project in just over 3 years, versus nearly 10 years for the rewrite.

Need a professional website?

Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.

Prefer a call back?

Leave your WhatsApp number and a Kolonell expert will get back to you within 1 business day. Free, no strings attached.

You are :

FAQ

Can we keep the same database?

In 80% of cases, yes, with targeted fixes (indexes, UTF-8 encoding, foreign keys). It is one of the main advantages of refactoring over rewriting.

How long will the app be unavailable?

With incremental refactoring, a few hours per cutover, scheduled off-hours. A rewrite forces a single cutover, often over a weekend, with 1 to 2 weeks of stabilization.

Should we write tests before touching the code?

Yes. About twenty end-to-end tests on critical flows cost 8,000 to 15,000 EUR in Berlin and prevent most regressions.

When is a rewrite justified?

When more than 60% of screens or the data model must change, or when the app must become a multi-tenant product. Otherwise refactoring stays cheaper and less risky.

What should follow modernization?

Regular maintenance to avoid rebuilding debt: at Kolonell, 35,000 to 120,000 FCFA per month depending on service level, version upgrades included.

Let's scope your project. Send us your PHP version, approximate code size and critical modules: we propose an audit then a modernization plan from 7 to 15+ M FCFA, delivered in 4 to 8 week batches. Detailed quote within 48 h. WhatsApp +221 77 596 93 33.

Tags:#legacy application#PHP modernization#software rewrite#refactoring#IT director Berlin#technical debt
Share:

Mohamed Bah

Fondateur, Kolonell

Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.