Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x

Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x
Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x
Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x
Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x
Downgrading PHP Versions in Ubuntu from 7.x to 5.x ot 6.x

Techaorha Downgrading PHP Version from 7.X to 5.x to 6.x

Why Downgrading PHP is required.

With the progressive upgrades of PHP , Ubuntu and other related technologies many new versions of PHP are release. But the importnat application which are developed by individual team or organization are unable to cop up with development , as a result user are left with only option to Downgrading PHP version.

Downgrading PHP Version

For downgrading PHP it’s must that all the required version of PHP is installed. You can easily switched between the versions of PHP as per the requirement.

PHP can be installed by compiling the source code or direct installation from the package. Once the package is installed user can switched between the package by enabling or disabling the php module followed by restarting the Apache server.

Below command will help you with instillation of PHP and downgrading the php version. Same command can be used to upgrade the PHP version with a little twist.

Thanks for Reading till end. Hope the information provided above is very helpful to you.

Commands for Downgrading the PHP version from 7.2 to 5.6


// add the repository where all the required packages are available

sudo add-apt-repository ppa:ondrej/php

// Update

sudo apt-get update

// Installing php 7. If its already installed you didn’t need to follow the below step

sudo apt-get install php7.2

sudo a2enmod php7.2

// Installling php 5.6

sudo apt-get install php5.6

// Enabling and disabling the php’s

sudo a2dismod php7.2

sudo a2enmod php5.6

Command for Upgrading the PHP Version from 5.6 to 7.2

// add the repository where all the required packages are available

sudo add-apt-repository ppa:ondrej/php

// Update

sudo apt-get update

// Installing php 5.6 If its already installed you didn’t need to follow the below step

sudo apt-get install php5.6

sudo a2enmod php5.6

// Installling php 7.2

sudo apt-get install php7.2

// Enabling and disabling the php’s

sudo a2dismod php5.6

sudo a2enmod php7.2

If you want any help you can always contact us over here.  Techaorha is always ready to take any project or challenges in PHP/block chain /AI technology.