Skip to content
PHP 5 · 7 · 8.x → 8.4 / 8.5

PHP upgrade services before support runs out

Moving PHP 5.6, 7.x, 8.1 and 8.2 applications to PHP 8.4 or 8.5 without a rewrite: an audit first, tests where they matter, Rector for the mechanical changes, and a staged switch you can reverse in minutes.

Software developers reviewing code together at a laptop
At a glance
  • PHP 8.2 ends 31 Dec 2026No security fixes from php.net after that
  • Target PHP 8.4 or 8.5Security support to the end of 2028 or 2029
  • Rector does the bulkPeople do the judgement calls
  • Priced in engineer-daysBands by codebase size, below

What a PHP upgrade involves

PHP 8.2 receives security fixes from php.net only until 31 December 2026, and PHP 8.1 and older receive none, including for the two critical remote-code-execution flaws fixed on 21 October 2026. A safe upgrade audits code and Composer dependencies against the target version, adds tests around critical paths, applies automated fixes with Rector, upgrades the framework, then runs old and new PHP side by side before switching. PHP 8.4 or 8.5 is the sensible target today.

PHP upgrade services

The PHP version is the cheapest thing to fix, until it is the only thing that matters

Most PHP applications that need upgrading still work. That is the problem: nothing forces the decision until a host announces it will stop offering the old version, a penetration test lists it as a critical finding, or a fix arrives only for newer releases. On 21 October 2026 the PHP project shipped 8.2.35, 8.3.36, 8.4.27 and 8.5.12 to close two critical vulnerabilities that can allow unauthenticated remote code execution. Its advisory says PHP 8.1 and older no longer receive updates from the project, and points users to distribution vendors or an upgrade.

This page is about the upgrade job itself: which version to target, how we sequence the work, what breaks between PHP 5 and PHP 8, how Composer dependencies and frameworks complicate it, and what it costs in engineer-days. For general PHP, Laravel and WordPress work, see our PHP & WordPress service. When the application needs re-architecture rather than a new runtime, that is application modernisation, and the section on rebuilding below explains where the line falls.

We upgrade our own software too. CloudMonitor, one of the products we build and run, is on Laravel 13 and PHP 8.3, so framework and runtime upgrades are something we do on our own code before we do them on yours.

PHP support dates: where each version stands

From php.net’s supported versions and unsupported branches pages, checked 13 November 2026. “Active” means bug and security fixes; “security” means security fixes only.

VersionActive support untilSecurity fixes untilStatus on 13 Nov 2026
5.6End of life 31 Dec 2018 (last release 5.6.40)Unsupported for nearly eight years
7.0 – 7.3End of life between 10 Jan 2019 and 6 Dec 2021Unsupported
7.4End of life 28 Nov 2022 (last release 7.4.33)Unsupported
8.0End of life 26 Nov 2023 (last release 8.0.30)Unsupported
8.1End of life 31 Dec 2025 (last release 8.1.34)Unsupported
8.231 Dec 202431 Dec 2026Security fixes for seven more weeks
8.331 Dec 202531 Dec 2027Security fixes only
8.431 Dec 202631 Dec 2028Fully supported
8.531 Dec 202731 Dec 2029Fully supported
8.6Not yet published; release candidate 7 out on 12 Nov 2026, general availability planned for 19 Nov 2026Not for production yet

If 8.6 follows the current release-cycle policy of two years of active support and two of security fixes, it would be supported until the end of 2030, but treat that as an expectation until php.net publishes the dates.

Your Linux distribution may have its own dates

PHP installed from Debian or Ubuntu packages is patched by the distribution’s security team for the life of that release, which can outlast php.net’s dates: Debian 12 ships PHP 8.2, Debian 13 ships 8.4, Ubuntu 22.04 ships 8.1 and Ubuntu 24.04 ships 8.3. That buys time, not safety forever: fixes depend on the distribution backporting them, Composer packages and frameworks still drop old PHP versions, and the clock runs out when the distribution release does. Check your vendor’s security tracker rather than assuming.

Which version should you upgrade to?

