Ondřej's PHP PPA on Ubuntu 26.04: it returns 404, use packages.sury.org
4 min read
add-apt-repository ppa:ondrej/php fails on Ubuntu 26.04 with a 404 error. Ondřej Surý now publishes PHP for this release in his own repository. The exact error, the working commands, and what to watch out for.
For years, the way to get another PHP version on Ubuntu was one line:
sudo add-apt-repository ppa:ondrej/php
On Ubuntu 26.04 this no longer works. The PPA has no packages for this release. Ondřej Surý, who maintains PHP for Debian and Ubuntu, now publishes them in his own repository, packages.sury.org/php.
We tested everything below on a fresh Ubuntu 26.04.1 system on 12 November 2026.
In short
ppa:ondrej/phphas noresolute(Ubuntu 26.04) packages.apt updatefails with 404 Not Found.packages.sury.org/phphas PHP 5.6 to 8.5 for Ubuntu 26.04, on amd64 and arm64, plus 8.6 release candidates.- Adding it also replaces Ubuntu's own PHP 8.5 (8.5.4) with Ondřej's newer build (8.5.12 today).
- PHP 8.1 and older no longer get fixes from the PHP project. Use them to move an old site, then upgrade.
The error you see
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
Err:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu resolute Release
404 Not Found
E: The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu resolute Release' does not have a Release file.
This is not a temporary problem. The PPA's own description says the repository is being merged into packages.sury.org, and that for Ubuntu Resolute the new address is the one to use. The PPA still works for Ubuntu 22.04 and 24.04.
If you already ran the command, remove the broken source so apt update is clean again:
sudo add-apt-repository -y --remove ppa:ondrej/php
The working way on Ubuntu 26.04
These are the steps from the repository's own README:
sudo apt-get update
sudo apt-get -y install lsb-release ca-certificates curl
sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt-get update
Then install the version you need:
sudo apt-get install php7.4-fpm php7.4-cli php7.4-mysql
php7.4 -v
PHP 7.4.33 (cli) (built: Oct 21 2026 08:19:13) ( NTS )
Which versions are there
On 12 November 2026 the repository had these PHP-FPM packages for Ubuntu 26.04:
| Branch | Version | Still supported by the PHP project? |
|---|---|---|
| 5.6 | 5.6.40 | No |
| 7.0 – 7.3 | 7.0.33, 7.1.33, 7.2.34, 7.3.33 | No |
| 7.4 | 7.4.33 | No |
| 8.0 | 8.0.30 | No |
| 8.1 | 8.1.34 | No |
| 8.2 | 8.2.35 | Security fixes until the end of 2026 |
| 8.3 | 8.3.36 | Security fixes |
| 8.4 | 8.4.27 | Yes |
| 8.5 | 8.5.12 | Yes |
Both amd64 and arm64 are there.
How can PHP 7.4 work on a 2026 system?
PHP 7.4 was written for OpenSSL 1.1. Ubuntu 26.04 has OpenSSL 3.5. Ondřej's packages carry patches that make the old versions build and run against the new libraries. On our test system:
php7.4 -r 'echo OPENSSL_VERSION_TEXT, PHP_EOL;'
OpenSSL 3.5.5 27 Jan 2026
He also backports some security fixes to versions the PHP project has stopped maintaining. That is valuable work, but it is one maintainer's effort, not a full security team. Do not read "installable" as "safe".
Three things to watch out for
1. Your PHP 8.5 changes too. Ubuntu's own php8.5-fpm is 8.5.4. The new repository has 8.5.12, and apt prefers the higher version:
php8.5-fpm:
Candidate: 8.5.12-3+0~deb.sury.org.1+ubuntu26.04
8.5.12-3+0~deb.sury.org.1+ubuntu26.04 500
8.5.4-0ubuntu1.5 500
So the next apt upgrade moves your existing PHP 8.5 to Ondřej's build. That is usually what you want (newer bug fixes), but you should know it happens. Test before you do it on a production server.
2. Old tutorials and scripts break. Any installer, Ansible role or Dockerfile that calls add-apt-repository ppa:ondrej/php fails on 26.04. Search your automation for ondrej/php before you upgrade a server.
3. One more party to trust. Packages from this repository run as part of your web server. The repository is run by the same person who maintains PHP in Debian itself, which is about as good as third-party sources get. Still, add it on purpose, not by habit.
And then?
When you have more than one version installed, each site needs to be pointed at the right one. See Running several PHP versions side by side on Ubuntu 26.04.
If the reason is an old application, plan the upgrade: PHP 7.4 to 8.x: a migration checklist.
If you manage your servers with Zefily, you do not add any of this by hand. You pick the PHP version per site in the panel. On Ubuntu 26.04 Zefily installs 7.3 to 8.5 from this repository; see PHP 7.4 on Ubuntu 26.04.
Frequently asked questions
Does ppa:ondrej/php work on Ubuntu 26.04?
No. The PPA has no packages for Ubuntu 26.04 (resolute), and apt update fails with 404 Not Found. It still works on Ubuntu 22.04 and 24.04.
What replaces the Ondřej PPA on Ubuntu 26.04?
Ondřej Surý's own repository, packages.sury.org/php. It has PHP 5.6 to 8.5 for Ubuntu 26.04 on amd64 and arm64.
Can I install PHP 7.4 on Ubuntu 26.04?
Yes, from packages.sury.org. We installed PHP 7.4.33 there and it runs against the system's OpenSSL 3.5. PHP 7.4 no longer gets fixes from the PHP project.
Does adding packages.sury.org change my existing PHP 8.5?
Yes. It has a newer PHP 8.5 than Ubuntu's archive, so apt upgrades your php8.5 packages to that build.
Is packages.sury.org available for arm64?
Yes. On 12 November 2026 the Ubuntu 26.04 repository had the same PHP branches for arm64 as for amd64.
See supported systems for the PHP versions Zefily installs on each system.