Skip to main content
BumbleTap
Add to ChromeInstall

PHP 8.1 End of Life (EOL): Ended 31 December 2025, What to Do Now

PHP 8.1 reached end of life on 31 December 2025 with its final release, 8.1.34. Code keeps running, but php.net ships no more fixes; Ubuntu 22.04, a few repositories and paid vendors still patch it.

Written Updated Shahzeb Umer

Subscribe

Status

No longer supported

Support ended .

Since end of life
323 days
Final release
8.1.34
Move to
PHP 8.5fixed until 31 Dec 2029

4.1 years of support

  • Bug and security fixes25 Nov 2021 – 25 Nov 2023
  • Security fixes only25 Nov 2023 – 31 Dec 2025
  • No fixes31 Dec 2025 – today

Supported for 4.1 years, from 25 Nov 2021 to 31 Dec 2025.

Who still patches it

Eight places PHP 8.1 runs, eight deadlines.

  • php.net (upstream): Ended 31 Dec 2025
  • RHEL 9 (php:8.1 stream): Retired May 2025
  • Amazon Linux 2023 (php8.1): Ended 31 Dec 2025
  • Docker image (php:8.1): Last rebuilt 2 Jan 2026
  • Elastic Beanstalk (PHP 8.1 on AL2023, AL2): Retired 16 Apr 2026
  • Cloud Run functions (php81): Decommissioned 30 Jun 2026
  • Google App Engine (php81): Deprecated 31 Dec 2026
  • Ubuntu 22.04 (php8.1 in main): Ubuntu Pro to May 2032
Sources: php.net, Red Hat Application Streams, Amazon Linux 2023 and Elastic Beanstalk docs, Google Cloud runtime schedules, docker-library official images, Ubuntu release data. Checked 17 Nov 2026.

Where to move

Be on PHP 8.5.

The short version

  • PHP 8.1 reached end of life on 31 December 2025. Its final release, 8.1.34, came out on 18 December 2025. When php.net fixed two critical remote code execution flaws on 21 October 2026, it released fixes for 8.2 to 8.5 only, although the advisories list 8.1 as affected.
  • Ubuntu 22.04 LTS still patches its own php8.1 package and shipped both fixes the same day. Canonical covers it until May 2027, or May 2032 with Ubuntu Pro. Amazon Linux 2023 stopped on 31 December 2025, Docker stopped rebuilding php:8.1 on 2 January 2026, and Elastic Beanstalk retired its 8.1 platforms on 16 April 2026.
  • Move to PHP 8.5, supported until 31 December 2029 and supported by WordPress 6.9 and later, Laravel 12 and 13 and Drupal 11.3 and later. PHP 8.4, supported until 31 December 2028, is the fallback. Skip 8.2, which ends on 31 December 2026.
On this page
  1. What stopped on 31 December 2025
  2. Who still patches PHP 8.1
  3. What breaks if you stay
  4. How to check what you run
  5. Which version to move to: PHP 8.5
  6. How to upgrade
  7. Changes most likely to bite from 8.1 to 8.5
  8. If you can't upgrade yet
  9. Sources

PHP 8.1 reached end of life on 31 December 2025. Its final release, 8.1.34, came out on 18 December 2025, and php.net has published nothing for the branch since. Ben Ramsey, one of its release managers, announced it on the internals list that night: "This means the PHP project no longer supports PHP 8.1."

Your 8.1 code keeps running. Nothing in PHP checks the date, and a server on 8.1.34 behaves today as it did on 30 December. What ended is php.net's supply of fixes. Whether anyone still patches your 8.1 depends on where it came from: Ubuntu 22.04's package is patched until May 2027, while a php.net build, a php:8.1 container or a binary you compiled has had nothing since 8.1.34.

What stopped on 31 December 2025

php.net gives each branch two years of active support, with regular bug and security fixes, then security fixes only, released as needed. 8.1.0 came out on 25 November 2021, and active support ended on 25 November 2023. The last bug-fix release was 8.1.27, on 21 December 2023.

Security support was due to end on 25 November 2024, the date older articles still give. The RFC Release cycle update, accepted in April 2024, added a year of security fixes; it said that "PHP 8.1 would get an extra year", and php.net set the end at 31 December 2025. In those two security years php.net made seven releases, from 8.1.28 on 11 April 2024 to 8.1.34, fixing more than 20 CVEs between them.

