Skip to content
Coder Studios

Services

Migrate to Laravel

Move an out-of-date PHP application or unsupported framework onto a modern, secure Laravel codebase — step by step, without losing your data, your URLs or the business rules that already work.

Who this is for

Organisations whose application is built on something that has stopped moving:

  • a framework that is no longer maintained, such as CodeIgniter 2 or 3, CakePHP 1 or 2, Zend Framework, Yii 1, Symfony 1 or Kohana;
  • custom PHP written years ago, without a framework, Composer or tests;
  • an application that can’t move to a supported PHP version because its framework won’t run on it;
  • a WordPress site that has grown into a web application and is now fighting the platform;
  • a codebase that is hard to hire for, because developers don’t want to work on an obsolete stack.

Why move to Laravel

  • Security — a maintained framework with a published support policy and regular security releases, on a supported PHP version.
  • Hiring and handover — Laravel is the most widely used PHP framework, with conventions any experienced Laravel developer will recognise.
  • Built-in features — authentication, queues, scheduling, email, notifications, file storage, caching and testing, instead of home-grown versions of each.
  • Lower running costs — less custom infrastructure code to maintain, and upgrades that are routine rather than a project.

We’re not neutral about this: we choose Laravel for our own products. But we’ll tell you if a migration isn’t worth it — sometimes upgrading what you have is the better option. See legacy modernisation.

How we migrate without a big-bang rewrite

We use the strangler fig approach: the new Laravel application sits in front of the old one and takes over one area at a time, while everything not yet migrated keeps working.

  1. Inventory — map routes, database tables, scheduled jobs, integrations, emails and the URLs search engines have indexed. Find out which features are still used.
  2. Secure the old system — fix critical vulnerabilities in the legacy code and server first, so it is safe while it’s still running. Our PHP & NGINX security audit covers this.
  3. Put Laravel in front — route requests through Laravel, passing anything it doesn’t handle yet to the legacy application. Share sessions or sign-in so users never notice the join.
  4. Pin down behaviour — write tests against what the old system actually does, including the odd rules nobody documented, before reimplementing each area.
  5. Move one area at a time — rebuild each feature in Laravel, release it, and retire the old code for that area. Start where the value or the risk is highest.
  6. Switch off the old application — when nothing routes to it any more, remove it and tidy the database schema.

What moves across safely

  • Data — the existing database is used in place, then improved with migrations. Where data has to be transformed, the migration is scripted, tested on a copy and repeatable.
  • Users and passwords — old hashes are verified once and rehashed on login, so nobody is forced to reset.
  • URLs and SEO — existing URLs are kept or permanently redirected, with titles, descriptions and structured data preserved. See technical SEO.
  • Integrations — payment providers, accounting systems, APIs and data feeds are moved behind clear interfaces in Laravel. See APIs & integrations.
  • Business rules — captured in tests before they are rewritten, so the new code behaves the way your users expect.

Common migrations

CodeIgniter to Laravel

CodeIgniter’s MVC structure maps closely onto Laravel’s controllers and views, so migration is often fast. The main work is replacing CodeIgniter’s query builder and libraries with Eloquent and Laravel services, and moving configuration into environment variables.

CakePHP to Laravel

CakePHP’s conventions for tables and associations translate well into Eloquent relationships. Older CakePHP 1.x and 2.x applications often also need a PHP upgrade, which the migration resolves at the same time.

Zend Framework, Yii and Symfony 1 to Laravel

These applications tend to be larger, with deeper layers of configuration. We migrate them module by module, often starting with the admin or reporting areas, which carry less risk than the customer-facing pages.

Custom PHP to Laravel

For applications without a framework, we usually introduce Composer, an autoloader and tests in the existing code first, then move each page or script behind Laravel’s routing. This is often the biggest improvement in security, because hand-written database and session code is replaced with a framework that handles it properly.

Relevant experience

We’ve worked with CakePHP, Symfony-based, WordPress and completely custom PHP codebases as well as Laravel, which we’ve used since version 4.2. Much of our client work is long-term support of existing applications, including years of work on a custom PHP application that was beyond an agency’s normal skillset. Our own products, PaidProper and DoRevision, run on Laravel — it’s the platform we trust with our own business.

How an engagement usually works

We start with a review of the existing application and a written migration plan, broken into phases you can approve one at a time. The first phase usually secures the current system and puts Laravel in front of it. From there, each release moves another part of the application across. Once the migration is finished, we can keep the new application up to date and secure.

Common questions

Which frameworks can you migrate to Laravel?
Any PHP application can be moved to Laravel. The most common starting points are CodeIgniter 2 and 3, CakePHP 1 to 3, Zend Framework 1 and 2, Yii 1, Symfony 1, Kohana, FuelPHP, Slim and custom PHP written without a framework. We also move bespoke features out of WordPress into a Laravel application where WordPress has become the wrong tool.
Should we migrate or rewrite from scratch?
Migrate. A big-bang rewrite delivers nothing until it is finished and has to rediscover every rule the old system already handles. An incremental migration runs the old and new code side by side and moves one area at a time, so each step is useful and reversible.
Will our URLs and search rankings be affected?
They should not be. We inventory every indexed URL before work starts, keep existing URLs where possible and add permanent redirects where they must change. Titles, descriptions, structured data and sitemaps move across with the pages they belong to.
Can we keep our existing database?
Usually, yes. Laravel can work with an existing schema, including unusual table and column names. We tidy the schema gradually with migrations once the new code owns that area, rather than all at once.
Will users have to reset their passwords?
No. Old password hashes such as MD5, SHA-1 or framework-specific formats can be verified on next login and transparently upgraded to a modern hash, so users sign in exactly as before.
How long does a migration to Laravel take?
It depends on the size of the application and how much of it is still used. Many applications have large areas nobody uses, which do not need migrating at all. After a review we give you a phased plan, with the first useful release typically weeks rather than months away.
  • PHP & NGINX security audit

    Find the vulnerabilities in your PHP application, PHP-FPM and NGINX configuration before someone else does, with a prioritised fix list.

Related insights

  • Laravel vs WordPress — Laravel and WordPress compared from a developer’s point of view, and why we usually choose Laravel for web applications.

Contact

Have a web project?

Tell us what you’re building, what isn’t working, or what you’re trying to improve.