Installing PHP (7.0, 7.3 to 7.4) in Ubuntu server via PPA

Install PHP 7.0 on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0

Install PHP 7.1 on Ubuntu

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1

Install PHP 7.2 on Ubuntu

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.2

Install PHP 7.3 on Ubuntu

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3

Install PHP 7.4 on Ubuntu

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.4

Install PHP 7 Modules

sudo apt-cache search php7*
sudo apt-get install php7.2-mysql php7.2-curl php7.2-json php7.2-cgi php7.2-xsl

Leave a Reply

Your email address will not be published.Required fields are marked *