Web Development

How to Upgrade an Outdated Laravel Application: Step-by-Step Plan, Risks and Typical Costs

  • Squartup
  • Nov 28, 2026
  • 2 views
How to Upgrade an Outdated Laravel Application: Step-by-Step Plan, Risks and Typical Costs

If your product runs on a Laravel version that no longer receives security fixes, you are not alone. Plenty of SaaS platforms, internal tools and customer portals were built on Laravel 5, 6 or 8 and then left alone because they kept working. The problem shows up later: a hosting provider retires an old PHP version, a payment SDK drops support, a security advisory lands for a package you cannot update, or a new developer refuses to touch the codebase.

The short answer to "how do I upgrade an old Laravel app?" is this: audit first, add a safety net of tests, then move one major version at a time on a separate branch, upgrading PHP and third-party packages alongside the framework, and release behind a staged rollout with a rollback plan. For a typical small-to-mid-size application, that is usually a 2 to 10 week project. Very large or heavily customised codebases can take longer, and some apps are better served by a partial rebuild. This guide walks through how to decide, how the work is sequenced, what goes wrong, and what it typically costs.

Why upgrading Laravel matters more than it looks

Laravel ships a new major version roughly once a year. Each major release receives bug fixes for about 18 months and security fixes for about two years. Once a version falls outside that window, nobody is patching the framework for you. Being two or three majors behind is common, and the gap compounds: every year you wait adds another set of breaking changes, another PHP version to cross and another round of package updates.

The real business risks are usually not the framework itself but everything around it:

  • Security exposure. Unsupported framework and package versions stop receiving patches, and security questionnaires from larger customers increasingly ask about supported versions.
  • Hosting and PHP end-of-life. Managed hosts and container base images eventually drop old PHP versions. Old Laravel versions cannot run on new PHP, so you get stuck.
  • Integration breakage. Payment, email, storage and analytics SDKs move on. Stripe, AWS and similar libraries drop support for old PHP versions on their own timelines.

Upgrade, refactor or rebuild: making the call

Before anyone opens a pull request, decide what kind of project this actually is. There are three realistic paths.

1. Straight upgrade

The application is reasonably structured, business logic lives mostly in Laravel conventions (controllers, models, jobs, policies) and the main problem is age. You move version by version and fix what breaks. This is the cheapest and fastest path and fits most apps that were built by a competent team and simply not maintained.

2. Upgrade plus targeted refactoring

The app works but has trouble spots: abandoned packages that need replacing, a home-grown auth system, logic duplicated across controllers, or a front end built on an outdated stack. You upgrade the framework while rewriting the specific modules that block it. This is the most common real-world outcome.

3. Rebuild on a current version

Sometimes the honest answer is that the codebase is not worth carrying forward. Signs include almost no separation between logic and views, a heavily forked framework, dozens of abandoned dependencies, or a product whose requirements have changed so much that most screens would be redesigned anyway. Even then, a full big-bang rewrite is rarely the best option. A phased replacement, where new modules are built on a current Laravel version and old ones are retired gradually, is usually safer. We cover that approach in more depth in our guide to legacy application modernization without a risky rewrite.

SituationUsual pathWhy
One or two majors behind, mostly standard Laravel codeStraight upgradeBreaking changes are well documented and contained
Three or more majors behind, several abandoned packagesUpgrade plus targeted refactoringPackage replacement drives most of the effort
Forked framework core or logic mixed into viewsPhased rebuildUpgrading would mean rewriting most files anyway
Product direction has changed significantlyPhased rebuild with new scopeNo point carrying forward screens you will replace

Step 1: Audit the application before estimating anything

An estimate without an audit is a guess. A proper upgrade audit for a small-to-mid-size app typically takes 2 to 5 working days and should produce a written report. Here is what it should cover.

Framework and runtime

  • Current Laravel version and the target version.
  • Current PHP version in production, staging and local environments (these are often different).
  • Server setup: shared hosting, VPS, Forge, Vapor, containers, or something custom.
  • Queue driver, cache driver, session driver and scheduler setup.

Dependencies

  • Every Composer package, its current version, whether it supports the target Laravel and PHP versions, and whether it is still maintained.
  • Front-end dependencies: the build tool (Laravel Mix, webpack or Vite), JavaScript framework versions, and any packages pinned to old Node versions.
  • Packages that have been forked or patched locally. These are the most dangerous items in any upgrade.

