Hi all,
I host 2 WordPress sites using Apache(httpd) on my droplet and am getting the nagging message to upgrade my version of PHP. I’ve found some tutorials and article on installing PHP, but nothing regarding upgrading from one version of PHP to another, and nothing particularly for CentOS 8. Can anyone give me some pointers or offer any advice on how to safely upgrade from PHP 7.2 to 7.4?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @jplafata,
In order to upgrade from one PHP version to another just need to install it. There is no actual upgrade process like upgrading from Ubuntu 16 to 18. You just install your new PHP version and make that the default one.
Anyway, let’s see how to install PHP 7.4
To get started, you need to add EPEL & Remi repository from where you will be able to install PHP 7.4 on CentOS 8 Linux.
Next once you have the EPEL repository, run:
Upon successful addition of EPEL and Remi repositories, execute the command below to get a list of available PHP module streams.
You should see an output of PHP version. The one we care about is remi-7.4, the latest PHP stream, To enable the module stream run the following :
Once the PHP remi-7.4 module has been enabled, you can then proceed and install PHP
Regards, KFSys
This was super helpful to upgrade a CENTOS 8 machine from PHP 7.2 to 7.4. I turned it into a quick script to automate it and to make sure you install all of the PHP 7.2 modules you had previously.
Enjoy