TargetChoose it whenWatch out for
PHP 8.3A dependency you cannot replace yet does not support 8.4Only about 13 months of security fixes left; plan the next hop now
PHP 8.4The default for most upgrades today; supported by Laravel 11 to 13, CodeIgniter 4.7 and WordPress 6.7 onwardImplicitly nullable parameter types (Type $x = null) now raise deprecation notices across older code
PHP 8.5Your framework and packages declare support (Laravel 12 and 13, WordPress 6.9 onward)Backtick shell execution, (integer)-style casts and null array offsets are deprecated
PHP 8.6Later: after the first few point releases and once your Composer packages declare supportA brand-new branch on day one is a risk with no upside for most businesses

How we run a PHP upgrade

1. Audit against the target version

Before estimating anything, we measure. Three commands give most of the picture in an afternoon:

# Which installed packages refuse the target PHP version?
composer why-not php 8.4

# Static compatibility scan of your own code (not vendor/)
vendor/bin/phpcs -p src app --standard=PHPCompatibility --runtime-set testVersion 8.4

# Type-level problems, analysed as if running on 8.4 (phpstan.neon: phpVersion: 80400)
vendor/bin/phpstan analyse --level=2 src app

PHPCompatibility aims to cover changes from PHP 5 onward and runs on PHP 7.2 or newer, so on very old servers we run the scans in a container rather than on the box itself. The output, plus a read through bootstrap code, database access and anything that calls the shell, becomes a written list of breaking changes with an estimate for each.

2. Tests where the money is

Legacy code rarely has tests, and we do not write a full suite first. We add end-to-end and HTTP-level tests around the paths that would hurt most if they broke (login, checkout or billing, report exports, scheduled jobs, inbound integrations) and record their current output so the new version can be compared against it.

3. Rector for the mechanical changes

Rector rewrites code automatically. It runs on PHP 7.2 or newer and can read code written for PHP 5. We step through one PHP version set at a time, commit each step separately, and review every diff rather than trusting the tool blindly:

<?php
// rector.php
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/app', __DIR__ . '/src'])
    ->withPhpSets(php84: true);   // raise one version at a time on old code

// vendor/bin/rector process --dry-run   (review, then run without --dry-run)

Rector handles the repetitive changes well: constructors, nullable types, removed functions with direct replacements, array and string syntax. It does not decide what your code should do when behaviour changed, such as string-to-number comparisons in PHP 8.0. Those need a person and a test.

4. Composer and extensions

Dependencies cause more upgrade delays than your own code. We set the target in composer.json with composer config platform.php 8.4.0, update on a branch with composer update --with-all-dependencies, run composer audit for known vulnerabilities, and deal with what remains: see the risk list below.

5. Staged switch, with a way back

The new version runs alongside the old one: a second PHP-FPM pool or container image with identical code, configuration and extensions. Staging runs with error_reporting = E_ALL and logs every deprecation; then a slice of production traffic or one server moves first, error logs are compared, and the rest follows. Rolling back is a pool or image switch, not a restore. Cron jobs and queue workers move last, because they fail quietly.

What breaks between PHP 5 and PHP 8

VersionChange that bites legacy codeUsual fix
7.0mysql_* functions, ereg and the /e modifier of preg_replace removedPDO or mysqli with prepared statements; preg_*; preg_replace_callback
7.2mcrypt removed from coreOpenSSL or sodium, with a plan to re-encrypt stored data
8.0each(), create_function(), curly-brace string offsets removed; PHP 4-style constructors no longer run; 0 == "abc" is now false; many internal functions throw errors instead of warningsRector for syntax; tests for comparison and error-handling behaviour
8.1Passing null to non-nullable internal function parameters deprecatedUsually the largest volume of log noise; fixed at the source, not silenced
8.2Dynamic properties deprecated; utf8_encode() and utf8_decode() deprecatedDeclare properties or use #[AllowDynamicProperties] as a stop-gap; mb_convert_encoding()
8.4Implicitly nullable parameter types deprecated; E_STRICT constant deprecatedRector adds ?Type; error-handler masks updated
8.5Backtick operator, non-canonical casts, semicolon after case, null as an array offset deprecatedMostly mechanical; Rector sets cover several

Sources: the PHP manual’s migration guides, including the 8.4 and 8.5 deprecation lists. Deprecations do not stop code running today, but each is a removal waiting in a later major version.

