Update VestaCP to PHP 7.2 on CentOS 7

Vesta Control Panel is simple and easy to use open source hosting control panel. It has simple and clean interface and lots of useful features that will help you to host your websites on your VPS. Vesta Control Panel currently can be installed on RHEL 5, RHEL 6, RHEL 7 CentOS 5, CentOS 6, CentOS 7, Debian 6, Debian 7, Debian 8, Ubuntu 12.04 – 16.04 operating systems.

The control panel has a lot of useful features, such as:

Easy backup and restore
Web log viewer
Server monitoring
Web, DNS, mail and database management
SSL Certificates and SNI Support
Auto Updates
and much more…

In this blog tutorial we will show you how to update VestaCP to PHP 7.2 on a CentOS 7 VPS. The update process is pretty easy and fast. You just need to enable the Remi repository since PHP 7.2 is not available in the default repositories.

To start the update, login to your CentOS 7 server as user root

ssh [email protected]

As usual, let’s update all your system software to the latest version available using the yum package manager.

yum -y update

Next, we will check what version of PHP we have installed for reference.

php -v

Once the update of your system is completed, you can proceed with the installation of yum-utils if it is not already installed on your server. yum-utils will be used to enable the new version of PHP on your system.

yum install yum-utils

Enable Remi PHP 7.2 repo

yum-config-manager --enable remi-php72

Once the Remi PHP 7.2 repo is enabled we can tell yum to update, which will upgrade our old version of PHP to 7.2

yum update

Once the process is finished your server will now have PHP 7.2. In order for the changes to take effect we will have to restart our Apache web server.

systemctl restart httpd

If you are running nginx as a web server along with php-fpm then run:

systemctl restart nginx
systemctl restart php-fpm

To ensure that the PHP is updated to version 7.2 on your server, you can run the command:

php -v

You should get something like this:

PHP 7.2.0RC6 (cli) (built: Nov 7 2017 15:56:16) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies

That is it. You have PHP 7.2 running on your VestaCP installation on CentOS 7.


Update VestaCP to PHP 7.2 on CentOS 7