Install Multiple PHP Versions on Ubuntu 16.04

Your video will begin in 10
71 Views
Published
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 "" > /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:
https://www.liquidweb.com/kb/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
Category
Liquid Web
Tags
liquidweb, datacenter, web
Be the first to comment