Which PHP version does Ubuntu 26.04 ship? (and what else changed)
4 min read
Ubuntu 26.04 LTS comes with PHP 8.5 and nothing older. The exact versions of PHP, nginx, Apache, MySQL, MariaDB and PostgreSQL in the archive, which extensions are gone, and how to get another PHP version.
Ubuntu 26.04 LTS (Resolute Raccoon) ships PHP 8.5. There is no PHP 8.4, 8.3 or 7.4 package in the Ubuntu archive for this release. If your application needs another version, you have to get it from somewhere else, and we cover that below.
We checked everything on this page on a fresh Ubuntu 26.04.1 system on 12 November 2026, with apt-cache policy. Nothing here is copied from release notes.
In short
apt install phpon Ubuntu 26.04 gives you PHP 8.5 (package version8.5.4-0ubuntu1.5today).- php.net is already at 8.5.12. Ubuntu keeps 8.5.4 and patches security issues into it.
- OPcache is always part of PHP 8.5. There is no
php8.5-opcachepackage any more. - There is no
php8.5-imappackage. The IMAP extension left PHP core in 8.4. - Older versions (5.6 to 8.4) are available from Ondřej Surý's repository at
packages.sury.org, not from his Launchpad PPA.
PHP in each Ubuntu LTS
| Ubuntu | Released | PHP in the archive |
|---|---|---|
| 18.04 | 2018 | 7.2 |
| 20.04 | 2020 | 7.4 |
| 22.04 | 2022 | 8.1 |
| 24.04 | 2024 | 8.3 |
| 26.04 | 2026 | 8.5 |
Every LTS picks one PHP branch and stays on it for its whole life. So moving from 24.04 to 26.04 moves you from PHP 8.3 to 8.5, and skips 8.4.
How to check on your server
apt-cache policy php8.5-fpm
php8.5-fpm:
Candidate: 8.5.4-0ubuntu1.5
After installing:
php -v
PHP 8.5.4 (cli) (built: Oct 19 2026 14:35:18) (NTS)
The FPM pool listens on /run/php/php8.5-fpm.sock, its configuration is in /etc/php/8.5/fpm/pool.d/www.conf, and the service is called php8.5-fpm.
Why 8.5.4 and not the newest 8.5?
Ubuntu does not follow php.net's point releases. It freezes a version when the release is made and then adds security patches to that version. That is why the package says 8.5.4-0ubuntu1.5: the ubuntu1.5 part is the patch level.
This is fine for security, but you do not get the bug fixes of later 8.5 releases. If you need those, use a repository that follows php.net (see below).
Note also that php8.5-fpm comes from Ubuntu's universe component, not main.
The rest of the stack in Ubuntu 26.04
| Package | Version in the archive |
|---|---|
| PHP | 8.5.4 |
| nginx | 1.28.3 |
| Apache | 2.4.66 |
| MySQL | 8.4.13 |
| MariaDB | 11.8.6 |
| PostgreSQL | 18 |
| OpenSSL | 3.5.5 |
| Composer | 2.9.5 |
Two of these matter for PHP sites that come from Ubuntu 24.04:
- MySQL goes from 8.0 to 8.4. In MySQL 8.4 the old
mysql_native_passwordlogin method is off by default. Old database users created with it cannot log in until you change them or turn the plugin on. - OpenSSL goes from 3.0 to 3.5. Very old TLS settings and ciphers that still worked before may be refused.
Extensions: what is there and what is missing
Ubuntu 26.04 has 75 php8.5-* packages. The common ones are all there: curl, gd, intl, mbstring, mysql, pgsql, sqlite3, xml, zip, bcmath, soap, redis, imagick, apcu, memcached, xdebug.
Two things surprise people:
- OPcache: do not look for
php8.5-opcache. Since PHP 8.5 OPcache is built into PHP itself.php -mshowsZend OPcacheright after installingphp8.5-cli. - IMAP: there is no
php8.5-imap. PHP 8.4 moved the IMAP extension out of core. Applications that read mailboxes withimap_open()need a library written in PHP instead, or another PHP version.
I need PHP 8.4, 8.3 or 7.4 on Ubuntu 26.04
You have three options:
- Ondřej Surý's repository at
packages.sury.org/php. It has PHP 5.6 to 8.5 for Ubuntu 26.04, on amd64 and arm64. His well-known Launchpad PPA does not cover 26.04. See Ondřej's PHP PPA on Ubuntu 26.04 for the steps. - A container with the PHP version you need, and your web server in front of it.
- A panel that installs the versions for you. Zefily installs PHP 7.3 to 8.5 on Ubuntu 26.04 from Ondřej Surý's repository, with its extensions, and each site gets its own version. See PHP 7.4 on Ubuntu 26.04.
If you run more than one version, read Running several PHP versions side by side on Ubuntu 26.04.
How long is PHP 8.5 supported?
PHP 8.5 was released in November 2025. The PHP project fixes bugs in it until the end of 2027 and security issues until the end of 2029. Ubuntu 26.04 itself gets standard support until 2031, and Ubuntu patches its PHP 8.5 package during that time.
Frequently asked questions
What PHP version is in Ubuntu 26.04?
PHP 8.5. On Ubuntu 26.04.1 the package version is 8.5.4-0ubuntu1.5. No other PHP branch is in the Ubuntu archive for this release.
Can I install PHP 8.3 or 8.4 on Ubuntu 26.04?
Not from Ubuntu's own archive. Ondřej Surý's repository at packages.sury.org has PHP 5.6 to 8.5 for Ubuntu 26.04 on amd64 and arm64.
Where is php8.5-opcache?
It does not exist. From PHP 8.5 OPcache is always compiled into PHP, so there is no separate package to install.
Is there a php8.5-imap package?
No. The IMAP extension was moved out of PHP core in PHP 8.4, and Ubuntu 26.04 does not package it for 8.5.
Does Ubuntu 26.04 get new PHP 8.5 point releases?
No. Ubuntu stays on 8.5.4 and adds security patches to it. For the newest 8.5 release you need another repository.
See supported systems and Web stack for what Zefily installs on each system.