Get started

How to upgrade Laravel 12 to Laravel 13 on cPanel, and move off PHP 8.2

Laravel 12 is on security-only support until 24 February 2027. Move PHP to 8.3 or newer first, then follow the official guide to Laravel 13.

2 December 2026 · 5 min read

Laravel 12 is already on security-only support. Bug fixes for that branch ended on 13 August 2026; security fixes continue until 24 February 2027. Laravel 11’s security window ended on 12 March 2026. The current major release is Laravel 13, which came out on 17 March 2026 and requires PHP 8.3 or newer.

There is a second clock if the app is still on PHP 8.2: PHP’s own security support for 8.2 ends on 31 December 2026. This guide shows a safe order of work on a cPanel account — move PHP first, then follow Laravel’s official upgrade guide — without inventing upgrade times or success rates. The dates above come from Laravel’s release notes and support policy and from the official PHP supported versions page.

Which versions are still supported

Support timeline for Laravel 11, which has ended, Laravel 12, which is security-only until 24 February 2027, and Laravel 13, which needs PHP 8.3 or newer, plus PHP 8.2’s end of life on 31 December 2026.
Laravel 12’s security window runs until 24 February 2027. PHP 8.2 ends earlier, on 31 December 2026, so move PHP before or with the framework upgrade.

Laravel’s policy is 18 months of bug fixes and two years of security fixes for each major release. In practice, today:

  • Laravel 11 — no further security updates from the Laravel team.
  • Laravel 12 — PHP 8.2 to 8.5; security fixes until 24 February 2027.
  • Laravel 13 — PHP 8.3 to 8.5; bug fixes into Q3 2027; security fixes until 17 March 2028.

The overlap matters. Laravel 12 can run on PHP 8.3, 8.4 or 8.5, and so can Laravel 13. If you take a Laravel 12 app off PHP 8.2 first, you can confirm the site on a supported PHP version, then upgrade the framework as a second, smaller change. Do not jump to Laravel 13 while the site is still on PHP 8.2; 13 will not run there.

This article does not walk through Laravel 13’s feature list, and it does not recommend any AI tooling. The job is to get the app onto a supported PHP version and a supported Laravel release.

The safe order of work on cPanel

Four-step cPanel upgrade order: back up and copy the app, move PHP to 8.3 or newer, upgrade to Laravel 13 with Composer following the official guide, then set the public document root, cron scheduler and queue worker.
Copy first, change PHP, upgrade the framework with Composer, then confirm the public document root, the scheduler and the queue.
  1. Copy the app and take a backup. Work on a staging copy, a subdomain, or a separate directory. Keep a restore point of the files and the database before you change PHP or Composer packages. On HosterOcean, daily restore points are also available in JetBackup inside cPanel.
  2. Move PHP to 8.3, 8.4 or 8.5 for that domain in MultiPHP Manager or Select PHP Version. Confirm the extensions the app needs, then load the staging URL and run a quick smoke test. If the app fails, switch the domain back to the previous PHP version in the same tool — that rollback does not change your files. The same idea is described for WordPress in our guide to leaving PHP 8.2.
  3. Upgrade to Laravel 13 with Composer over SSH, following the official Laravel 13 upgrade guide. Run the Artisan commands that guide requires (migrations, cache clears, and any one-off steps it lists). Fix what the test copy shows before you touch the live document root.
  4. Point the web root at the public directory, add the scheduler as a cron job (php artisan schedule:run once a minute is the usual pattern Laravel documents), and start a queue worker in the way your plan allows. Then repeat the checks on the live domain.

On HosterOcean Laravel hosting, Composer, Artisan, SSH and cron are available on the shared cPanel plans. A long-running queue worker may need a plan that allows a process manager, or a VPS. If you want the server operated for you, see server management.

cPanel details that usually trip people up

  • The domain’s document root must be the app’s public folder, not the project root. Leaving it at public_html for a project that lives in a subfolder is a common way to expose .env.
  • Put secrets in .env, keep that file unreadable from the web, and do not commit it.
  • After an upgrade, run the Artisan cache and config commands the official guide calls for, and confirm storage and bootstrap/cache are writable by the account.
  • Use the same PHP binary for CLI Composer and Artisan as the one you set for the domain, so you do not test on 8.3 in the browser and install packages on an older CLI.

Shared Laravel hosting sits on the same cPanel stack as shared hosting. If the app needs more process control than a shared account allows, move the tested copy to a VPS rather than forcing a worker onto a plan that cannot run it reliably.

Frequently asked questions

When does Laravel 12 stop getting security fixes?

On 24 February 2027, according to Laravel’s official support policy. Bug fixes for 12 already ended on 13 August 2026.

Can I stay on Laravel 12 if I only change PHP?

You can, until 24 February 2027, provided you move off PHP 8.2 by 31 December 2026. That buys time, but it is not a long-term target. Plan the Laravel 13 upgrade rather than waiting until both windows are about to close.

Which PHP version should I choose?

Any of 8.3, 8.4 or 8.5 that your dependencies support, because Laravel 13 requires at least 8.3. Test the version on a copy of the app first.

Do I have to upgrade in production first?

No. Do the PHP change and the Composer upgrade on a copy, confirm the site, then repeat the same steps on the live domain — or swap the document root when the copy is ready.

Where should the cron job run?

In cPanel’s cron interface, once a minute, calling Artisan’s scheduler with the same PHP version as the site. Queue workers are a separate process; use what your plan supports, or a VPS if you need a dedicated worker.

Laravel hosting at HosterOcean

If you are placing a new Laravel app, or moving one, start from Laravel hosting. The plans include cPanel, Composer and SSH, on LiteSpeed with NVMe storage. Current prices are on that page.

If you would rather have the PHP change or the cutover checked with you, open a ticket with the domain, the Laravel version you are on, and the PHP version you want to move to.

Tags:

Laravel 13

Laravel 12

PHP 8.3

cPanel Composer

Laravel upgrade

Technical Guide

PHP 8.2 support ends on 31 December 2026: how to move WordPress to PHP 8.4 or 8.5 in cPanel

The same cPanel PHP tools, with a backup, a staging check and an instant rollback — written for WordPress, useful as a companion when you change PHP.

Read More →

Technical Guide

How to update PHP settings for every PHP version in cPanel and CloudLinux

A Bash script that applies the same php.ini values to every installed PHP version, with a backup of each file it changes.

Read More →