Next, update the repository with the following command: # apt-get update -y ![]() ![]() Once all the dependencies are installed, add the PHP repository using the following command: # add-apt-repository ppa:ondrej/php So you'll need to add the PHP repository in your system to install the multiple PHP versions.įirst, install the required dependencies with the following command: # apt-get install software-properties-common gnupg2 -y A root password is configured on the server.īy default, Ubuntu 20.04 ships with the PHP version 7.4.In this article, we'll show you how to install PHP 7.2, 7.4, 8.0 and 8.1 on Ubuntu 20.04. In this case, you can configure NGINX to define your desired PHP version. This is very useful when you have multiple PHP applications on your server and each application is compatible with the different PHP versions. ![]() If you are a system or web server administrator, it's very important for you to know how to install and use multiple PHP versions on a single server.
0 Comments
Leave a Reply. |