You can use both PHP 5.x and 7.x versions together. You don't need to remove PHP 7.x or reinstall LAMP stack. In that case, it is a good idea to have both PHP 5.x version and PHP 7.x version, so that you can easily switch between any supported version at any time. With Zend OPcache v7.2.7-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend TechnologiesĪs you can see, the installed version of PHP is 7.2.7.Īfter testing your application for couple days, you find out that your application doesn't support PHP 7.2. Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies Let us check the default installed version of PHP using command: $ php -v You can simply switch to the previous working PHP version in couple minutes. You don't even have to downgrade the PHP to its earlier version. After a while you find out that the application worked fine in PHP 5.6, but not in PHP 7.2 (Ubuntu 18.04 LTS installs PHP 7.x by default).Īre you going to reinstall PHP or the whole LAMP stack again? Not necessary.
In Linux, we can use multiple versions of the same package at the same time, side by side.įor instance, let us say you are testing a PHP application in LAMP stack deployed in Ubuntu 18.04 LTS. In some situations, you need not to downgrade the problematic packages. Refer our old guides on how to downgrade a package in Ubuntu and its variants here and how to downgrade a package in Arch Linux and its derivatives here.
In such cases, you can simply downgrade the problematic package to its earlier working version in no time.