
Upgrade Laravel 5.x and 7.x to 13: a safe, step-by-step plan
Upgrade Laravel 5.x or 7.x to 13 with the least effort: check packages with Composer, climb Laravel and PHP one step at a time, and avoid 8 silent traps.
On December 1, 2026, Laravel launched Laravel Rust, and Taylor Otwell himself asked how many ambitious new projects in 2027 and beyond will still choose PHP. Whatever the answer, the Laravel 5.x and 7.x systems already running (CRMs, admin panels, ordering systems written in 2018–2020) still need to be safe, and that's a job for today.
This is the short version: how to upgrade Laravel from an old release to Laravel 13 with the least effort, in three steps:
- Check your packages with Composer.
- Climb one step at a time, changing Laravel or PHP, never both.
- Avoid the "silent traps": code that throws no error but behaves differently.
Why upgrade Laravel to 13 now
The official support schedule (checked December 3, 2026):
| Laravel | PHP | Bug fixes until | Security fixes until |
|---|---|---|---|
| 11 and older | Ended | Ended | |
| 12 | 8.2 – 8.5 | Aug 13, 2026 | Feb 24, 2027 |
| 13 | 8.3 – 8.5 | Q3 2027 | Mar 17, 2028 |
- Target Laravel 13. Laravel 12 no longer gets bug fixes, and its security fixes end on February 24, 2027. The latest Laravel 13 release at the time of writing is v13.45.0 (December 1, 2026).
- Don't wait for Laravel 14. Laravel ships a major version every year around Q1, but as of December 3, 2026 there is no 14.x branch yet. Going from 13 to 14 will be a small step.
- Target PHP 8.4. It gets security fixes until December 31, 2028, and Laravel's
masterbranch already requires PHP^8.4. - Hold off on PHP 8.6. It was released on November 19, 2026, but Laravel 13's support table still lists 8.3–8.5. Meanwhile PHP 8.2 security support ends on December 31, 2026.
Step 1: check your packages with Composer
The hardest part of a Laravel upgrade is usually not the framework but third-party packages: PDF, Excel, permissions, image processing. Three commands tell you most of what you need.
List vulnerabilities and abandoned packages:
composer audit --locked --abandoned=report
Find what blocks Laravel 13 and PHP 8.4, including indirect packages you never required yourself:
composer why-not laravel/framework 13.0 --locked
composer why-not php 8.4 --locked
Simulate the target on a copy of the project. In composer.json, set "laravel/framework": "^13.0", simulate the PHP version with "config": { "platform": { "php": "8.4.0" } }, loosen the other packages to "*", then do a dry run that installs nothing:
composer update --dry-run -W
Composer either names the packages with no compatible version, or prints the new version each package needs.
Real results from a sample Laravel 8 project (Composer 2.10.3, October 23, 2026):
- 21 vulnerabilities across 4 packages, and 2 abandoned packages (
fruitcake/laravel-cors,swiftmailer/swiftmailer). - 6 packages need a major upgrade, for example
barryvdh/laravel-dompdf0.9 → 3.1,spatie/laravel-permission4.4 → 8.3 andmaatwebsite/excel3.1 → 4.0. Each one means reading its UPGRADE.md. fruitcake/laravel-corshas no release for Laravel 13. That's fine: Laravel has shippedHandleCorsandTrustProxiessince version 9, so you just remove the package.
Composer only reads what packages declare they support, so still run your test suite on the target PHP (in Docker) before you commit to it.
Step 2: climb one step at a time
Each deploy changes Laravel or PHP, never both. When something breaks, you know why.

