- Download the phpversion.sh
- Run command
sudo sh path-to-the-file/phpversion.sh
- It will ask which version you want to install suppose you need
php7.2
than enterphp7.2
press enter. - Than it will ask you which version you want to disable that is your current php version for checking your current phpversion you can run command
php -v
. Suppose you have php7.1 than you need to enterphp7.1
than press enter. - Great you have done a good job now verify your php version by using command
php -v
.