← Blog Web Development

Upgrading an Old Laravel App: A Step-by-Step Approach

Old Laravel apps on unsupported PHP versions get riskier every month. Here is a practical, step-by-step approach to upgrading without breaking the business.

Upgrading an Old Laravel App: A Step-by-Step Approach

Many businesses run on a Laravel app that was built years ago, works well enough and has not been touched since. The trouble is that the framework and PHP version underneath it stop receiving security fixes, hosting providers drop support and every small change becomes harder. If you need to upgrade old Laravel version apps, this guide explains how we assess the app, choose between stepping through versions and rebuilding, and move to production safely.

Why old Laravel versions become a business risk

Laravel and PHP both have published support policies. Once a version reaches end of life, it no longer gets security patches. Your app may keep running, but any newly discovered vulnerability stays open.

Other problems build up over time:

  • Hosting pressure. Providers eventually remove old PHP versions, forcing a rushed move.
  • Package decay. Third-party packages for payments, PDFs or APIs stop supporting old versions, so integrations break when providers change their APIs.
  • Hiring difficulty. Developers are less familiar with older conventions, so changes take longer and cost more.
  • Slower performance. Newer PHP versions bring performance improvements you are missing out on.

None of this is an emergency on a single day, which is why upgrades get postponed. But the gap grows with every release, and the eventual work becomes larger.

How to upgrade old Laravel version apps, step by step

We follow the same five steps on every legacy upgrade, whether the app is two versions behind or ten.

Step 1: Audit before you touch any code

A good upgrade starts with understanding what you have. In our audits we document:

  • current Laravel and PHP versions, and the server setup,
  • every Composer package and whether a maintained version exists,
  • custom code that overrides framework internals,
  • integrations such as payment gateways, shipping, email and external APIs,
  • scheduled tasks, queues and cron jobs, including any that live outside the app,
  • existing automated tests, if any,
  • data volume and anything unusual in the database.

This audit tells you how far the app is from current Laravel, and where the risky parts are.

Step 2: Choose your route — step through versions or rebuild

There are two main ways to upgrade old Laravel version code, and the right one depends on how far behind you are.

Approach Works best when Watch out for
Incremental upgrade, one major version at a time The app is a few versions behind, code follows Laravel conventions, packages have upgrade paths Many small steps; each needs testing
Rebuild on current Laravel and migrate data The app is many versions behind, heavily customised or mixed with other systems Larger upfront effort; needs careful feature mapping and data migration

Laravel's official upgrade guides cover each major version change, and tools exist to automate parts of the process. For apps from the Laravel 4 era, though, the structure changed so much in Laravel 5 that a structured rebuild is often cleaner than dozens of incremental steps.

Step 3: Build a safety net

Whatever route you choose, you need a way to know you have not broken anything.

  1. Write tests for critical flows first. Checkout, login, invoicing, reports — whatever would hurt most if it failed. Even a small set of feature tests gives you confidence.
  2. Capture current behaviour. Record sample outputs such as invoices, exports and emails so you can compare after the upgrade.
  3. Set up a staging environment that mirrors production, with a copy of real (or properly anonymised) data.
  4. Use version control and small commits, so any regression can be traced and reverted.

Step 4: Upgrade the code and dependencies

For an incremental upgrade, the typical loop for each version is:

  1. Raise the PHP version to the minimum the next Laravel version needs.
  2. Update the Laravel version and related packages in Composer.
  3. Work through the official upgrade guide for that version.
  4. Replace abandoned packages with maintained alternatives.
  5. Run the tests, fix failures and check key flows manually on staging.

For a rebuild, the work looks more like a new project: map every feature and screen, rebuild them on the current version, write migration scripts for the data and run them repeatedly against copies of production until the results match.

Step 5: Plan the cutover

The final switch is where careful planning pays off.

  • Run a full data migration rehearsal on staging and compare record counts and key totals.
  • Freeze non-essential changes on the old system during the final window.
  • Take verified backups immediately before cutover.
  • Keep the old system available read-only for reference.
  • Have a written rollback plan with a clear decision point.
  • Monitor errors, queues and payments closely for the first days.

A real example: from Laravel 4.2 to Laravel 13

RIPT Apparel is a Detroit brand selling limited-edition pop-culture t-shirts, with 3 new designs every day. Their setup combined a WordPress/WooCommerce store with an end-of-life Laravel 4.2 / PHP 5.6 back office.

Because the gap was so large, we chose a rebuild rather than stepping through versions. Everything moved into one Laravel 13 / PHP 8.3 platform: Stripe checkout including Apple Pay and Google Pay, print-on-demand orders sent to CustomCat with tracking, and PayPal artist payouts. 19 scheduled jobs were moved into the app, and 4,720 reviews across 1,768 designs were migrated with their 4.53 average rating intact.

The lesson we took from it is that data migration deserves as much planning as code. Reviews, ratings and order history are part of the business's value.

Common mistakes to avoid

  • Upgrading straight in production. Always work on staging with a copy of real data.
  • Forgetting the scheduler. Cron jobs on the old server are easy to miss and painful when they stop running.
  • Mixing upgrade work with new features. Upgrade first, then add features, or regressions become hard to trace.
  • Skipping the PHP upgrade. A current Laravel on an old PHP version is not possible, and server changes need their own testing.

Our maintenance and support team handles audits and upgrades for legacy apps, and our web development team takes on full rebuilds when that is the better route.

Next steps

Check which Laravel and PHP versions your app runs today and whether they still receive security fixes. If they do not, start with an audit so you know the size of the job. To talk through how to upgrade old Laravel version apps in your business, book a free consultation call.

Frequently asked questions

Can I upgrade Laravel directly from an old version to the latest?

Not usually in one jump. You either upgrade one major version at a time following the official guides, or for very old apps rebuild on the current version and migrate the data.

How long does a Laravel upgrade take?

It depends on how far behind the app is, how much custom code it has and whether tests exist. A small app a couple of versions behind may take days, while a rebuild of a large legacy system can take several months.

Is it safe to keep running an end-of-life Laravel or PHP version?

It will often keep working, but it no longer receives security fixes, and hosts and package providers gradually drop support. The risk grows over time, so plan an upgrade before you are forced into one.

  • Laravel
  • PHP upgrade
  • legacy code
  • maintenance

How we can help with this

Turn this into a real project

Book a free consultation call. We reply with a clear plan, timeline and estimate.

Book a free call