Websites11 min read

Modernizing a PHP 5 legacy business app in Toronto: refactor or rewrite, 2026 cost

Mohamed Bah·Fondateur, Kolonell
October 7, 2026
Share:
Modernizing a PHP 5 legacy business app in Toronto: refactor or rewrite, 2026 cost

Modernizing a PHP 5 legacy business app in Toronto: refactor or rewrite, 2026 cost

Websites

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

Option2026 budget (excl. tax)TimelineDowntime riskBest for
Code audit and mappingEUR 3,000 to 6,0002 to 4 weeksNoneEvery project, mandatory step
Minimal hardening (server, dependencies)EUR 8,000 to 15,0001 to 2 monthsLowBuying 12 to 18 months
Refactor and PHP 8 upgradeEUR 30,000 to 60,0004 to 8 monthsLow to mediumStructured code, sound business logic
Progressive module migrationEUR 60,000 to 120,0006 to 12 monthsLowUneven code, critical operations
Full rewriteEUR 90,000 to 180,0009 to 15 monthsHigh at cutoverUnusable code, very different needs
Replacement with off-the-shelf softwareEUR 15,000 to 50,000 + licenses3 to 6 monthsMediumStandard 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.

StepScopeIndicative durationIndicative cost (excl. tax)
1. Audit and split planModule map, technical debt, data3 weeksEUR 4,500
2. Technical foundationPHP 8 server, CI, tests, routing4 to 6 weeksEUR 12,000
3. Module 1 (most used)Rewrite, data migration6 to 8 weeksEUR 18,000
4. Modules 2 to 4Same method, one module per batch4 to 6 monthsEUR 45,000
5. DecommissioningOld code shutdown, archiving3 weeksEUR 6,000
TotalModernized application8 to 11 monthsabout 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.

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.

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.

Tags:#legacy modernization#legacy code#PHP#Toronto#rewrite#2026 cost
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.