Update VestaCP to PHP 7.1 on CentOS 7

This guide is very similar to our other guide on installing PHP 7 since we’re using the same method although this time, as the title suggests we’ll be using the latest stable version of PHP instead, 7.1.

You’ll need the Remi repository enabled to do this since PHP 7.1 isn’t available in the default repos, if you haven’t already got it installed then you should check out our guide on how to first (if you need to see if Remi is enabled run “sudo yum repolist” and check if EPEL and Remi is listed).

First let’s make sure your server is up to date.

sudo yum update

We’ll also check what version of PHP we have installed for reference.

php -v

Now we make sure that yum-utils is installed

sudo yum install yum-utils

If it’s already installed, great move on to the next step, if not then allow it to install.

Now we can enable remi-php71

sudo yum-config-manager --enable remi-php71

You’ll get a large output after doing this.

Now we can tell yum to update, this will upgrade our old version of PHP to 7.1

sudo yum update

Yum will handle all the work for us in the upgrade

After the process has finished your server will now have PHP 7.1 installed, we need to restart our web server for it to take effect however.