Last updated on January 19th, 2023 at 02:17 pm.

Add the DEB.SURY.ORG repository PPA on Debian 11
curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x ; sudo apt update
Install php 8.1 FPM and other relevant modules.
sudo apt install php8.1-fpm php8.1-common php8.1-mysql php8.1-gmp php8.1-curl php8.1-intl php8.1-mbstring php8.1-xmlrpc php8.1-gd php8.1-xml php8.1-cli php8.1-zip php8.1-soap php8.1-imap
Confirm new PHP version
php -v
You can also check the installed modules
php --modules
Related : Ubuntu 22.04 HestiaCP Tutorial – Run WordPress on a VPS