
How to switch PHP version in Ubuntu using Terminal
Different projects are working on different php version some of project are working on php 7.4,7.2,7.0 also older version of php projects are working on php version 5.6 and etc.
Before start interchange of php version we assume that you have installed php version 7.4,7.2,7.0 and 5.6,if you have not installed php version you can check my LAMP Installation post or simply search for lamp installtion.
Please follow below steps to interchange php versoin.
Interchange php version 7.4 To 7.2
Step 1: Open your terminal.
In this first step open your terminal OR simply press Ctrl + Alt + T and add below code to your terminal.
Then restart apache server and enable php version whatever you have to enable.Currently we are enable php version 7.2.
Interchange php version 7.2 To 7.4
Step 1: Open your terminal.
Open your terminal OR simply press Ctrl + Alt + T and add below code to your terminal.
Interchange php version 7.0 To 5.6
Step 1: Open your terminal.
Open your terminal OR simply press Ctrl + Alt + T and add below code to your terminal.
Interchange php version 5.6 To 7.0
Step 1: Open your terminal.
Open your terminal OR simply press Ctrl + Alt + T and add below code to your terminal.