How to Install PHP 8.5 on Ubuntu 26.04, 24.04 and 22.04
Step-by-step guide to installing PHP 8.5 on Ubuntu 26.04, 24.04, and 22.04 using the Ondrej Sury APT repository. Covers adding the Sury signing key and DEB822 source file, three web server setups (Apache mod_php, Apache with PHP-FPM, Nginx with PHP-FPM), installing common extensions, configuring php.ini for production, running multiple PHP versions side-by-side with update-alternatives, and troubleshooting common issues like missing sockets, duplicate repositories, and wrong CLI version.