High Performance Starts Here — AMD Dedicated Servers

English

Home

Blog

How To Upgrade PHP to 7.2 on CentOS 7...

How To Upgrade PHP to 7.2 on CentOS 7

How To Upgrade PHP to 7.2 on CentOS 7

NetShop ISP

NetShop ISP · Blog Author

Sep 27, 2022 · Technical Tutorials

CentOS 7 is the oldest RHEL-based OS distribution that is currently maintained (end of maintenance updates will be on 30th of June 2024). It’s initial launch was in July 2014 and since then it has been used for millions of server-side installations.

There are many system admins and developers out there whose applications requiring to be updated whilst remaining on CentOS 7. In this article we will explain the easiest way to upgrade PHP to 7.2 on a CentOS 7 server.

Pre-requisites

  • CentOS 7 Server with Internet Connection
  • Root access on Server

Steps to Upgrade PHP to 7.2 on CentOS

  1. Turn on EPEL repository
    yum install epel-release -y
  2. Turn on REMI repository
    yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
  3. Install necessary yum utilities package
    yum install yum-utils -y
  4. Enable REMI repo as per your desired php version (in our case 7.2)
    yum-config-manager –enable remi-php72
    yum update -yu
  5. Install PHP 7.2
    yum install php72 -y
  6. Confirm new PHP version
    php -v

centos
how to
linux
php
tutorials
Press Releases
97
Industries
122

Free VPS Trial

No Credit Card Required.

Start Your VPS Hosting Free Trial

Recent Posts

Hermes AI Agent VPS - Deploy in 1 Click

Introducing Hermes Agent VPS: Your Own AI Agent, Live in One Click

22 July 2026

How To Protect Your Website from DDoS Attacks in 2026

How To Protect Your Website from DDoS Attacks in 2026

14 July 2026

Why Your Stream Keeps Buffering (And How to Fix It)

Why Your Stream Keeps Buffering (And How to Fix It)

08 July 2026

How to Secure Your WordPress Website in 2026

How to Secure Your WordPress Website in 2026

30 June 2026

How To Fix Outdated Theme on cPanel / WHM

Why Your cPanel or WHM Login Page Is Showing an Outdated Theme (And How to Fix It)

22 June 2026