Upgrade php 7.2 to 7.4 centos 7

Question

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?


Submit an answer

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!

Sign In or Sign Up to Answer


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.

Im a bit of a newbie at server administration and I was wondering if I could get some tips on updating my PHP version.

When I first setup my server, I followed a tutorial and managed to get php 7.2 up and going, but now I want to update the php 7.4 and im not really sure how.

I'm running a CentOS 7 box, and I setup my original PHP using the following commands;

yum install yum-utils
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php72

yum install php72 php-cli php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache php72-php-zip php72-php-soap php72-php-bcmath php72-php-imagick

systemctl start php72-php-fpm
systemctl enable php72-php-fpm

There were some files edited as well, for instance;

/etc/opt/remi/php72/php.ini
/etc/opt/remi/php72/php-fpm.d/www.conf

Any help would be really greatly appreciated.

asked Nov 4, 2019 at 5:19

Try this:

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Enable Remi and EPEL Repository Install both previously downloaded packages and enable Remi PHP 7 repo:

sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php74

sudo yum update
sudo yum install php php-cli

You can then install additional packages example:

sudo yum install php  php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json'

Now check the version php -v

You should be asked whether you would like to keep your php.ini file unchanged or not during the install.

answered Nov 4, 2019 at 5:59

Upgrade php 7.2 to 7.4 centos 7

2

Upgrade php 7.2 to 7.4 centos 7

  • Home
  • PowerShell
    • PowerShell 7
  • Quick Links
    • Windows Package Manager
    • Generic Volume License Keys – GVLK
    • Office Deployment Tool Installation
    • Microsoft 365 and Azure PowerShell Scripts
    • Windows Silent Installations
    • LeoGuides

💬 Discord

❤ Donate

No Result

View All Result

Upgrade php 7.2 to 7.4 centos 7

  • Home
  • PowerShell
    • PowerShell 7
  • Quick Links
    • Windows Package Manager
    • Generic Volume License Keys – GVLK
    • Office Deployment Tool Installation
    • Microsoft 365 and Azure PowerShell Scripts
    • Windows Silent Installations
    • LeoGuides

💬 Discord

❤ Donate

No Result

View All Result

Upgrade php 7.2 to 7.4 centos 7

No Result

View All Result

Step 1: Install EPEL and Remi repository

yum install epel-release -y
yum install  http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y

Step 2: Install yum-util packages

yum install yum-utils -y

Step 3: Enable remi repo as per the desired PHP version, for PHP 7.4,

yum-config-manager --enable remi-php74
yum update

Now install PHP 7.4 with all necessary modules.

yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-process php-ldap -y

php -v

PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies

5/5 - (3 votes)

Previous Post

How To Upgrade PHP 7.2 to PHP 7.4 on CentOS 8 or RHEL 8

Upgrade php 7.2 to 7.4 centos 7

Blog

How To Upgrade PHP 7.2 to PHP 7.4 on CentOS 8 or RHEL 8

August 4, 2022

Upgrade php 7.2 to 7.4 centos 7

Blog

How To Install PHP 7.4 on CentOS 8 or RHEL 8

April 20, 2022

Upgrade php 7.2 to 7.4 centos 7

Blog

How to Download and Install htop in Centos 7

April 20, 2022

Upgrade php 7.2 to 7.4 centos 7

Blog

How to install your own KMS Server in Centos VPS

April 20, 2022

Upgrade php 7.2 to 7.4 centos 7

Blog

How to Install WordPress with LEMP Stack on Ubuntu 20.04

April 20, 2022

Upgrade php 7.2 to 7.4 centos 7

Blog

How to Enable Exchange Online SMTP Client Authentication Using PowerShell

April 13, 2022

Leave a Reply

Your email address will not be published.

Comment

Name

Email

Save my name, email, and website in this browser for the next time I comment.

Stay in Touch

Email

Discord Server

Join the Discord server with members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Socials

Twitter

Facebook

Telegram

YouTube

Discord

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Facebook-f Twitter Discord Telegram

Copyright 2022 © All rights Reserved. Design by Leo with ❤

How do I download PHP 7.4 on CentOS 7?

How To Install PHP 7.4 on CentOS 7.
Step 1: Add EPEL and REMI Repository. Run the commands below to add required repositories. ... .
Step 2: Install PHP 7.4 on CentOS 7. We can now enable PHP 7.4 Remi repository and install PHP 7.4 on CentOS 7. ... .
Step 3: Install PHP 7.4 Extensions..

How upgrade PHP 5.4 to PHP 7.4 on CentOS 7?

Upgrade to PHP 7.
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm. ... .
sudo yum remove php-common mod_php php-cli. ... .
sudo yum update. ... .
sudo yum install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-gd php70u-devel php70u-mysql. ... .
sudo systemctl restart httpd..

How do I upgrade my PHP version?

Log into the control panel of your hosting provider. Under, the “Software” tab, click on Select PHP Version. On the next page, you will see the PHP version your web server is using. Now, click on the current PHP version and then select the latest version from the drop-down.

How upgrade PHP 5.4 to PHP 5.6 on CentOS 7?

upgrading php 5.4 to 5.6 on CentOS 7.
After installing Webtatic yum repository, you need to remove the old version of php-common package. ... .
Now we install PHP 5.6 using following command: # yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring..