The actual package name in yum can be a bit different than you might expect. If you execute yum list "php*" --installed you should be able to see the exact package name and version number installed which you can used in the yum remove command.

Answer from Dylan Reimerink on Stack Overflow
🌐
Vesta Control Panel
forum.vestacp.com › viewtopic.php
Downgrade PHP 8 to PHP 7.4 on CentOS7 - Vesta Control Panel - Forum
December 20, 2020 - skamasle wrote: Wed Dec 30, 2020 7:54 pm Hi You can remove PHP and install new version. I suppose you have remi repo, you just need select php 7.4 Thank you so so much. I done :) ... grayfolk wrote: Thu Dec 31, 2020 12:36 am viewtopic.php?p=83162#p83162 Or use yum downgrade Thank you so so much.
Top answer
1 of 2
2

Software collections (SCL) are designed for parallel installation beside the system default version, thus allowing to run multiple versions simultaneously.

This is described in PHP Configuration Tips, especially the switch to FPM for httpd users (as mod_php, used by default in CentOS 7), allow only a single version). Nginx users always use FPM.

In remi repository you can find PHP 5.6 to 8.0 as SCL.

For a proper installation, follow the wizard instructions (and choice "multiple versions").

2 of 2
0

I had a similar goal, and went a slightly different way:

I wanted to be able to test with newer versions of PHP as well as the production version, and run testcases against them.

Code centric Development environment

I started by using vagrant, which basically is a way of provisioning your VMs. the configuration is in code, in form of a VagrantFile. I liked the way this allowed me to set up completely equal environments, and bracnh off to test new versions of PHP without changing the rest of the system. The way I set it up, it basically maps your src folder to the vm, and you are off.
This also meant that any developer checking out the code will be able to spin up a development environment which is exactly the same as the one all the other developers are using.

Going further

This is a further development of the scenario I have described, and is essentially an alternative route
After some iterations, and a desire to automate the testing, which meant spinning up a test environment when I needed to test, with the same specs as my prod environment, I decided to move to docker. the overhead is less, and it appears that docker is easier to run on different OSes, so essentially I did the same sort of thing in docker, which means that setting up CI/CD is easy since a lot of those tools have docker integrations built in.

🌐
Mfscripts
support.mfscripts.com › public › kb_view › 76
Downgrade from PHP8.0 to PHP7.4 on VestaCP - CentOS - Support
Downgrade from PHP8.0 to PHP7.4 on VestaCP - CentOS:This article details the steps to downgrade to PHP7.4 from PHP8.0.$ yum remove php php-cli php-fpm php-commo
🌐
Zomro
zomro.com › blog › faq › 434-upgrading-and-downgrading-php-on-centos-7
Upgrading and downgrading PHP on CentOS 7 | Zomro
November 30, 2023 - Confirm the installation of PHP 7.4 packages. Check the PHP version with: ... You should see the updated version. Downgrade: To downgrade, install the PHP repositories and yum-utils (commands in the Preparation section).
Find elsewhere
🌐
Server Fault
serverfault.com › questions › 1118826 › stuck-on-php8-1-when-downgrading-to-php7-4
php - Stuck on php8.1 when downgrading to php7.4 - Server Fault
I upgraded the php version on my Apache server running on Debian (buster) from 7.3 to 8.1. Due to an older Nextcloud installation I had to downgrade to php7.4. The downgrade worked well following
🌐
Webdock.io
webdock.io › docs › perfect server stacks › upgrade or downgrade php › upgrading or downgrading php versions
Upgrade or Downgrade PHP • Switch Versions »
December 4, 2025 - SetHandler "proxy:unix:/run/php/php 7.4 -fpm.sock|fcgi://localhost" Especially if you are downgrading, you need to check that php-cli is pointing to the correct version.
🌐
ezeelogin
ezeelogin.com › kb › article › how-to-downgrade-php-7-4-to-7-1-in-centos-572.html
How to downgrade PHP 7.4 to 7.1 in Centos ?
March 22, 2025 - Step 3: Disable the PHP 7.4 repository, enable the PHP 7.1 repository, and install PHP 7.1 along with required modules: [root@localhost ~]# yum --disablerepo=remi-php74 --enablerepo=remi-php71 install php php-gd php-mbstring php-mysql php-curl php-mcrypt · Step 4: Verify the PHP version after ...
🌐
YouTube
youtube.com › linux help
How to Upgrade and Downgrade the php version On CentOS 7.6 - YouTube
This video covers the method to upgrade and downgrade PHP's version on CentOS. PHP is a server-side scripting language which is used to develop static websit...
Published   May 24, 2019
Views   2K
🌐
LinuxHelp
linuxhelp.com › how-to-upgrade-and-downgrade-the-php-versions-on-centos-7-6
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6 | LinuxHelp Tutorials
June 4, 2019 - . . Removed: php.x86_64 ... php-pecl-zip.x86_64 0:1.15.4-1.el7.remi.7.2 php-xml.x86_64 0:7.2.17-1.el7.remi · Disable the php 7.2v and enable the php7.3v.Install the php modules of 7.3v as well....
🌐
DigitalOcean
digitalocean.com › community › questions › wordpress-droplet-downgrade-php-8-0-7-4-x
[Wordpress Droplet] Downgrade PHP 8.0 » 7.4.x | DigitalOcean
December 16, 2021 - The first thing I want to mention is, you can’t directly upgrade or downgrade a PHP version from let’s say 7.1 to 7.4 or 8 to 7.4.
🌐
Ryadel
ryadel.com › home › how to downgrade php version on linux centos
How to downgrade PHP version on Linux CentOS
April 2, 2018 - In case you're using different repos, you just need to replace remi-php71 with your PHP 7.1 repository and remi-php72 with the PHP 7.2 one. Once done, you just have to restore our previous setup in the following way: Restore your previous ...
🌐
Remirepo
blog.remirepo.net › post › 2022 › 06 › 10 › PHP-version-7.4.30-8.0.20-and-8.1.7
PHP version 7.4.30, 8.0.20 and 8.1.7 - Remi's RPM repository - Blog
June 10, 2022 - RPMs of PHP version 7.4.20 are available in remi-modular repository for Fedora ≥ 34 and Enterprise Linux ≥ 8 (RHEL, Alma, CentOS, Rocky...) and in remi-php74 repository for EL 7.
🌐
Nagios
support.nagios.com › kb › article › php-7-2-to-7-4-upgrade-instructions-for-centos-stream-8-915.html
PHP 7.2 to 7.4 Upgrade Instructions for CentOS Stream 8
This document is intended for use by Nagios Administrators who wish to update their version of php 7.2 to php 7.4 on a CentOS Stream 8 system or an EOL CentOS 8 system · Enable CentOS 8 vault repos (For EOL CentOS 8 Only)