Downgrade PHP 7.1.7 to PHP 7.0.6 CentOS 7
Solution 1
One always need to safely downgrade the PHP version using the commands.
The following are the commands for the downgrade of PHP version:
yum downgrade php
The above command will give the actions that yum will do and proceed. Also you will need to do the following
yum --disablerepo remi-php71 downgrade php
Solution 2
Well, after this problem I've stuck in a few days, then today I found the question.
First thing remove php71 from system,
yum remove php-common php-cli mod-php
enable remi-php70
yum-config-manager --enable remi-php70
after that disabled the 7.1
yum-config-manager --disable remi-php71
then do
yum update
then install php 7.0.x
yum -y install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-mcrypt php70u-gd php70u-devel php70u-mysql php70u-intl php70u-mbstring php70u-bcmath php70u-json php70u-iconv php70u-soap
restart apache and it's work.
I think this way is also work for downgrading from php 7 to 5
Solution 3
As you have php 7.1 from remi-php71 repository, you have to switch to remi-php70 repository
# yum-config-manager --disable remi-php71
# yum-config-manager --enable remi-php70
# yum downgrade php php-common php-....
P.S. php70u or php70w are from other repositories, please notice that mixing various repositories is a bad idea.
Related videos on Youtube
Don Vincent
Updated on September 18, 2022Comments
-
Don Vincent almost 2 years
Is it possible to downgrade PHP version from 7.1.7 to 7.0.6 on centOS 7?
I've try to run
yum remove php-common php-cli mod-php
then install php with run
yum -y install php70w-pdo php70w-mysqlnd php70w-opcache php70w-xml php70w-mcrypt php70w-gd
but always said php 7.0 is obsolete version will be replace with 7.1
Is there any ways to downgrade PHP version, because I need to install Magento 2.1.7 that required php 7.0x version.