Uncategorized

How to Update php5 to php7 in CentOS

I got a notify from my WordPress dashboard today, it said “WordPress has detected that your site is running on an insecure version of PHP.”

how to update php5 to php7
how to update php5 to php7

I tried to update the php using their tutorial link, but got the following error:

429 too many requests
429 too many requests

Well. I have to update the system using the ssh.

      1.  Login your root account using ssh or other tools.
      2. Update the php sources;
        rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
        rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
      3. Delete the old php files:
        yum remove php-common -y
      4. Install the new php version:
        yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring
      5. Check your systerm version:
        php -v
      6. Reboot your system
        reboot

    That’s it.