PHP 8.1 reached end-of-life in January: how to detect it and migrate to 8.3 safely
PHP 8.1 stopped receiving security patches on 31 December 2025. A guide to finding it on your servers and upgrading to PHP 8.3 on Ubuntu without downtime.
UptimeMag editorial team · 12 October 2026 · 3 min read

If you manage a LAMP or LEMP server inherited from someone else, mark this date on your calendar: 31 December 2025. According to the official page php.net/eol.php, the 8.1 branch reached end-of-life on that day, with the final release being 8.1.34. Since then, no security patches, no bug fixes. If a site is still running on 8.1, every vulnerability discovered from January onwards remains open indefinitely, unless you purchase commercial support.
The table of currently supported versions, also from php.net/supported-versions.php, is as follows:
| Branch | Initial release | Active support until | Security support until |
|---|---|---|---|
| 8.2 | 8 Dec 2022 | 31 Dec 2024 | 31 Dec 2026 |
| 8.3 | 23 Nov 2023 | 31 Dec 2025 | 31 Dec 2027 |
| 8.4 | 21 Nov 2024 | 31 Dec 2026 | 31 Dec 2028 |
| 8.5 | 20 Nov 2025 | 31 Dec 2027 | 31 Dec 2029 |
This guide covers the most common scenario for UptimeMag readers: Ubuntu 22.04 or 24.04 servers running PHP 8.1, upgrading to PHP 8.3 (the latest branch with security support until 2027 and mature for production).
1. Verify the active version
From the command line:
php -v
If the server runs PHP-FPM behind Nginx, also check the running FPM process:
systemctl status php8.1-fpm
For a single site via browser, create a page with <?php phpinfo(); ?>, load it, and delete it immediately afterwards (never leave it online—it's a classic fingerprinting target for vulnerability scanners).
On hosting control panels: in cPanel, the PHP version per domain is visible in "MultiPHP Manager"; in Plesk under "PHP Settings" on the domain tab.
2. Find all sites still on 8.1 on a shared server
On Apache with mod_php or per-vhost FPM, search the configuration files:
grep -rl "php8.1" /etc/apache2/sites-enabled/
grep -rl "php8.1" /etc/nginx/sites-enabled/
On a server with multiple FPM pools, list the active sockets:
ls -la /run/php/ | grep 8.1
On cPanel with multiple domains, the command whmapi1 php_get_vhost_versions returns the version-per-domain list (requires WHM access). On Plesk, plesk bin domain --list followed by plesk bin site --info <domain> shows the PHP version assigned to each site.
3. Install PHP 8.3 alongside 8.1
Ubuntu 22.04 (jammy) and 24.04 (noble) do not include PHP 8.3 in the official repositories with the same ease for all extensions: the practical approach remains the third-party repository maintained by Ondřej Surý, which publishes PHP 8.3 packages for both jammy and noble.
sudo apt install software-properties-common ca-certificates apt-transport-https lsb-release -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.3 php8.3-fpm php8.3-cli php8.3-common
The two versions, 8.1 and 8.3, coexist on the same system: configuration files remain separate (/etc/php/8.1/ and /etc/php/8.3/), as do the FPM sockets.
4. Verify extensions before cutover
Before switching the vhost, compare the loaded modules:
php8.1 -m > modules-81.txt
php8.3 -m > modules-83.txt
diff modules-81.txt modules-83.txt
Install on 8.3 the packages for any missing extensions (syntax: php8.3-extensionname, e.g. php8.3-mysqli php8.3-gd php8.3-curl php8.3-mbstring php8.3-xml php8.3-zip php8.3-bcmath), then repeat the comparison until the diff is empty or contains only expected differences.
Also check your application code against the deprecations introduced in the 8.2→8.3 jump: the official migration documentation notes, among other things, that calling get_class() or get_parent_class() without arguments is now deprecated, and that using the increment operator on empty or non-numeric strings is deprecated. These are deprecations, not removals: the site continues to function but writes warnings to the logs, which you can clean up at your leisure after cutover.
5. Cutover and rollback
Change the socket in the vhost (Apache with proxy_fcgi or Nginx with fastcgi_pass) from /run/php/php8.1-fpm.sock to /run/php/php8.3-fpm.sock, then:
sudo nginx -t && sudo systemctl reload nginx
Keep 8.1-fpm running and save the previous vhost configuration under a different filename: if the site returns 500 errors, simply revert to the old socket and reload, with no reinstallation needed. Only after a week without errors in /var/log/nginx/error.log does it make sense to uninstall php8.1-fpm with apt remove.
Sources: php.net/supported-versions.php, php.net/eol.php, official PHP 8.2→8.3 migration documentation, ppa:ondrej/php repository.
Written with the help of artificial intelligence and checked by the editors (EU AI Act, art. 50).