The verdict in three sentences
For a 180,000-line PHP 5 application, a refactor with an upgrade to PHP 8 costs roughly EUR 30,000 to 60,000 (USD 33,000 to 66,000), versus EUR 90,000 to 180,000 for a full rewrite. For most mid-sized companies, the right answer is a progressive module-by-module migration (strangler pattern), which spreads the effort over 6 to 12 months with no downtime. Everything starts with a code audit at EUR 3,000 to 6,000, the only way to price the real risk before signing.
Why a PHP 5 application becomes a business risk
PHP 5.6 has received no security patches since the end of 2018. A 12-year-old application often runs on an old Linux server, with abandoned libraries and a MySQL 5.x database. The problem is not only technical: when the only developer who knew the code has left, every bug becomes an investigation and every change a gamble.
Warning signs for a CEO:
- the hosting provider announces end of support for the installed PHP version;
- a simple form change takes several days;
- there is no documentation and no automated tests;
- customer data (invoices, contracts, files) is exposed to known vulnerabilities, a direct privacy compliance issue (PIPEDA in Canada, GDPR in Europe).
Audit, refactor, rewrite or progressive migration: 2026 figures
| Option | 2026 budget (excl. tax) | Timeline | Downtime risk | Best for |
|---|---|---|---|---|
| Code audit and mapping | EUR 3,000 to 6,000 | 2 to 4 weeks | None | Every project, mandatory step |
| Minimal hardening (server, dependencies) | EUR 8,000 to 15,000 | 1 to 2 months | Low | Buying 12 to 18 months |
| Refactor and PHP 8 upgrade | EUR 30,000 to 60,000 | 4 to 8 months | Low to medium | Structured code, sound business logic |
| Progressive module migration | EUR 60,000 to 120,000 | 6 to 12 months | Low | Uneven code, critical operations |
| Full rewrite | EUR 90,000 to 180,000 | 9 to 15 months | High at cutover | Unusable code, very different needs |
| Replacement with off-the-shelf software | EUR 15,000 to 50,000 + licenses | 3 to 6 months | Medium | Standard processes |
These ranges match senior PHP, Symfony or Laravel day rates of EUR 450 to 650 (in Toronto, CAD 700 to 1,000 per day is a comparable band). A francophone nearshore team can cut the bill by 30 to 40 %, provided steering stays close to the business.
How the strangler pattern works in practice
The principle: you do not rip out the core of the old application at once. You place a routing layer in front of it, then rebuild module by module (quotes, scheduling, invoicing, customer portal) on a modern stack. Each delivered module replaces the old one, users switch without noticing, and the old application shrinks until it disappears.
| Step | Scope | Indicative duration | Indicative cost (excl. tax) |
|---|---|---|---|
| 1. Audit and split plan | Module map, technical debt, data | 3 weeks | EUR 4,500 |
| 2. Technical foundation | PHP 8 server, CI, tests, routing | 4 to 6 weeks | EUR 12,000 |
| 3. Module 1 (most used) | Rewrite, data migration | 6 to 8 weeks | EUR 18,000 |
| 4. Modules 2 to 4 | Same method, one module per batch | 4 to 6 months | EUR 45,000 |
| 5. Decommissioning | Old code shutdown, archiving | 3 weeks | EUR 6,000 |
| Total | Modernized application | 8 to 11 months | about EUR 85,000 |
The decisive cash-flow advantage: the budget can span up to three fiscal years and each batch can be stopped or reprioritized. A full rewrite, by contrast, locks the investment until the final cutover, with a tunnel effect often underestimated by 30 to 50 %.
Mini case study
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
Mark, CEO of a 45-employee maintenance services company in Toronto, runs a 180,000-line PHP 5 application for field jobs and invoicing. His last contractor has closed shop. The audit (EUR 4,500) shows that 60 % of the business code is reusable and that two modules account for 80 % of incidents.
He compares: a full rewrite quoted at EUR 140,000 over 12 months, versus a progressive migration at EUR 85,000 over 10 months. The EUR 55,000 gap funds more than two years of ongoing maintenance. On top of that, monthly incidents drop from 14 to 3 as soon as the first module ships, saving about 20 hours of internal support per month, roughly EUR 9,600 a year at a loaded cost of EUR 40 per hour.
FAQ
How much does a PHP code audit cost in 2026?
Budget EUR 3,000 to 6,000 for an application of 100,000 to 200,000 lines. The deliverable should include a module map, a vulnerability inventory and a cost estimate per scenario.
Can you jump straight from PHP 5 to PHP 8?
Yes, but rarely without rewriting part of the code: removed functions, stricter typing, obsolete mysql extensions. Expect 15 to 30 % of the code to need changes depending on its original quality.
Is a progressive migration more expensive than a rewrite?
On paper it can cost about the same, but the overrun risk is lower: 10 to 15 % on average versus 30 to 50 % for a tunnel rewrite. And operations never stop.
How long should we plan for?
4 to 8 months for a refactor, 6 to 12 months for a module migration, up to 15 months for a full rewrite of 180,000 lines.
Should we keep the same database?
Often yes at first: it is cleaned and migrated to MySQL 8 or PostgreSQL 16, which represents EUR 5,000 to 12,000 depending on data volume and quality.
Let's scope your project. Send us access to your code or a description of your application: we price the audit, the recommended scenario and a phased plan, starting from EUR 3,000. Detailed quote within 48 h. WhatsApp +221 77 596 93 33.
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.