What has changed, the issues we run into most on Ubuntu, Debian, RHEL and AlmaLinux servers, and a practical upgrade path.

Home › Blog › PHP Upgrade on Linux Server: Impact, Fixes and Best Practices
By the DESSS Team | Updated November 2026
Most of the world's PHP runs on Linux, usually Nginx or Apache with PHP-FPM. That also makes Linux servers the main target for the PHP2Shell attacks disclosed in October 2026. The upgrade itself is usually easier than on Windows, but it has its own traps, and one of them can leave you thinking you're safe when you aren't.
This guide walks through what's changed, the issues we run into most on Ubuntu, Debian, RHEL and AlmaLinux servers, and a step-by-step upgrade path. For the full timeline, see PHP Upgrade 2026: What Just Happened.
Each distribution ships its own PHP version and patches it on its own schedule.
| Distribution | Default PHP | What to know |
|---|---|---|
| Debian 13 | 8.4 | Good default; follow Debian security updates |
| Ubuntu 24.04 LTS | 8.3 | Supported upstream until Dec 31, 2027 |
| Debian 12 | 8.2 | Upstream PHP 8.2 ends Dec 31, 2026 |
| Ubuntu 22.04 LTS | 8.1 | Upstream PHP 8.1 has ended; rely on Ubuntu's own patches or upgrade |
| RHEL / AlmaLinux 8 | 7.2 (default stream) | Very old; switch module streams or use a trusted repository |
Distribution vendors sometimes backport security fixes into their own older PHP packages, so "8.1" from Ubuntu isn't always the same as unpatched 8.1. Check your vendor's security notice for PHP2Shell before deciding. If you need a newer PHP than your distribution offers, the widely used options are Ondřej Surý's repository for Ubuntu and Debian, and Remi's repository for RHEL, AlmaLinux and Rocky Linux.
It's common to have several PHP versions installed side by side. The command line, cron jobs and the web server can each use a different one. Always check what the website itself runs, using a temporary phpinfo() page on staging, not just php -v. On Debian and Ubuntu, update-alternatives --config php sets the CLI version.
Each PHP version has its own extension packages, such as php8.4-mysql, php8.4-gd, php8.4-intl, php8.4-curl and php8.4-mbstring.
On Debian and Ubuntu, each version has its own folder (/etc/php/8.4/fpm/php.ini and pool.d/). Your memory limits, upload sizes and pool settings need to be copied over and reviewed. Remember that PHP 8.5 always builds in OPcache, so remove old zend_extension=opcache.so lines.
On RHEL-family systems, new PHP paths or sockets may need the correct SELinux context.
pm.max_requests so workers recycle regularly.We manage Linux web servers on bare metal, VPS, AWS, Azure and other cloud platforms. Our team can:
Share your Linux distribution, web server, PHP version, hosting panel (if any) and how many servers or containers you run. We'll put together a clear plan and quote.
Request your customized Linux PHP upgrade quote
The information in this article is provided for general informational and educational purposes only. It reflects publicly available information as of November 4, 2026. PHP versions, support dates, security advisories and third-party software change often, so always confirm details with official sources such as php.net and your software vendors before making changes.
This article is not professional, legal or security advice, and following these steps does not guarantee protection against every vulnerability or compatibility issue. Always back up your systems and test upgrades in a staging environment before applying them to production. DESSS, Inc. is not liable for any loss, damage or downtime resulting from the use of this information.
Product names and trademarks mentioned (including PHP, Microsoft, Windows, IIS, SQL Server, Oracle, MySQL, MariaDB, PostgreSQL, Ubuntu, Debian, Red Hat, cPanel and Plesk) belong to their respective owners and are used for identification only. Links to third-party sources do not imply endorsement. Please also see the DESSS Disclaimer and Privacy Policy.
News and platform guides from the DESSS team on PHP2Shell, PHP 8.2 end of life and safe upgrades.

PHP Upgrade on Windows Server: IIS and Apache Impact, Fixes and Best Practices

How PHP Upgrades Affect Direct Database Connectivity (MySQL, SQL Server, Oracle and PostgreSQL)

PHP Upgrade 2026: What Just Happened, Why It Matters, and How to Upgrade Safely
Tell us about your PHP versions, servers and applications. A DESSS PHP specialist will come back with a tailored upgrade plan and quote.