Skip to content

PHP websiteand system rewrite

Your website or business system still runs on a PHP version with no more patches, on CodeIgniter or on in-house code written fifteen years ago. Witify rebuilds it on a current foundation, without losing a single business rule or a single line of history.

Get your PHP system assessed

Illustration of a person pinning a note to a checklist where every line is ticked
For
SMEs, large companies, public bodies
Technologies
PHP, Laravel, Vue, MySQL
Team
Montréal, across Québec

01 When

When a rewrite becomes the answer

The screens still work. It is the foundation giving way: the PHP version, the framework, the libraries. These signs say it is time to replace it.
PHP code on screen, in an editor
  1. A PHP version with no more patches

    Each PHP version gets security patches for a few years, then nothing. Sooner or later the host removes it: the system has to follow or stop.

  2. A framework nobody maintains any more

    CodeIgniter 2, Symfony 1, Zend Framework 1, CakePHP 2: their communities have moved on. A flaw found today will never be fixed there.

  3. Locked dependencies

    One library cannot be updated without breaking three others. The system stays frozen where it was.

  4. Code nobody dares touch

    The person who wrote it is gone, and the documentation never existed. Every fix costs more than the last: that is technical debt piling up.

  5. Known security flaws

    Hand-built SQL queries, MD5 passwords, no CSRF protection, uploaded files never checked. A newer PHP version fixes none of them.

An old PHP system does not always need a rewrite. When its architecture holds, an upgrade costs less and does the job.

The system is then modernized in stages, without downtime. A code audit compares both paths, with their costs, before you commit.

02 Stacks

The PHP stacks we take over

From framework-free PHP to the first versions of Laravel, each stack has its traps and its destination.

01

PHP without a framework

HTML, SQL and business rules mixed in the same files, often written by a single person. We untangle them so each rule gets its own place.

02

CodeIgniter 2 and 3

Controllers that do everything, SQL all the way into the views. The database itself can often be kept as it is.

03

Symfony 1 to 4 and Zend Framework

Structured projects, frozen on a version too old to upgrade in place. Destination: a current Symfony or Laravel, depending on your team.

04

CakePHP, Yii, FuelPHP, Slim, Phalcon

Still working, but fewer and fewer developers know them. The risk: finding who will maintain them five years from now.

05

WordPress and Drupal turned into applications

A website turned into a management system one plugin at a time. We split the marketing site from the application, each on the tool made for it.

06

Laravel 4 to 8

The structure is already right. We move up one version at a time rather than rewrite it all.

03 Reading

Read the code before writing a single line

A rewrite rarely fails for technical reasons. It fails when a business rule buried in an old file was never written down. So we read the code and the database, then confirm each rule with the people who apply it.

The source

A rule written nowhere else

The partner discount fit in three lines of a file from 2011. Only the code kept track of it.

The inventory

Every rule found, confirmed or retired

Each rule gets a verdict, decided with your team: keep it, fix it or retire it. The specification starts from this list.

04 Method

From the first file read to go-live, seven steps

The same method as for new software, with one difference: at every step, the old system is the reference.

01 Discovery

We meet the people who use the system.

One meeting per team: what the system does well, what slows them down, what it does without anyone knowing why. Each need is written down in their words, then ranked.
Fig. 01 The discovery meetings board

02 Analysis

We take stock of the current system.

Code, database, scheduled jobs, files and hosting: we list what the system does and what it depends on. For each piece, we decide what stays, what is rewritten and what goes.
Fig. 02 The map of the current system

03 Data model

We decide what to keep from the database.

A sound database is kept as it is. Otherwise we draw the new model and map every old column onto it. You approve it before any migration.
Fig. 03 The data model, approved with you

04 Mockups

We review each screen with the people who use it.

Screens that work keep their logic and their field order. Screens that slow people down are rethought. Every mockup is reviewed before it is built.
Fig. 04 The mockup of a screen carried over

05 Specification

Every rule found is written down, then approved.

The rules inventory becomes the specification: what the system must do, with the example that proves it. You approve it before development starts.
Fig. 05 A page of the specification

06 Development

The new system is built beside the old one.

The work moves in one-week sprints, followed by a dedicated project manager, while the old system stays in service. Sprintify, our ready-made components and AI-assisted code generation, provides the standard screens. The rules that are yours are written by hand.
Fig. 06 The week’s board

07 Quality

Every change is reviewed and tested before it reaches you.

A senior developer reviews every change. Static analysis and automated tests follow, including the tests of every confirmed rule. What passes lands in staging, where you approve it.
Fig. 07 One change, from code review to staging

