How to update VestaCP to PHP 7.3


SystemMen - In this article, I will show you how to update VestaCP to PHP 7.3.

By default with the current version (the time of this article), VestaCP will install PHP 5.6.40.

This may not seem optimal when PHP 7.3 was born. And it has also demonstrated higher performance.

Update VestaCP to PHP 7.3

You will in turn take the following steps to update PHP for your VestaCP.

how-to-update-vestacp-to-php-7-3 How to update VestaCP to PHP 7.3
Update VestaCP to PHP 7.3.

First, check the current PHP version.

[root@vestacp ~]# php -v
PHP 5.6.40 (cli) (built: Apr 2 2019 12:46:42)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Next, you need to install EPEL package.

yum install epel-release -y

And next, we will use Remi’s repository to update PHP packages.

wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm

Activate PHP using Remi’s 7.3 repository.

yum-config-manager --enable remi-php73

If you get an error in this command like this.

-bash: yum-config-manager: command not found

You need to install the yum-utils package to fix the error.

yum install yum-utils -y

And finally, implement PHP update for VestaCP. The process may take several minutes.

yum update -y

After update finish, restart the php-fpm service.

service php-fpm restart

Then, check the version after the update. It has successfully updated.

[root@vestacp ~]# php -v
PHP 7.3.4 (cli) (built: Apr  2 2019 13:48:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies

Conclusion

With only a few steps, you have successfully completed the update to PHP 7.3.4 so it has better performance. In the next article, I will guide you to update MariaDB.

«« »»
One Comment