The first test came ten months after the end. On 21 October 2026 php.net fixed CVE-2026-109618 and CVE-2026-109619, two critical flaws that it said "can allow unauthenticated remote code execution". The fixes went into 8.2.35, 8.3.36, 8.4.27 and 8.5.12. The GitHub advisories mark every version before 8.2.35 as affected, 8.1 included, and there is no 8.1 release. The 8.1 fixes that exist came from other people.

The second came four weeks later. On 19 November 2026 php.net fixed 17 more flaws, seven rated critical, in 8.2.36, 8.3.37, 8.4.28 and 8.5.13. Their advisories list 8.2 and later, but the one for CVE-2026-115560, a session flaw that can lead to remote code execution, says the feature behind it dates from PHP 5.4, "so older unsupported releases may also be affected".

Who still patches PHP 8.1

Where it runs Patched until What happens after Source
php.net builds 31 December 2025, final release 8.1.34 No more releases php.net
Ubuntu 22.04 LTS, php8.1 in main May 2027, standard security maintenance; latest 8.1.2-1ubuntu2.28 on 21 October 2026 Ubuntu Pro (ESM) to May 2032 Ubuntu, Launchpad
Debian Not shipped: Debian 11 has 7.4, 12 has 8.2, 13 has 8.4 Not applicable Debian archive
RHEL 9, php:8.1 stream Retired May 2025, seven months before php.net RHEL 8 never had 8.1 Red Hat
Amazon Linux 2023, php8.1 31 December 2025 "End of support - no further updates" AWS
Docker image php:8.1 Removed 2 January 2026, last pushed that day Still pulls, frozen at 8.1.34 Docker
Elastic Beanstalk, PHP 8.1 on AL2023 and AL2 Retired 16 April 2026 No updates, no new environments; the 90-day grace has passed AWS
Google App Engine, php81 End of support 31 December 2025 No new deployments; configuration updates stop on 31 December 2026; apps keep serving Google Cloud
Cloud Run functions, php81 Deprecated 31 December 2025 Decommissioned 30 June 2026: no creates or updates, and functions may be disabled Google Cloud
Azure App Service on Linux Follows php.net Gone from the runtime list; existing apps "should not be affected" Azure
Ondřej Surý's PPA, ppa:ondrej/php No end date; 8.1.34-9 for 22.04 and 24.04 on 21 October 2026 Best-effort; moving to packages.sury.org Launchpad
Freexian PHP LTS, paid At least six years from release, so to November 2027 at least; no end date set From €1,200 a year for 1 to 30 systems Freexian
Zend PHP LTS, paid No 8.1 end date published Quote only Zend

Ubuntu 22.04 patches its own 8.1. Canonical published the fix for both critical CVEs on 21 October 2026, as USN-8948-1, the same day php.net released 8.2.35. In 2026 alone it has published six security updates to php8.1, fixing 24 CVEs. The package keeps the upstream version it shipped with, so php -v prints 8.1.2-1ubuntu2.28: judge it by the suffix and Ubuntu's notices, not by the 8.1.2. This covers Ubuntu's package only. Ubuntu 24.04 ships 8.3 and 26.04 ships 8.5.

Ondřej Surý's PPA still builds 8.1 for Ubuntu 22.04 and 24.04. Its 8.1.34-9 build, published on 21 October 2026, carries backports of the two critical fixes and eleven other CVEs, still under the 8.1.34 number. Freexian, which runs a paid PHP LTS service with him, describes deb.sury.org as "provided on a best-effort basis", and the PPA says it is being merged into packages.sury.org.

Behind several of these sits Remi Collet's php-src-security repository, which backports security fixes to end-of-life branches. Its 8.1 branch took the October fix on 21 October 2026, and Freexian says it builds its end-of-life support on that repository. Zend says its LTS runs at least two years past community support and patches "critical and high-severity PHP CVEs", but publishes no 8.1 end date.

What breaks if you stay

Nothing inside 8.1 switched off on 1 January. The damage comes from what it no longer gets.

Unpatched flaws, unless your build is patched. A php.net 8.1.34 build has none of the fixes made since 18 December 2025, including the October pair rated critical. The 24 CVEs Ubuntu fixed in its 8.1 in 2026 show how much an unpatched build is missing.