05 Quality

A new system, easy to hand over

A rewrite replaces code nobody dares touch. The new code must be able to change hands without starting over. The risks specific to a rewrite, and what covers them.
  1. Rules guarded by tests

    The risk
    A rule gets lost along the way. A customer is the one who notices.
    Our choice
    Every confirmed rule gets its automated tests, run again before each release.
    The gain
    The system evolves without a rule changing silently.
  2. Rules written down, not only coded

    The risk
    The knowledge leaves with the person who wrote the code, just like last time.
    Our choice
    The rules inventory and the specification are handed over with the system.
    The gain
    The next person starts by reading a document, not thousands of lines.
  3. Code others can take over

    The risk
    Trading a dependence on one developer for a dependence on another.
    Our choice
    A widely used framework, familiar conventions, tests and documented code.
    The gain
    Another PHP team finds its way without rereading everything.

The new stack

Our developers work with several languages and frameworks. For a PHP rewrite the destination is most often Laravel, sometimes Symfony, always on supported versions. See our technologies

Application
PHP, Laravel, supported versions, planned upgrades
Interfaces
Vue, TypeScript, Tailwind CSS
Data
MySQL, PostgreSQL, versioned migrations instead of hand-run SQL scripts
Quality
Automated tests, static analysis, code review by a senior developer
Hosting
ISO 27001 and SOC 2 certified servers, automated deployment
Monitoring
Sentry, every error reported to the team

06 AI

AI reads the old code, people decide

An old system means thousands of lines to understand before rewriting a single one. Our developers get help from AI there. The hours saved on that mechanical work come off the estimate.

How we use it

  • Finding where the SQL queries, duplicated rules and scheduled jobs live.
  • Drafting the tests that pin down current behaviour, before anything is touched.
  • Preparing the scripts that convert the old tables to the new model.
  • Documenting what was read, file by file.

What it gives you

  • An inventory of the system earlier in the project.
  • Tests in place before the first line is rewritten.
  • The documentation the old system never had.
  • A budget focused on the rules that are yours.

What it does not replace

  • Deciding whether an unexpected rule is intended or accidental: only the person who applies it knows.
  • Choosing what to keep, what to fix and what to retire.
  • Review: a senior developer reviews what it suggests, and the tests check it like the rest of the code.
  • Our commitment: we answer for the code we deliver, however it was written.

And once the rewrite is done?

Up-to-date code and clean data also make it possible to plug AI into the software: reading incoming purchase orders, sorting requests, answering a question about your figures. We start with the task whose time savings are easiest to measure.

Discover our AI integration service

07 Data

The new system proves itself before replacing the old one

While the new system is built, the old one stays in service. Before the cutover, we replay your real data through both and compare the results, check by check. The cutover waits until everything matches.

The replay

Three months of invoices, replayed through both systems

Reading the code finds most of the rules. Replaying real data finds the rest: here, a tax rounding nobody had noticed.

The addresses

Site addresses, kept or redirected

Every address Google has indexed is listed before work starts. It stays the same whenever possible. Otherwise, a 301 redirect leads to the new page.

08 Launch

A cutover rehearsed before the big day

Cutover day should reveal nothing new. Every move made that day has already been made in staging.
  1. Dress rehearsal A full copy of the data loaded into staging, start to finish.
  2. Acceptance tests Your key users replay their day in the new system.
  3. Addresses and access Redirects, domain name, certificates and accounts ready in advance.
  4. Planned cutover Outside operating hours, with a rollback ready before it starts.
  5. Settling in Close monitoring, quick fixes and training for your teams.

09 After

After the rewrite, a team that knows your system

The rewrite settles the past; what comes next is still to decide. We stay at your side as a technology partner: we measure what changed, spot the work still done by hand and advise you on what is worth building. Day-to-day upkeep (updates, monitoring, fixes) is part of our support and maintenance offer.

01

Measure what the rewrite changed

The pain points noted at discovery are the starting point: processing time, errors, support requests. After the cutover, we measure again with you.

02

Reopen the requests set aside

Additions the old code made too risky become possible again. We price them and rank them with you by what they bring to your operations.

03

Hand the software what is still done by hand

Exports retyped into Excel, emails sent one by one, checks redone every month: we propose automation or AI where the time saved justifies the effort.

04

See end of life coming

We track the PHP, framework and library calendars and plan the upgrades with you. The next end of life becomes a planned step, not another rewrite.

10 Case study

Software rebuilt without losing its history

