Search for:
PHP 7.4

php-7.4

Step 1 :- sudo apt update

Step 2 :- sudo apt-get -y install php php-cgi libapache2-mod-php php-common php-pear php-mbstring && sudo apt install -y php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-bcmath php7.4-xml php7.4-cli php7.4-zip && sudo a2enmod rewrite && sudo apt-get install -y php7.4-{cli,bcmath,bz2,intl,gd,mbstring,mysql,zip,opcache,intl,bcmath,xsl,zip,bz2}

Step 3 :- php -v

Install PHP 8.1

PHP-8.1Step 1 :- Press Alt+Ctrl+T

Step 2 :- sudo apt update

Step 3 :- sudo apt upgrade -y

Step 4 :- sudo add-apt-repository ppa:ondrej/php -y && sudo apt update && sudo apt upgrade -y && sudo apt install php8.1 libapache2-mod-php8.1 -y && sudo systemctl restart apache2 && sudo apt-get install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath