Migrating Off PHP 7: A Practical Upgrade Path to 8.x

Last updated: July 16, 2026  ·  Covers PHP 7.0–7.4 and upgrade targets 8.2–8.5

Every release in the PHP 7 line is long dead. PHP 7.4 — the final and most widely deployed 7.x version — stopped receiving security patches on November 28, 2022. Earlier 7.x releases went even sooner: 7.3 on December 6, 2021, 7.2 on November 30, 2020, 7.1 on December 1, 2019, and 7.0 on January 10, 2019. An application serving traffic on PHP 7 in 2026 is running a runtime that has been unpatched for more than three years. This guide is the practical path out.

Quick answer: PHP 7.4 went EOL November 28, 2022. As of mid-2026, the supported lines are PHP 8.2–8.5 — but 8.2 dies on December 31, 2026, so target PHP 8.3 or newer (8.3 supported to end of 2027, 8.4 to end of 2028, 8.5 to end of 2029). You can jump from 7.4 straight to a current 8.x; the work is in your code and dependencies, not the interpreter.

Current Status: What Stopped and When

PHP Version Security Support Ended / Ends Status
PHP 7.0Jan 10, 2019EOL
PHP 7.1Dec 1, 2019EOL
PHP 7.2Nov 30, 2020EOL
PHP 7.3Dec 6, 2021EOL
PHP 7.4Nov 28, 2022EOL
PHP 8.0Nov 26, 2023EOL
PHP 8.1Dec 31, 2025EOL
PHP 8.2Dec 31, 2026Ending soon
PHP 8.3Dec 31, 2027Supported
PHP 8.4Dec 31, 2028Supported
PHP 8.5Dec 31, 2029Supported

EOL means no security fixes from the PHP project: vulnerabilities disclosed in the interpreter, its bundled extensions, or its standard library after the date above are never patched in that line. Full details per version are on our PHP lifecycle page.

Running PHP past end of life?
Extended-support vendors still ship security patches for EOL versions. We match you with the right provider for your stack — free, no obligation.
Get PHP Support Options →

Who Is Affected

PHP 7 lingers in predictable places: legacy WordPress, Drupal, and Magento installs pinned by old plugins or themes; internal tools and intranets nobody owns; shared-hosting accounts where the PHP version was set once in a control panel and never revisited; and older framework applications (Laravel 5/6-era, Symfony 3/4-era, CodeIgniter 3) whose framework version itself requires PHP 7. In that last case the migration is really two migrations — framework and runtime — and the framework is usually the bigger one.

Migration Paths, Ranked by Effort

Path 1 — Straight interpreter upgrade (small or well-typed codebases)

For modern, tested codebases with maintained dependencies, moving from 7.4 to 8.3+ is often days of work: bump the version constraint, run the test suite, fix what static analysis flags, update the handful of packages that need it. You do not need to pass through 8.0/8.1/8.2 at runtime — fix the breaking changes in code and jump to the target.

Path 2 — Staged code modernization (typical legacy applications)

For larger legacy codebases, run the migration as a pipeline: static analysis (PHPStan or Psalm) to find PHP 8 incompatibilities, automated refactoring (Rector has dedicated PHP 7→8 rule sets) to fix the mechanical ones, then manual work on the genuinely dynamic corners. Keep the application running on 7.4 in production while CI runs the suite against the 8.x target, and cut over when green.

Path 3 — Re-platform the application (when the framework is the blocker)

If the application sits on a framework or CMS version that cannot run on PHP 8, upgrading PHP means upgrading the platform: to a current Laravel/Symfony release, a current Drupal, or a rebuilt WordPress theme/plugin stack. This is a project measured in weeks-to-months, and sometimes the honest comparison is against rebuilding the application on a current stack rather than dragging the old one forward.

Path 4 — Extended support as a bridge

Where none of the above can land before an audit or a deadline, paid patching for EOL PHP exists — see below.

Step-by-Step Migration Checklist

  1. Inventory PHP versions everywhere — servers, containers, CI images, cron hosts, and that one box running the queue worker. php -v lies less than documentation does.
  2. Pick the target: PHP 8.3 or newer. Confirm your framework, CMS, and every Composer dependency declare support for it.
  3. Audit dependencies. composer outdated and each package's constraints tell you which libraries need upgrades and which are abandoned and need replacing. Do the same for PECL extensions.
  4. Run static analysis against the target version and burn down the incompatibility list; let Rector handle the mechanical rewrites.
  5. Fix tests first, code second. A green suite on 7.4 is your safety net; get it green on 8.x in CI before any production change.
  6. Stage the cutover. Deploy 8.x to staging with production-like traffic, watch error logs for TypeErrors and deprecation notices, then roll production host-by-host with a rollback path.
  7. Remove the old runtime. Uninstall PHP 7 packages after cutover so nothing silently falls back to it.

Common Pitfalls (What Actually Breaks)

If You Can't Migrate Yet

Some applications genuinely cannot move on this year's budget — usually because the real cost is a framework or CMS rewrite. Two bridges exist. Commercial extended-support vendors ship security patches for EOL PHP versions, including 7.4, as a paid service; we compare them on our extended support vendors page. Separately, some Linux distributions backport PHP security fixes within their own OS support windows — check what your distribution actually covers rather than assuming. Either way, treat the bridge as scheduled time with an exit date, and spend it executing Path 2 or 3.

Frequently Asked Questions

Is PHP 7 still supported in 2026?

No. PHP 7.4 went EOL November 28, 2022, and every earlier 7.x release before that. PHP 8.0 (EOL Nov 26, 2023) and 8.1 (EOL Dec 31, 2025) are also dead. Supported lines in mid-2026: PHP 8.2–8.5.

Which PHP 8 version should I upgrade to in 2026?

PHP 8.3 or newer. PHP 8.2 reaches EOL on December 31, 2026. PHP 8.3 is supported until end of 2027, 8.4 until end of 2028, and 8.5 until end of 2029.

What breaks when upgrading from PHP 7 to PHP 8?

Stricter type handling, warnings promoted to errors, removed deprecated functions, abandoned dependencies, and changed string-to-number comparison semantics that silently alter logic.

Can I upgrade directly from PHP 7.4 to PHP 8.3 or 8.4?

Yes. Fix the PHP 8.0-era breaking changes in your code (the biggest batch), address later deprecations flagged by static analysis, and jump straight to the target version.

What if my application can't run on PHP 8 yet?

Commercial extended-support vendors patch EOL PHP versions as a paid bridge, and some Linux distributions backport fixes within their OS support windows. See our extended support vendors comparison.

Related Resources