How to upgrade PHP to 7.4 on Centos 7
If you are running older versions of PHP, you can upgrade by running the following commands:
root@zmatech:~# yum install epel-release
root@zmatech:~# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
root@zmatech:~# yum install yum-utils -y
root@zmatech:~# yum-config-manager –enable remi-php74
root@zmatech:~# yum update
(NOTE: The yum update command above will update all packages including php. To only update php package just run yum update php)
To install PHP 7.4 with all necessary modules, run the command below
root@zmatech:~# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-process php-ldap
Enjoy!!