1sudo apt update
2sudo apt install php7.4
3sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
1sudo apt install software-properties-common
2sudo add-apt-repository ppa:ondrej/php
3
4sudo apt update
5
6sudo apt install -y php7.4
1sudo apt install software-properties-common
2sudo add-apt-repository ppa:ondrej/php
3sudo apt update
4sudo apt install php8.0
5 #install common extension
6sudo apt install php8.0-common php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-intl -y
7 sudo a2dismod php7.0
8 sudo a2dismod php7.1
9 sudo a2dismod php7.2
10 sudo a2dismod php7.3
11 sudo a2dismod php7.4
12sudo a2enmod php8.0
13sudo service apache2 restart