How to install multiple versions of PHP on Linux?

How to install multiple versions of PHP on Linux?

In this post, you will get to know how to install multiple versions of PHP on Linux.

Here are the steps:

Step 1: Show PHP Version information

$ sudo apt show php -a



Step 2: Install PHP 

$ sudo apt install php



Step 3: Install Different versions of PHP using Ondřej Surý PPA

$ sudo apt install python-software-properties

$ sudo add-apt-repository ppa:ondrej/php

Finally need to run update using $ sudo apt update

Now install with a different version:

$ sudo apt install php7.0

$ sudo apt install php7.3

$ sudo apt install php8.0

Share with Friends
Copyright © 2020-2021 Engineer Jagat All rights reserved. Developed by Ravindra Rana