Install Multiple PHP Versions on Ubuntu 16.04

Kelvion New Plate Heat Exchanger


In this video, we will be discussing how to install Multiple PHP Versions on Ubuntu 16.04. Ubuntu 16.04 LTS servers assign the PHP 7.0 version by default. Although PHP 5.6 is currently EOL (end of life) as of December of 2018, some applications may not be compatible with PHP 7.0. For this tutorial, we will instruct you on how to switch between PHP 7.0 and PHP 5.6 for Apache and the overall default PHP version for Ubuntu.

Commands Used:
apt-get update -y.
apt-get install -y software-properties-common
add-apt-repository ppa:ondrej/php -y
apt-get update
apt-get install -y php5.6
a2dismod php7.0; a2enmod php5.6; systemctl restart apache2
echo “<?php phpinfo(); ?>” > /var/www/html/phpinfo.php
curl -s http://localhost/phpinfo.php | grep “PHP Version” | tail -1
update-alternatives –config php
php -v

The related article for this article can be found here:

Update: Install Multiple PHP Versions on Ubuntu 16.04

For more information about this and other topics, visit us at https://www.liquidweb.com/kb/
To learn more about our managed woocommerce hosting, visit: *https://www.liquidweb.com/products/managed-woocommerce-hosting/”

Video by: Justin Palmer


Duration: 3:53
Publisher: Liquid Web
You can watch this video also at the source.