How to Install PHP 7.3 on CentOS

You will need access to root and all of five minutes to install PHP 7.3 on CentOS 7.x

 

Open a terminal as root and run the following commands.

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

Then run the following commands

yum install yum-utils
yum-config-manager --enable remi-php73
yum update
yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath 

After the install is complete, you can run

php -v
This will allow you to see the version installed

If you are running PHP-FPM then you will need to restart php-fpm service or if you are
running PHP as an Apache module, restart apache by issuing

systemctl restart httpd

Start typing and press Enter to search