Laravel · Web apps · Security
How to Upgrade an Old Laravel App Without Breaking It
Upgrade an old Laravel app one major version at a time, on a copy of the live site, with automated tests around the most important user journeys. Update packages, fix deprecated code, test, then deploy with a rollback plan, so customers never notice the change, except that things get faster and safer.
By Sajjad Liaqat · · 4 min read

Many businesses run on a Laravel app that was built years ago and "still works". Then one day the hosting company drops support for an old PHP version, a payment package stops working, or a developer says a new feature "can't be added on this version". At that point an upgrade stops being optional.
The good news is that an upgrade doesn't have to be risky. We upgrade live Laravel systems regularly, and the process below is how we keep them running while we do it.
Why old Laravel versions become a problem
- Security. Each Laravel release gets security fixes for a limited time. After that, newly found problems are not fixed for your version.
- PHP support. Hosting providers retire old PHP versions. An app tied to an old PHP version can suddenly stop working after a server update.
- Packages. Payment, email and storage packages move on. Old versions stop receiving fixes, and some external APIs stop accepting old integrations.
- Developers. It is harder and slower to work on code that uses patterns nobody writes any more, so every new feature costs more.
Step 1: Find out exactly what you have
Before changing anything, write down:
- The current Laravel version (in
composer.jsonorcomposer.lock). - The PHP version on the live server.
- Every package and its version.
- Which parts of the app matter most: logins, bookings, payments, reports, admin screens.
- Any custom code that changes how Laravel behaves.
This is your map. It tells you how many versions you need to jump and which packages will need attention.
Step 2: Make a safe copy
Never upgrade on the live site. Create a copy:
- the code in Git, on a new branch
- a copy of the database (with personal data masked if the copy lives on a developer's machine)
- the same PHP version as the live server, so you start from something that works
Check that the copy behaves exactly like the live site before you change a single line.
Step 3: Put tests around what matters
If the app has no tests, don't try to test everything. Write a small number of tests that cover the journeys that would cost you money if they broke:
- a customer can sign up and log in
- a booking or order can be created
- a payment succeeds and is recorded
- the admin can see and edit the important records
- key emails are sent
These tests are your safety net. Run them before the upgrade, after each step, and before going live.
Step 4: Upgrade one major version at a time
It is tempting to jump straight to the latest version. Don't. Go one major version at a time and follow the official upgrade guide for each step. At every step:
- Update the Laravel version and the packages that depend on it.
- Read the "breaking changes" list for that version and search your code for each one.
- Fix deprecated code and configuration.
- Run your tests and click through the main journeys by hand.
- Commit, then move to the next version.
Small steps make problems easy to find. If something breaks, you know it was caused by the last step, not one of five.
Step 5: Update PHP
Move the copy to a supported PHP version once the Laravel version allows it. Newer PHP versions are usually faster, and some packages require them. Run the tests again.
Step 6: Replace dead packages
Some packages will have been abandoned. For each one, decide whether to:
- move to a maintained alternative
- use a feature that Laravel now includes itself
- rewrite the small piece of code you actually need
Payment and authentication packages deserve extra care: test real payments in the provider's test mode before going live.
Step 7: Clean up while you're there
An upgrade is a good moment for small improvements that make the next upgrade easier:
- remove code and packages nobody uses
- move hard-coded settings into configuration
- fix warnings in the logs
- add the missing database indexes that slow pages down
Keep these changes small and separate from the upgrade itself, so they are easy to review.
Step 8: Deploy with a way back
On launch day:
- Take a full backup of the live database and files.
- Put the site into maintenance mode for a few minutes if database changes are needed.
- Deploy the upgraded code and run migrations.
- Run your checks on the live site: log in, make a test booking, check the admin.
- Watch the error logs closely for the first hours and days.
Keep the previous version ready, so you can roll back quickly if something unexpected appears.
How long does an upgrade take?
It depends on how many versions you need to jump, how many packages are involved and how much custom code there is. A small app a version or two behind is a very different job from a large system several versions behind with abandoned packages. A short code review answers the question for your app, and it is the first thing we do.
Signs you should upgrade now
- Your hosting provider has warned about an old PHP version.
- A payment or email integration has started failing.
- Developers keep saying a feature is "hard on this version".
- You haven't installed updates for a long time.
Need help?
We upgrade and maintain Laravel applications, add features to live systems without breaking what already works, and leave the code cleaner than we found it. See our Laravel development service, or read Laravel vs WordPress costs if you're deciding what to build next. You can also get in touch for a short review of your app.