CuistotNet already ran Cuistot du Marchand’s recipes, orders and years of invoices. Witify rebuilt it and moved 20 data tables from the old system into it. The cutover took one weekend: on Monday morning, every kitchen found its recipes, at the same address.

View all projects

  • Cuistot du Marchand

    In-store prepared meals

    The store orders. Cooked, logged, invoiced.

    Custom ERP, Custom software

Thanks to the new solution developed by Witify, reports are now generated five times faster . This solid foundation gives us all the freedom to adapt and evolve the software according to our needs, today and for the years to come.

Benoît Pilon IT Director, Cuistot du Marchand

11 Questions

Questions and answers

What we are asked most often before a rewrite.

Another question? Write to us at info@witify.io or call 1 800 334 9031.

How much does a PHP system rewrite cost?

The cost depends on the number of screens, the volume of business rules and the state of the database, not on the number of lines of code. A code audit of a few days is usually enough to produce a reliable range. Our article on the cost of custom software development gives the market orders of magnitude.

How long does a PHP rewrite take?

Like the cost, the duration depends on the screens, the rules and the database. The audit produces the schedule. The work then moves forward in one-week sprints delivered to staging: you see the system progress every week. The cutover itself is planned for a weekend or outside operating hours.

Can we migrate from CodeIgniter to Laravel?

Yes, it is a classic migration. No tool reliably converts a whole application: the two frameworks are not built the same way. We keep the database as it is when it is sound, then rewrite the controllers, models and views to match the observed behaviour. Standard screens are generated with Sprintify. The business logic is written by hand.

Our site still runs on PHP 5.6 or PHP 7.4. Is that really a problem?

Yes. PHP 5.6 and 7.4 have received no security patches for years, and the same goes for PHP 8.1 and every version before it. A flaw found today will never be fixed there. Hosts eventually remove these versions, which can take the site offline overnight. That is a deadline better planned than suffered.

Should we rewrite everything or modernize in stages?

Both exist. A progressive modernization fits when the architecture is sound and only the technical foundation is outdated. A full rewrite becomes the better option when every fix breaks something else, when the framework is no longer supported or when nobody understands the code any more. The audit settles the question on facts rather than impressions.

What happens to our historical data?

It is migrated. Replayable scripts transform your current schema into the new model. Before the cutover, reconciliation reports (record counts, financial totals, statuses) compare the old and the new system. Your teams approve them. No migration goes live without that approval.

Will we lose our Google rankings during the rewrite?

Not if addresses are handled with care. We list every indexed address, keep them where possible and put 301 redirects to the new pages in place otherwise. That is what protects the rankings you have earned. A faster site can even help them.

The system has to stay live during the rewrite. Is that possible?

Yes. The old system keeps running while the new one is built in parallel. Depending on the system, the cutover happens all at once or module by module: the audit decides. It is planned with you, often outside operating hours. A rollback procedure is ready before the deployment even starts.

Can we keep the same interface?

Yes, when your users are attached to it. They find their screens and their habits again. We only change what slows the work down, and every change is shown to them as a mockup before it is built.

Our developer left and there is no documentation. Is that possible?

Yes. We read the code, the database and the servers, then confirm each rule with your users. You come out with the documentation the system never had. A confidentiality agreement is signed on request. To take stock of the situation first, the code audit can be ordered on its own.

Do you use AI to rewrite the code?

Yes, under control. AI reads the old code and drafts the tests and the data migration scripts. Our developers decide what is kept and review what it suggests: everything goes through the same code review, the same tests and the same staging as the rest. The hours saved come off the estimate.

Which technologies do you rebuild on?

Our developers work with several languages and frameworks. For a PHP rewrite, we most often recommend a supported version of PHP and Laravel for the application core, and Vue for the interfaces that call for it. We stay on PHP when your team knows it: switching languages without a reason adds risk without benefit. If your team already works with Symfony, a current Symfony is also a destination. Our technologies page details the full stack.

Who owns the code of the new system?

You do. Ownership of the code built for your project is transferred to you once it is paid in full, as our contract sets out.

That ownership holds up in practice: the code is versioned, covered by automated tests and documented, on widely used technologies (Laravel, Vue, MySQL). Another team could take it over if you ever chose to.

Is your PHP system reaching end of life?

In 30 minutes, an expert looks at your system and tells you whether to rewrite it, modernize it or simply upgrade it. You leave knowing where to start.

  • A 30-minute call with an expert, not a salesperson
  • A realistic budget estimate, backed by numbers
  • A concrete action plan, whether you work with us or not
Or write to us

Free. No commitment. Reply within 24 hours.

Names and figures shown in the interfaces are examples.