Cloud platforms have left. Elastic Beanstalk marked its PHP 8.1 branch on Amazon Linux 2023 deprecated on 13 January 2026 and retired its 8.1 platforms on 16 April 2026, after which it stops "providing maintenance updates, including security updates". App Engine stopped new php81 deployments on 31 December 2025 unless an organization policy re-enables them, and from 31 December 2026 configuration updates stop too. Cloud Run functions decommissioned php81 on 30 June 2026, and Google says functions still on it may be disabled.

Frameworks moved on long ago. Laravel 10, the last Laravel to allow 8.1, stopped getting security fixes on 4 February 2025; Laravel 11 and 12 require 8.2 and Laravel 13 requires 8.3. Symfony 6.4 LTS is the last Symfony for 8.1, with security fixes until November 2027; Symfony 7 needs 8.2 and Symfony 8 needs 8.4. Drupal 10, the last Drupal for 8.1, ends on 9 December 2026, and Drupal 11 needs 8.3. PHPUnit 11 needs 8.2. On 8.1, Composer refuses them:

- laravel/framework v12.73.0 requires php ^8.2 -> your php version (8.1.34) does not satisfy that requirement.

WordPress stays quiet. WordPress 7.1 still supports PHP 7.4 to 8.5. Its Site Health check reports 8.1 as "an older version of PHP" that "should be updated" and files it as a recommendation, because on 17 November 2026 WordPress's API still returned is_secure: true for 8.1.34. That day 9.0% of WordPress sites reporting to WordPress.org ran 8.1, and 31.8% ran 8.1 or older.

Scanners flag the version. Tenable's Nessus plugin 58987, PHP Unsupported Version Detection, is rated Critical (CVSS v3 10.0) and works "according to its version". Ubuntu's patched package still reports 8.1.2, so expect the finding there too, and keep the USN as your evidence that it is patched.

How to check what you run

The command-line PHP and the PHP serving your site can differ, so check both.

php -v                                      # Ubuntu's patched build prints 8.1.2-1ubuntu2.NN
php -r 'echo PHP_VERSION, PHP_EOL;'
ls /usr/bin/php[0-9]* /usr/sbin/php-fpm*    # Debian and Ubuntu: one binary per version
apt changelog php8.1 | head -30             # Ubuntu: the latest fixes in your package
dnf module list --enabled php               # RHEL 9: is the retired php:8.1 stream enabled?
dnf supportinfo --pkg php8.1                # Amazon Linux 2023: support status
composer check-platform-reqs                # do installed packages accept this PHP?
grep -rn --include='Dockerfile*' 'FROM php:8\.1' .
grep -rn 'php81' --include='*.yaml' --include='*.yml' .    # App Engine and Cloud Run functions runtimes

On Elastic Beanstalk, list environments and their platforms, once per region:

aws elasticbeanstalk describe-environments \
  --query "Environments[].[EnvironmentName,SolutionStackName]" --output table

phpinfo() shows the web server's version at the top, along with your entire configuration, so delete the file once you have read it; <?php echo PHP_VERSION; exposes less. In WordPress, open Tools > Site Health > Info > Server.

Which version to move to: PHP 8.5

Version Released Bug fixes until Security fixes until Latest
8.1 25 November 2021 25 November 2023 31 December 2025 8.1.34, final
8.2 8 December 2022 31 December 2024 31 December 2026 8.2.36
8.3 23 November 2023 31 December 2025 31 December 2027 8.3.37
8.4 21 November 2024 31 December 2026 31 December 2028 8.4.28
8.5 20 November 2025 31 December 2027 31 December 2029 8.5.13
8.6 19 November 2026 31 December 2028 31 December 2030 8.6.0

Target 8.5. It is a year old, on its thirteenth patch release, with bug fixes until the end of 2027 and security fixes until 31 December 2029. WordPress supports it from 6.9, Laravel 12 and 13 and Drupal 11.3 and 11.4 support it, and Drupal 12 requires it. Ubuntu 26.04 LTS packages it.

Use 8.4 if something blocks 8.5. It is supported until 31 December 2028, it is the PHP Debian 13 packages, and Red Hat offers a php 8.4 stream for RHEL 9 and 10 until May 2029. Drupal 10 tops out at 8.4.