Composer dependency risks to check early

  • Abandoned packages. Packagist marks them, and Composer prints a note on install. Each needs a maintained replacement or a fork you are willing to own.
  • Locks built with --ignore-platform-reqs. A composer.lock resolved this way can claim compatibility that is not real. We rebuild the lock against the target platform.
  • Forks and VCS repositories. Patched copies of packages pinned in repositories often stop receiving upstream fixes and quietly block upgrades.
  • Code copied into the repository. Libraries pasted into a lib/ folder years ago are invisible to Composer and to vulnerability scanners.
  • Extensions. PECL extensions and paid encoders or loaders must exist for the target version before anything else is worth doing.
  • Private packages. Internal libraries shared across several apps need upgrading first, or all the apps that use them stay stuck.

Framework notes

Laravel

Laravel gives each major release 18 months of bug fixes and two years of security fixes. From the Laravel support table: Laravel 10 (PHP 8.1–8.3) and 11 (PHP 8.2–8.4) are past security support; Laravel 12 supports PHP 8.2–8.5 with security fixes until 24 February 2027; Laravel 13 supports PHP 8.3–8.5 with security fixes into early 2028. We move one major at a time, each released to production before the next starts, and update first-party packages such as Sanctum or Horizon with it.

CodeIgniter

CodeIgniter 4.7.0, released on 1 February 2026, requires PHP 8.2 or newer. CodeIgniter 3 is a different story: there is no official CodeIgniter 3 release built for PHP 8.2 and later, and community forks fill the gap. Because CodeIgniter 4 is a ground-up rewrite with a different structure, moving a large CodeIgniter 3 app to it is closer to a framework migration than an upgrade. The audit compares a fork, a move to CodeIgniter 4, and a move to Laravel on cost and risk.

WordPress

The WordPress compatibility table shows WordPress 7.0 and 7.1 need PHP 7.4 or newer and support up to 8.5; 6.9 supports 7.2 to 8.5. Core is rarely the blocker. Custom themes, in-house plugins and abandoned third-party plugins are, so we test each one on a staging copy with debug logging on before the host switch.

PHP upgrade cost: effort bands by codebase size

Our planning ranges in engineer-days, for your own code (excluding vendor/), moving to PHP 8.4. They include audit, tests on critical paths, the upgrade itself and the staged switch. They are not a quote; the audit produces one.

CodebaseFrom PHP 8.1 / 8.2From PHP 7.xFrom PHP 5.x
Small (up to ~20k lines, current framework)2 – 55 – 1210 – 25
Medium (20k – 100k lines, framework one or two majors behind)5 – 1212 – 3525 – 60
Large (100k+ lines, custom framework or CodeIgniter 3, few tests)10 – 2530 – 80Audit first; often a partial rebuild
WordPress site with custom theme and plugins1 – 33 – 86 – 15

What pushes a job to the top of its band: no version control history, encoded or obfuscated files, several apps sharing one database or library, and integrations that cannot be tested outside production. The audit itself is usually 2 to 5 engineer-days.

What staying put costs

Some hosts now charge to keep old PHP running. IONOS’s US PHP Extended Support page lists monthly fees of $23.58 for PHP 5.2 to 5.6, $18.28 for 7.0 to 7.3, $15.62 for 7.4 and 8.0, and $7.81 for 8.1 (checked 13 November 2026). Commercial long-term-support builds from vendors such as Zend and TuxCare are priced on request. These can be a sensible bridge for a few months; they are not a plan, because frameworks and Composer packages keep moving on.

Upgrade or rebuild?

SignalPoints to upgradingPoints to rebuilding
Business rulesStill correct and mostly stableChanged so much that half the code is workarounds
StructureA framework, even an old one, with some separation of concernsSQL, HTML and logic mixed in every file with no pattern to follow
Audit estimateUpgrade effort well below a rebuild estimateUpgrade effort approaches the cost of rebuilding the parts you actually use
UsageMost screens and reports are still usedA small core is used; the rest could be retired
TeamYour developers can maintain it once upgradedNobody will maintain this code base whatever version it runs on

Often the answer is both: upgrade now to get onto a supported runtime within weeks, then replace the worst modules one at a time. That second part is modernisation work, and it is easier on a supported PHP version.

Typical jobs

Typical PHP upgrade jobs

Common starting points and how the work usually goes.

