In this quick tutorial, learn how to install PHP 8.1 on Ubuntu 20.04 LTS using the official Ondřej Surý PPA. This method ensures you're installing the latest stable version of PHP 8.1 with full support for extensions.
🧰 Commands used in this video:
##########################################
php -v
sudo apt update
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install php8.1
sudo apt install php8.1-{bcmath,xml,fpm,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi}
systemctl status php*-fpm.services