How to Upgrade php version on Centos 7

 In this tutorial, How to upgarde php version on Centos 7. My Server have installed php71. I will upgrade php to version php74

Type the following command to check the current version PHP.

# php -v

# yum list installed | grep -i php

Now, Let go upgade php version to php74

If your has no remi repo, then Turn on Remi repo:

# yum install

Install yum-utils package

# yum install yum-utils

If you want to install PHP 7.1, PHP 7.2, PHP 7.3 or PHP 7.4 on CentOS 7. Just enable it as below

# yum-config-manager --enable remi-php71

# yum-config-manager --enable remi-php72 

# yum-config-manager --enable remi-php73

# yum-config-manager --enable remi-php74

For exmaple, I will chose php74 in this tutorial.

# yum-config-manager --enable remi-php74

Update Centos 7  server.

# yum update

Checking version one more time

# php -v

You have update php version to php74 running on Centos 7 Server.


  1. I have a server running PHP 7.3.

    Is the only thing I have to do:
    yum-config-manager --enable remi-php74
    yum update

    Will all my modules be updated to? And is it this simple. I'm a bit scary do do it but will make a snapshot before updating.


Post a Comment

Popular posts from this blog

zimbra some services are not running [Solve problem]

How to install php7 on centos 6

Bash script list all IP addresses connected to Server