Last updated on April 17th, 2023 at 08:14 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
Installing PHP 8.1 FPM and other relevant modules.
Copy the following line and run it in your terminal. This line installs PHP and all the other listed php modules. If you do not need to install any module, just delete it before running this command.
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
Install PHP 8.2 FPM and other relevant modules.
If you need the latest PHP, you can install PHP 8.2 instead of 8.1 as follows. PHP 8.2 will be installed along with the other listed PHP modules.
sudo apt install php8.2-fpm php8.2-common php8.2-mysql php8.2-gmp php8.2-curl php8.2-intl php8.2-mbstring php8.2-xmlrpc php8.2-gd php8.2-xml php8.2-cli php8.2-zip php8.2-soap php8.2-imap
Confirm new PHP version
php -v
You can also check the list of installed modules
php --modules
If you experience any problems during this installation process, ask your question in the comments section below.
Discover more from Bizanosa
Subscribe to get the latest posts sent to your email.