Skip 8.2 and 8.3. PHP 8.2 ends on 31 December 2026, and 8.3 a year later. Laravel 10 supports PHP up to 8.3, which makes 8.3 a useful stop on the way, not a destination.

Leave 8.6 for later. It came out on 19 November 2026, but no Laravel or Drupal release supports it yet, and Elastic Beanstalk plans its 8.6 platform for January 2027.

On Ubuntu, the release is the PHP version. Upgrading 22.04 to 24.04 brings 8.3, and 26.04 brings 8.5, with package names changing to match (php8.1-fpm becomes php8.5-fpm). To keep 22.04 and change PHP, Ondřej's PPA builds 8.4 and 8.5 for it, on the same best-effort terms.

How to upgrade

Upgrade the framework in step with PHP. Laravel 11 and later will not install on 8.1, and Laravel 10 supports PHP 8.1 to 8.3 only, so move a Laravel 10 app to PHP 8.3 first, upgrade Laravel to 12 or 13, then move to 8.5. Drupal 10 works the same way: PHP 8.3 or 8.4, then Drupal 11.3 or later, then 8.5.

Test on the target first. Add 8.5 to CI next to 8.1, with the extensions your app needs. --fail-on-deprecation makes PHPUnit exit with a failure when passing tests triggered deprecations:

docker run --rm -v "$PWD":/app -w /app php:8.5-cli vendor/bin/phpunit --fail-on-deprecation

Find blocking packages with composer why-not php 8.5. If composer.json sets config.platform.php, raise it, or Composer keeps resolving as if you were on 8.1.

Run PHPCompatibility. Its last stable release, 9.3.5, is from 2019 and predates PHP 8, so install the 10.0 pre-release as its README says:

composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcompatibility/php-compatibility:"^10.0.0@dev"
vendor/bin/phpcs -ps src --standard=PHPCompatibility --runtime-set testVersion 8.1-8.5

Let Rector do the mechanical edits. Install rector/rector, put ->withPhpSets(php85: true) in rector.php and review with vendor/bin/rector process --dry-run. Its sets also adopt newer syntax that 8.1 cannot parse, so apply them once you no longer deploy to 8.1.

Compare extensions. Run php -m on both runtimes so a missing extension does not surprise you; four left the core in 8.4.

Changes most likely to bite from 8.1 to 8.5

From php.net's migration guides. A deprecation logs an E_DEPRECATED notice and the code keeps running, until a test runner or error handler treats it as a failure.

Dynamic properties (High, deprecated in 8.2). Assigning a property a class never declared logs Creation of dynamic property Foo::$bar is deprecated, and the RFC plans an Error in PHP 9. Declare the property, or mark the class #[\AllowDynamicProperties], which runs on 8.1 as well. stdClass and classes with __get() and __set() are not affected.

Implicitly nullable parameters (High, deprecated in 8.4). function find(User $user = null) should become ?User $user = null, which also runs on 8.1. Rector's ExplicitNullableParamTypeRector fixes them all.

${var} in strings (Medium, deprecated in 8.2). Write "{$var}" or "$var" instead of "${var}".

utf8_encode() and utf8_decode() (Medium, deprecated in 8.2). Replace them with mb_convert_encoding(), naming the source encoding.

Four extensions left the core (Medium, 8.4). IMAP, OCI8, PDO_OCI and PSpell moved to PECL. Without the PECL build, imap_open() is a fatal Call to undefined function error.

CSV escape parameter (Medium, deprecated in 8.4). fgetcsv(), fputcsv() and str_getcsv() now need escape passed explicitly; '\\' keeps the current behaviour.

PDO driver constants (Medium, deprecated in 8.5). PDO::MYSQL_ATTR_SSL_CA and similar give way to Pdo\Mysql::ATTR_SSL_CA, a class added in 8.4. Laravel's skeleton up to 11.x puts that constant in config/database.php.

null as an array key (Medium, deprecated in 8.5). $map[null] and array_key_exists(null, $map) are deprecated; use an empty string.

Configuration (Low, 8.4 and 8.5). The default bcrypt cost for password_hash() rose from 10 to 12 in 8.4, about four times the work per hash, and existing hashes still verify. In 8.5 OPcache is built in, and a zend_extension=opcache.so line emits a warning.

