xxxxxxxxxx
sudo dpkg -l | grep php | tee packages.txt
sudo add-apt-repository ppa:ondrej/php # Press enter when prompted.
sudo apt update
sudo apt install php8.2 php8.2-cli php-8.2{bz2,curl,mbstring,intl}
sudo apt install php8.2-fpm
# OR
# sudo apt install libapache2-mod-php8.2
sudo a2enconf php8.2-fpm
# When upgrading from older PHP version:
sudo a2disconf php8.1-fpm
## Remove old packages
sudo apt purge php8.1*
xxxxxxxxxx
# Ubuntu 20.04
# List existing PHP packages
dpkg -l | grep php | tee packages.txt
#Add ondrej/php PPA
sudo add-apt-repository ppa:ondrej/php # Press enter when prompted.
sudo apt-get update
#Install PHP 8.0 with CLI
sudo apt install php8.0-common php8.0-cli
#Additional extensions
sudo apt install php8.0- { bz2,curl,intl,mysql,readline,xml }
xxxxxxxxxx
sudo apt update && apt upgrade -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2 -y
# Install PHP 8.2 Extensions
sudo apt-get install -y php8.2-cli php8.2-common php8.2-fpm php8.2-mysql php8.2-zip php8.2-gd php8.2-mbstring php8.2-curl php8.2-xml php8.2-bcmath
xxxxxxxxxx
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2
xxxxxxxxxx
sudo apt install php8.0-cli php8.0-common php8.0-imap php8.0-redis php8.0-snmp php8.0-xml
xxxxxxxxxx
step:1. apt-get update && apt-get upgrade
step:2. apt-get install software-properties-common
step:3. add-apt-repository ppa:ondrej/php
step:4. apt-get update
step:5. apt-get install php8.1
step:6. apt-get install libapache2-mod-php8.1 php8.1-fpm libapache2-mod-fcgid php8.1-curl php8.1-dev php8.1-gd php8.1-mbstring php8.1-zip php8.1-mysql php8.1-xml
finish cheerssssssss
xxxxxxxxxx
sudo apt update
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
xxxxxxxxxx
#First perform and apt update
sudo apt update && sudo apt upgrade -y
#Install dependencies
sudo apt install software-properties-common apt-transport-https -y
#Add the PPA
sudo add-apt-repository ppa:ondrej/php -y
#Now to install PHP 8.1 FPM and it's modules with apache2 settings.
sudo apt install php8.1-fpm libapache2-mod-php8.1 php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl php8.1-bcmath