The web is about to get a whole lot faster! Just this week, HTTP version 2 was released, promising faster page load times.
Now it’s PHP which is getting a huge upgrade, which comes with a bunch of new features and improvements.
If your server runs DirectAdmin and you are looking to upgrade your PHP version from PHP 5.6 to PHP 7.0 or PHP 5.5 to PHP 7.0, than this is the right guide for you. This guide should work on any kind of Linux flavour, including CentOS and Ubuntu.
First, open an SSH session to your webserver and let’s first check for any server updates.
sudo apt-get update
sudo yum update
Since you run the DirectAdmin control panel on your webserver, some packages are handled through CustomBuild. The next step is to update your PHP to version 7.0. So, we go to the right directory
Now you are in the right directory, let’s bump up that PHP version number:
./build set php1_release 7.0 ./build update ./build php d
Your server should now be running version 7 of PHP! To verify the version number, paste the following code in your terminal:
The output should look similar to this one:
PHP 7.0.0 (cli) (built: Dec 4 2015 04:55:02) ( NTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies