How to downgrade PHP from 7.2 to 7.0

19,300

You have php installed from remi-php72, and you want php from remi-php70

Try:

yum-config-manager --enable remi-php70
yum-config-manager --disable remi-php72

Then downgrade everything and upgrade again (for noarch package)

yum downgrade php\*
yum update

Or simply (only the 7.2.3 packages)

yum downgrade php-bcmath php-cli php-common php-devel \
  php-gd php-gmp php-imap php-intl php-json php-ldap \
  php-mbstring php-mysqlnd php-odbc  php-pdo php-process \
  php-recode php-soap php-tidy php-xml

Or to remove everything and start new installation

yum remove php\*
Share:
19,300

Related videos on Youtube

Vic
Author by

Vic

Updated on September 18, 2022

Comments

  • Vic
    Vic over 1 year

    I am running CentOS 7.4 and HTTP 2.4.6

    I installed PHP 7.2.3

    I know need to downgrade to 7.0 (reason is software company initially told me to install latest/stable for PHP and now they tell me 7.2 won't work I need 7.0 -- ugh)

    How do I go from 7.2 to 7.0 in PHP?

    php -v returns: PHP 7.2.3 (cli) (built: Mar 2 2018 12:41:10) ( NTS )

    • FooBee
      FooBee about 6 years
      Show the output of ˋyum list installed | grep phpˋ. And where did you get those ˋuˋ package names from like ˋphp72uˋ? Also, how did you install v7.2?
    • Remi Collet
      Remi Collet about 6 years
      Find the package name providing the php command: rpm -qf $(which php)
    • FooBee
      FooBee about 6 years
      BTW, apparently you have added the repositories for EL 6 onto EL 7. This can't work.
  • Remi Collet
    Remi Collet about 6 years
    yum remove php-common
  • Michael Hampton
    Michael Hampton about 6 years
    I wouldn't try to yum downgrade and yum upgrade. That would probably not work. I'd just use yum distro-sync instead.
  • Remi Collet
    Remi Collet about 6 years
    Ah, indeed, I always forget about distro-sync.... very good idea