To install PHP 8.4 on Ubuntu 26.04, add packages.sury.org — Ubuntu’s repos do not include 8.4 (FPM socket: /run/php/php8.4-fpm.sock). This is the same Ondřej PHP source as ppa:ondrej/php, now canonical at Sury on 26.04.
Step 1 : Update.

Step 2 : Install tools used to add the repo.

Step 3 : Download the keyring.

Step 4 : Install the keyring.

Step 5 : Add packages.sury.org for this release.

Step 6 : Update again.

Step 7 : Install PHP 8.4, CLI, and PHP-FPM.


Step 8 : Add common extensions: mysql, curl, gd / imagick, xml / xsl / soap, zip, mbstring, bcmath. gettext is in php8.4-common.


Step 9 : Make php run 8.4.

Step 10 : Check the version.

You have installed PHP 8.4 on Ubuntu 26.04.