Starting pointMain workHow it usually goes
PHP 5.6 custom app using mysql_*Database layer moved to PDO or mysqli, removed functions replaced, Composer introducedBiggest jump; tests around login, billing and reports first, then Rector sets one version at a time
PHP 7.4 with Laravel 6 to 8Framework climbed one major at a time to 12 or 13, PHP raised alongsideEach Laravel major is a small release of its own, deployed before the next starts
CodeIgniter 3 on PHP 7.xDecide between a maintained community fork and a move to CodeIgniter 4 or LaravelThe decision comes from the audit; a framework move is closer to a partial rewrite
PHP 8.1 or 8.2 on Laravel 10 or 11PHP to 8.4, Laravel to 12 or 13, dependencies refreshedUsually the shortest job; most effort goes into third-party packages
WordPress with in-house pluginsCustom plugins and theme made compatible, abandoned plugins replacedTested on a staging copy with full error logging before the host switch
Services

PHP upgrade services

Four pieces of work. The audit stands on its own; you can take its findings to any team.

Upgrade audit

The problem

You know the PHP version is old, but not how much breaks, which packages block the move or what it will cost.

How we do it

Compatibility and static scans against the target version, a Composer dependency review, a read of the risky areas, and a written list of breaking changes with an engineer-day estimate and a recommended target.

What you get

  • Breaking-change list by file and severity
  • Dependency blockers with replacements
  • Target version recommendation
  • Estimate, plus upgrade-or-rebuild view
How we start

How a PHP upgrade starts

Remote, in your repository and a staging copy of your environment.

Day 0

A free 30-minute call

Current PHP and framework versions, hosting, rough codebase size and the deadline driving you. We say whether an audit is worth it.

Days 1–5

Audit

Read access to the repository and a staging copy. You get the breaking-change list, the blockers and an estimate in engineer-days.

Following weeks

Tests and upgrade

Safety-net tests first, then the upgrade in small reviewed steps, each deployable to staging.

Go-live

Staged switch

Side-by-side runtime, stepwise cutover, rollback ready. Then handover, or ongoing care if you want it.

Senior engineers firstYour first call is with someone who will do the work, not a sales script.
You own everythingCode, configuration, reports and documentation stay in your accounts and are handed over.
We run our own products15 live platforms we build and operate, so we feel production pain too.
Honest about fitIf a cheaper route or another provider suits you better, we will say so.
FAQ

Questions about PHP upgrades

PHP 8.2 receives security fixes from php.net until 31 December 2026; active bug-fix support ended on 31 December 2024. After that date the PHP project releases no further fixes for 8.2, although Linux distributions that ship it, such as Debian 12, may keep backporting security patches for their own packages.

For most applications today, PHP 8.4, which has security support until 31 December 2028, or PHP 8.5, supported until 31 December 2029, if your framework and Composer packages already support it. PHP 8.6 is planned for 19 November 2026 and is better adopted after a few point releases.

It depends on size and structure more than on the version gap. As planning ranges, we see about 10 to 25 engineer-days for a small PHP 5 application and 25 to 60 for a medium one, including tests and a staged switch. Large PHP 5 systems need an audit first, and some are cheaper to partly rebuild.

Partly. Rector runs on PHP 7.2 or newer, can read PHP 5 code and handles many mechanical changes such as constructors, removed functions with direct replacements and type syntax. It cannot decide what code should do where PHP behaviour changed, such as string-to-number comparison in PHP 8.0, so every diff needs review and tests.

It should not. We run the old and new PHP versions side by side as separate PHP-FPM pools or container images, move traffic in steps while comparing error logs, and keep the old runtime ready so switching back takes minutes. Cron jobs and queue workers move last.

Usually yes, because older framework versions do not support newer PHP. Laravel 12 supports PHP 8.2 to 8.5 and Laravel 13 supports 8.3 to 8.5. CodeIgniter 4.7 needs PHP 8.2 or newer, while CodeIgniter 3 has no official release built for PHP 8.2 and later, so CodeIgniter 3 apps need a fork or a framework move.

It can be a short bridge, not a plan. The PHP project no longer releases fixes for 8.1 and older, so you depend on the host or vendor backporting each fix, and frameworks and Composer packages keep dropping old versions. Some hosts also charge monthly fees for old versions.

Upgrade when the business rules are still right, the code has some structure and the upgrade estimate is well below a rebuild. Rebuild, usually in parts, when most code is workarounds, only a small core is used, or nobody will maintain the code base. Often the best route is to upgrade first, then replace weak modules gradually.

Running PHP 8.2 or older?

Tell us the PHP and framework versions, roughly how large the codebase is, where it is hosted and what deadline you are facing. A senior engineer will reply with a first view of the effort and whether an audit is worth doing.

Get an upgrade estimate
Last updated