Websites11 min read

Rewriting a Legacy PHP SaaS in TypeScript: Cost and Strategy (2026)

Mohamed Bah·Fondateur, Kolonell
October 10, 2026
Share:
Rewriting a Legacy PHP SaaS in TypeScript: Cost and Strategy (2026)

Rewriting a Legacy PHP SaaS in TypeScript: Cost and Strategy (2026)

Websites

The verdict in three sentences

For a vendor at EUR 1.2M ARR whose PHP code dates from 2012, a full rewrite in TypeScript costs EUR 150,000 to 400,000 excl. VAT over 9 to 15 months, during which the roadmap is frozen and customers wait. Progressive migration with the strangler pattern, billed at EUR 8,000 to 15,000 a month, replaces the system module by module behind a single facade and delivers visible gains from month three. Unless your codebase is unworkable or your business model is changing radically, the progressive strategy is the safest for your churn and your cash flow.

Full rewrite versus progressive migration

The table below compares both approaches for a mid-sized B2B SaaS (200,000 to 400,000 lines of PHP, 40 to 80 screens, 300 to 800 customers).

CriterionFull rewrite (big bang)Progressive strangler pattern
BudgetEUR 150,000 to 400,000 excl. VATEUR 8,000 to 15,000 excl. VAT per month, i.e. EUR 96,000 to 270,000 over 12 to 18 months
Duration9 to 15 months before go-liveFirst module in production in 8 to 12 weeks
Product roadmapFrozen or duplicatedMaintained at 60 to 70% capacity
Overrun risk30 to 60% observed on this type of projectAdjustable every month
Regression risk at launchHigh, everything switches the same dayLow, switch per feature
Churn impactFrequent 1 to 3 point increase in launch yearNeutral if tests are solid
Ability to stop midwayNo, investment lostYes, each delivered module is kept

A full rewrite is only justified in two cases: a home-grown framework without tests where every change breaks something else, or a pivot to a multi-tenant architecture incompatible with the current data model.

The progressive migration plan in practice

The principle: a facade (reverse proxy or API gateway) receives every request and routes it to the old PHP or the new TypeScript service (Node.js, NestJS or Next.js), depending on the route. You migrate first what earns money or what blocks.

StepScopeIndicative durationIndicative budget excl. VAT
Audit and mappingDependencies, test coverage, critical modules, database3 to 4 weeksEUR 12,000 to 20,000
Safety netEnd-to-end regression tests (Playwright) on the 30 key journeys4 to 6 weeksEUR 15,000 to 25,000
Facade and authenticationProxy, shared SSO between old and new code3 to 4 weeksEUR 10,000 to 18,000
Module 1: billing or dashboardThe module customers ask for most2 to 3 monthsEUR 20,000 to 40,000
Following modulesOne module every 6 to 10 weeks6 to 12 monthsEUR 8,000 to 15,000 per month
PHP decommissioningDead code removal, final data migration1 to 2 monthsEUR 10,000 to 20,000

The database is the hard part: share it between both worlds first, then split it. Migrating the database first is the most expensive mistake we see.

The metrics to track every month

During migration, four metrics are enough to steer. Monthly churn (alert above +0.5 point), support tickets per migrated module, average lead time for a feature (it should drop 30 to 50% on migrated modules) and the share of traffic served by TypeScript. A healthy vendor goes from 0% to 70% of migrated traffic in 12 months.

Mini case study

Camille, CEO of an HR software vendor in Nantes, runs EUR 1.2M ARR with 450 customers. Her team of 5 developers spends 45% of its time fixing regressions in the 2012 code.

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 :
  • Big bang option quoted: EUR 280,000 excl. VAT, 12 months, roadmap frozen. If churn rises 2 points, the loss reaches EUR 24,000 of ARR, and each month of delay costs about EUR 23,000.
  • Progressive option chosen: EUR 12,000 excl. VAT per month for 16 months, or EUR 192,000, with 60% of internal capacity still on the roadmap.
  • After 6 months, billing and the dashboard run on TypeScript: bug-fixing time drops 40%, freeing the equivalent of 0.9 developer, about EUR 60,000 a year.

Final gap: EUR 88,000 saved on budget, with no product freeze and no churn increase.

FAQ

Why TypeScript rather than modern PHP 8?

PHP 8 with Laravel or Symfony remains a valid option and is 20 to 30% cheaper. TypeScript makes sense if you share code between front and back end, mostly hire JavaScript profiles or target real-time features.

How many developers does a progressive migration need?

A team of 2 to 3 external senior developers, i.e. EUR 8,000 to 15,000 a month, working alongside your in-house team. Beyond that, coordination slows things down more than it speeds them up.

Should customers be told?

Yes, for visible modules: announce a new interface 4 weeks ahead, with an optional switch for 2 to 4 weeks. This halves support tickets.

How do we avoid regressions?

With a suite of 30 to 60 end-to-end tests run on every deployment, built before touching the code. This safety net costs EUR 15,000 to 25,000 and prevents most production incidents.

Can AI translate PHP into TypeScript?

It speeds up business logic conversion by 20 to 35%, but it does not replace architectural redesign. Every converted file must be reviewed and covered by tests.

Let's scope your project. Share your codebase size, ARR and critical modules: we propose an audit followed by a migration plan priced at EUR 8,000 to 15,000 excl. VAT per month, or a fixed-price rewrite if it is justified. Detailed quote within 48 h. WhatsApp +221 77 596 93 33.

Tags:#SaaS rewrite#legacy PHP#TypeScript#strangler pattern#technical debt#rewrite 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.