If you can't upgrade yet

Move onto a build someone patches. Switching a php:8.1 container to an Ubuntu 22.04 base with apt install php8.1-fpm is a smaller change than an upgrade, and it puts Canonical's security team behind your PHP until May 2027, or May 2032 with Ubuntu Pro.

Or pay for it. Freexian's PHP LTS covers 8.1 on Debian 9 to 13 and Ubuntu 18.04 to 26.04, from €1,200 a year for up to 30 systems and four platforms, with a year's notice before it drops a version. Zend sells 8.1 LTS on quote.

Freeze deliberately. Pin your lockfile and pin base images by digest rather than tag, so nothing half-updates under you.

Write down the date you are deferring to, and put it where it gets read. The failure to avoid is staying on 8.1 without anyone having decided to.

Sources

Common questions

Is PHP 8.1 still supported?
Not by php.net. PHP 8.1 reached end of life on 31 December 2025, and its final release is 8.1.34, from 18 December 2025. Ubuntu 22.04 LTS still patches its own php8.1 package, until May 2027 or May 2032 with Ubuntu Pro, and Freexian and Zend sell extended support. A php.net build, a php:8.1 container or a binary you compiled gets nothing further.
When did PHP 8.1 reach end of life?
On 31 December 2025. Active support ended on 25 November 2023, and 8.1 had security fixes only after that. Older articles give 25 November 2024, the date php.net listed before PHP accepted the RFC Release cycle update in April 2024. That RFC gave 8.1 an extra year of security fixes, and php.net set its end at 31 December 2025.
What is the last version of PHP 8.1?
8.1.34, released on 18 December 2025. It was a security release, fixing flaws in PDO quoting, array_merge(), getimagesize() and dns_get_record(), and php.net will not make another. Ubuntu's package reports 8.1.2 with a suffix such as -1ubuntu2.28, because Canonical backports fixes instead of moving to new upstream releases.
Is it safe to keep running PHP 8.1?
Only where someone still patches it. On 21 October 2026 php.net fixed two critical flaws that can allow unauthenticated remote code execution, and its advisories mark every version before 8.2.35 as affected. Ubuntu 22.04, Ondřej Surý's PPA and Remi Collet's backport repository fixed 8.1 that day. On 19 November php.net fixed 17 more, and one of those advisories says releases older than 8.2 may be affected too. A php.net 8.1.34 build or a php:8.1 container is still exposed.
Does Ubuntu still patch PHP 8.1?
Ubuntu 22.04 LTS does. Its php8.1 package is in main, and Canonical published 8.1.2-1ubuntu2.28 on 21 October 2026, fixing CVE-2026-109618 and CVE-2026-109619. Standard security maintenance runs until May 2027, and Ubuntu Pro extends it to May 2032. That covers Ubuntu's package only. Ubuntu 24.04 ships PHP 8.3 and 26.04 ships 8.5.
Which PHP version should I upgrade to?
PHP 8.5, supported until 31 December 2029. PHP 8.4, supported until 31 December 2028, is the fallback. Skip 8.2, which ends on 31 December 2026, and 8.3, which ends on 31 December 2027. Laravel 10 supports PHP 8.1 to 8.3 only, so a Laravel 10 app needs Laravel 12 or 13 to reach 8.5.
What happened to PHP 8.1 on AWS, Google Cloud and Azure?
Elastic Beanstalk retired its PHP 8.1 platforms on 16 April 2026, and Amazon Linux 2023 stopped updating php8.1 on 31 December 2025. App Engine stopped php81 deployments on 31 December 2025 and stops configuration updates on 31 December 2026, while apps keep serving. Cloud Run functions decommissioned php81 on 30 June 2026. Azure App Service on Linux removed 8.1 from its runtime list, and says existing apps should not be affected.
Does WordPress still run on PHP 8.1?
Yes. WordPress 7.1 supports PHP 7.4 to 8.5, and Site Health only calls 8.1 "an older version of PHP" that "should be updated", because WordPress's API still reports it as receiving security fixes. On 17 November 2026, 9.0% of WordPress sites reporting to WordPress.org ran PHP 8.1.

Also on the calendar

End-of-life dates for the rest of your stack.

Dates checked against endoflife.date (MIT). How we check datesReport a wrong dateEvery PHP version