Code health

  • Test coverage: how many automated tests exist, and do they pass today?
  • Use of deprecated helpers, facades or framework internals.
  • Custom service providers, macros and overrides of core classes.
  • Authentication and authorisation approach (Laravel's built-in tools, a package, or custom code).

Business context

  • Which flows make money or carry legal risk: checkout, billing, signup, reporting, data exports.

The output should be a ranked list of blockers, a recommended path (upgrade, refactor or phased rebuild), and an estimate with a range rather than a single number.

Step 2: Build a safety net of tests

Most outdated Laravel apps have little test coverage, and upgrading without tests means finding breakages in production. You do not need high coverage, just tests on the paths that matter.

A practical approach is to write feature tests for critical journeys before touching the framework:

  1. List the 10 to 30 most important user journeys: login, password reset, signup, checkout, subscription changes, key admin actions, API endpoints used by mobile apps or partners.
  2. Write a high-level HTTP or feature test for each one that asserts the happy path works and returns the expected status and data.
  3. Add tests for the most important failure paths: invalid input, unauthorised access, expired sessions.
  4. Run the suite on the current version and make it pass. These tests now describe how the app behaves today.
  5. Keep the same tests green at every version step.

Modern Laravel projects commonly use Pest or PHPUnit for this. If the app is very old, you may need to write tests against the older PHPUnit version first and then update the test syntax as you move forward. This step often accounts for 20% to 35% of the total upgrade effort, and it pays for itself many times over: the same tests protect every future release.

Step 3: Plan the version path

The safest route is one major version at a time. Jumping straight from Laravel 6 to the current release in one go sounds faster, but it mixes several years of breaking changes together, so when something fails you cannot tell which change caused it.

Each major step follows the same loop:

  1. Read the official upgrade guide for that version and list every change that affects your code.
  2. Upgrade PHP if the new Laravel version requires it. Check the minimum PHP version for each major before you plan the sequence.
  3. Update composer.json constraints for Laravel and every first-party and third-party package.
  4. Resolve dependency conflicts. This is where abandoned packages surface.
  5. Apply code changes from the upgrade guide.
  6. Run the test suite, fix failures and run a manual smoke test.
  7. Commit, tag and move to the next version.

Automated tools such as Laravel Shift and Rector can apply many known changes for you. They are useful, but they will not decide what to do about an abandoned package or a custom override of a core class. That still needs a developer who understands the app.

Do you need to adopt the new application structure?

Laravel 11 introduced a slimmer default application skeleton, with configuration moved into fewer files and some default directories removed. Upgraded applications do not have to migrate to this new structure. Laravel explicitly supports keeping the older layout. For most upgrades, we recommend leaving the structure alone and focusing on getting to a supported version safely. Restructuring can be a separate, optional piece of work later.

Step 4: Deal with packages and integrations

In practice, packages cause more upgrade work than the framework itself. For every dependency, you will land in one of four buckets:

  • Supported: a newer version supports your target Laravel and PHP. Update it and check the package's own changelog for breaking changes.
  • Replaceable: the package is abandoned but there is a maintained alternative or a first-party Laravel feature that does the same job. Common examples are old authentication scaffolding, role and permission packages, or image handling libraries.
  • Removable: the package is no longer used, or only one small function is used and can be written in-house in a few lines.
  • Forked or custom: the team patched a package locally years ago. These need careful review, and sometimes the patch is no longer needed because the upstream package fixed the issue.

Pay special attention to payments, authentication and file storage. Test these against sandbox accounts, not just with unit tests, because a small change in webhook or token handling can break revenue or lock users out.

Step 5: Database, queues and scheduled jobs

Framework upgrades usually do not require schema changes, but there are a few places that catch teams out:

  • Database versions. If you are also moving to a newer MySQL, MariaDB or PostgreSQL version, test raw queries, strict-mode behaviour and collation differences separately.
  • Model casting and dates. Changes in how dates are serialised or how attributes are cast can quietly alter API responses. Mobile apps and partner integrations that consume your API will notice.
  • Queued jobs. Jobs serialised by the old version may not unserialise cleanly on the new one. Drain queues before deploying, or plan for retrying failed jobs.
  • Scheduled tasks. Confirm every scheduled command still runs, at the right time and in the right timezone, after the upgrade.

Step 6: Staging, release and rollback

An upgrade should never go straight from a developer's machine to production. A sensible release plan looks like this:

  1. Staging environment that matches production: same PHP version, same database engine and version, same queue and cache drivers.
  2. Production-like data: an anonymised copy of production data so that reports, imports and edge cases behave realistically.
  3. User acceptance testing: the client team works through a checklist of critical journeys on staging and signs off.
  4. Release window: a low-traffic period, with the development team available for the following 24 to 48 hours.
  5. Rollback plan: the previous release kept ready to redeploy, a recent database backup, and a clear rule for when to roll back rather than hotfix.
  6. Monitoring: error tracking, queue failure alerts and uptime checks watched closely for the first week.

Common risks and how to reduce them

RiskWhat it looks likeHow to reduce it
Hidden custom codeCore classes overridden in service providers, surprising behaviour after upgradeSearch for overrides and macros during the audit; test those areas explicitly
Abandoned packagesComposer cannot resolve dependencies at a certain versionIdentify replacements in the audit; budget for them separately
Silent API changesMobile app or partner integration breaks because a date or number format changedSnapshot-test key API responses before and after
Scope creep"While we are in there" feature requests mixed into upgrade workKeep a separate backlog; ship the upgrade first
Long-lived branch driftFeature work continues on main and the upgrade branch falls behindMerge main into the upgrade branch frequently, or pause feature work for short periods
Environment mismatchWorks on staging, fails in productionMatch PHP, extensions and database versions exactly; use the same deploy script

How long does a Laravel upgrade take?

Timelines depend on the version gap, codebase size, test coverage and package health. These are typical ranges for planning, not quotes:

Application profileTypical timeline
Small app, one major version behind, healthy packages1 to 2 weeks
Small-to-mid app, two or three majors behind, few tests3 to 6 weeks
Mid-size SaaS, four or more majors behind, several abandoned packages6 to 12 weeks
Large platform with custom framework changes or a large SPA front end3 months or more, usually phased

These ranges include the audit, tests, upgrading, package replacement, staging and release, but not new features or a front-end rewrite.

How much does a Laravel upgrade cost?

Cost follows effort, so the same factors apply. As a rough guide, using typical agency rates:

  • Audit only: usually a small fixed fee, often in the range of a few days of senior developer time.
  • Small upgrade (one or two majors, healthy app): commonly in the low four figures in USD.
  • Typical multi-version upgrade with test writing and some package replacement: commonly mid four figures to low five figures in USD.
  • Large or heavily customised platforms: five figures and up, usually delivered in phases so you can stop or re-plan at each milestone.

Rates vary a lot by region and team model, so treat these as orientation only. For a quick, rough number based on your own project, try our project cost estimator, then use the audit to firm it up.

What drives the cost up

  • No automated tests at all.
  • Many abandoned or forked packages.
  • Custom authentication, billing or permission systems.
  • A large JavaScript front end on an old framework version.
  • Multiple environments or servers that need PHP upgrades coordinated with hosting providers.
  • Strict uptime requirements that demand staged or zero-downtime releases.

Fixed price or time and materials?

After a proper audit, a fixed price for the upgrade itself is reasonable, because the scope is well defined. Without an audit, fixed prices tend to be padded to cover unknowns, or they lead to disputes when surprises appear. A common and fair structure is a small fixed-price audit followed by a fixed-price or capped upgrade phase, with any optional refactoring estimated separately.

Keeping the app current after the upgrade

The most expensive upgrades are the ones that were postponed for years. Once you are on a supported version, staying there is far cheaper than catching up again. A simple maintenance rhythm looks like this:

  • Monthly: apply minor and patch updates for Laravel and packages, run the test suite and deploy.
  • Quarterly: review security advisories, check for abandoned packages and update PHP minor versions.
  • Yearly: plan the next major Laravel upgrade within a few months of its release, while the gap is still small.
  • Every feature: add tests for new work so the safety net keeps growing.

Many teams handle this through a small monthly retainer with their development partner rather than as one-off projects. It keeps the knowledge in one place and makes each annual upgrade a routine task rather than a crisis. If you are weighing that model, our article on agency retainers for ongoing product development explains when it makes sense.

Questions to ask a Laravel upgrade partner

If you are hiring outside help, these questions separate experienced teams from those who will learn on your codebase:

  1. Will you start with a paid audit, and what will the audit report include?
  2. How do you handle apps with little or no test coverage?
  3. Do you upgrade one major version at a time, and why or why not?
  4. How will you handle abandoned or forked packages?
  5. What does your staging, release and rollback process look like?
  6. What support do you provide in the weeks after release?

Good answers are specific and backed by a written process. "We'll run the upgrade tool and fix what breaks" is a warning sign.

How SquartUp approaches Laravel upgrades

At SquartUp, Laravel product engineering is a core part of what we do, alongside WordPress and WooCommerce work for agencies. Across 50+ projects for 25+ clients in 12+ countries, we have learned that the upgrade itself is rarely the hard part. The hard part is the surprises, so we put the effort into finding them early.

Our process follows the steps in this guide: a short written audit with a ranked list of blockers and an estimate range, a test safety net around your critical journeys, version-by-version upgrades on a dedicated branch, package replacement where needed, and a staged release with a rollback plan. We keep the existing application structure unless there is a clear reason to change it, and we keep new feature requests on a separate list so the upgrade ships cleanly. After release, SquartUp can stay on as your ongoing maintenance team or hand over to your developers with documentation.

Frequently asked questions

Can I skip versions and jump straight to the latest Laravel?

You can try, but it is riskier. Moving one major at a time keeps each set of breaking changes small and makes failures easy to trace. For small, clean apps, an experienced developer may combine steps, but the default should be one at a time.

Will users notice the upgrade?

If it is done well, mostly not. Users may be logged out once if session handling changes, and you might notice performance improvements from a newer PHP version. Anything more visible usually means scope crept in.

Do we need to stop feature development during the upgrade?

Not entirely, but it helps to slow it down. Frequent merges from the main branch keep the upgrade branch current. For the final week before release, a short freeze on risky changes makes testing much more reliable.

Next step

If your Laravel application is falling behind, the best first move is a clear picture of where it stands. Tell us your current Laravel and PHP versions, roughly how large the app is and what it does for your business, and we will tell you which path makes sense. Contact SquartUp to request a Laravel upgrade audit and a realistic estimate.

Ready to Write Your Success Story?

Tell us about your project. We will scope it honestly, propose a clear timeline, and show you how we have helped companies like yours ship faster.