A sample path from Laravel 5.8 on PHP 7.2 (on 5.5–5.7, get to 5.8 first). Times are Laravel's own estimates from the upgrade guides:
| Step | Change | Laravel's estimate | Main thing to watch |
|---|---|---|---|
| 1 | Laravel 5.8 → 6 | 1 hour | str_*/array_* helpers move to laravel/helpers |
| 2 | PHP 7.2 → 7.3 | ||
| 3 | Laravel 6 → 7 | 15 min | Exception handler takes Throwable |
| 4 | Laravel 7 → 8 | 15 min | Class-based model factories |
| 5 | PHP 7.3 → 8.1 | The biggest PHP jump; can split via 7.4 and 8.0 | |
| 6 | Laravel 8 → 9 | 30 min | Flysystem 3, Symfony Mailer |
| 7 | Laravel 9 → 10 | 10 min | $dates removed, use $casts |
| 8 | PHP 8.1 → 8.3 | ||
| 9 | Laravel 10 → 11 | 15 min | Migration ->change() |
| 10 | Laravel 11 → 12 | 5 min | Carbon 3 |
| 11 | Laravel 12 → 13 | 10 min | CSRF middleware renamed to PreventRequestForgery |
| 12 | PHP 8.3 → 8.4 |
You don't need to adopt the Laravel 11 folder structure: the upgrade guide explicitly doesn't recommend it for existing apps.
Tools that speed up the mechanical part (renamed classes, syntax, config):
- Laravel Shift: one version per run, from $19, delivered as a pull request of small commits.
- Rector Laravel: free, rewrites code using per-version rules.
- Laravel Boost: in a Laravel 12 app, the
/upgrade-laravel-v13command guides an AI agent (Claude Code, Cursor…) through the move to 13.
Small project with code you want to clean up anyway? Starting a fresh Laravel 13 app and porting your code is the only way to jump straight there, at the cost of facing every change from 5.x to 13 at once.
Step 3: avoid the silent traps
Errors on screen are easy to fix. The scary ones are changes where code still runs but behaves differently:

- 5.8:
Cache::put('key', $value, 30)goes from 30 minutes to 30 seconds. - 6: queues try a job only once by default. Jobs that call external APIs need an explicit
$tries. - 7: dates in JSON become ISO-8601 in UTC. Mobile apps reading your API may show the wrong time; override
serializeDate()to keep the old format. - 8: pagination switches to Tailwind. Bootstrap UIs need
Paginator::useBootstrap(). - 9: a failed
Storage::put()returnsfalseinstead of throwing. Set'throw' => trueon the disk if your code relies ontry/catch. - 11: migration
->change()dropsunsigned,defaultandcommentunless you declare them again. - 12: Carbon 3, where
diffIn*methods return floats that can be negative. - 13: users may be logged out en masse because the session cookie name changes. Pin
SESSION_COOKIE,CACHE_PREFIXandREDIS_PREFIXin.envbefore upgrading.
Deploy each step safely
- Ship each step to production before starting the next. Bundling five steps into one deploy throws away the point of small steps.
- Drain the queue before deploying, then run
php artisan queue:restartafterwards. Worker setup is covered in Laravel crontab and Supervisor queues on a server. - Keep a way back: the previous release ready to switch to, and a database backup before running migrations.
- Once on 13, run Laravel Doctor for a quick check of the environment, queues and security settings.
Estimating: the project manager's view
Adding up the official upgrade guides from 5.5 to 13 gives about 4 hours, but that's only the framework on a near-default app. Real effort depends on three things: how many packages need a major upgrade (from step 1), how much custom code touches framework internals, and test coverage. Without tests, every step is a round of manual testing, and that's where most of the time goes.
Run step 1 before you quote. A table of "package → new version → work needed" convinces a client better than any explanation.
Upgrade Laravel, or move to Laravel Rust?
For a running system: upgrade first. Laravel Rust is a framework rebuilt for Rust with no automatic code conversion, so moving means a separate rewrite project. Laravel PHP isn't entering maintenance mode either. The full analysis is in Laravel Rust is here: what happens to Laravel PHP?.
Laravel upgrade checklist
- Run
composer audit,composer why-notand the target simulation; settle on Laravel 13 + PHP 8.4. - Have tests for payments, orders and login; have staging and a dedicated git branch.
- Change only Laravel or PHP per deploy; use Shift, Rector or Boost for the mechanical work.
- Check all 8 silent traps, especially cache seconds and the session cookie in 13.
- Drain queues before deploying,
queue:restartafter, and always keep a way back. - On 13: update minor releases regularly (Laravel ships almost weekly), add
composer auditto CI, and upgrade the major version every year.
Sources
Support dates and versions checked December 3, 2026; Composer results from October 23, 2026.
- Laravel 13 release notes (support policy): https://laravel.com/docs/13.x/releases
- Per-version upgrade guides: https://laravel.com/docs/13.x/upgrade (swap
13.xfor the version you need) - Laravel framework releases: https://github.com/laravel/framework/releases
- PHP supported versions: https://www.php.net/supported-versions.php
- Laravel Shift: https://laravelshift.com/
- Rector Laravel: https://github.com/driftingly/rector-laravel
- Laravel Boost: https://github.com/laravel/boost