Install PHP Using Apache on Ubuntu
Now we will install the PHP using Apache in Ubuntu, for follow the step-by-step process mentioned below:
Step 1: Install software-properties-common
This helps us in the management of the software and its resources so first we will have to install this package, for this run the following command:
sudo apt install software-properties-common
This will give the following output:
Step 2: add ondrej/php PPA
Now we will have to add ondrej/php PPA which is used to provide different versions of PHP to Ubuntu, for entering the following command:
sudo add-apt-repository ppa:ondrej/php
Again, this will give the following output:
Step 3: Install the PHP version
Now you can install any version of the PHP that you want, make sure that you verify that the version does exist and that there are no typos, for example, here I have installed:
Also Read
How to Install PHP on Ubuntu?
Installing PHP in Ubuntu is a very simple and efficient process estimate we already know, PHP is responsible for the development of various web applications it is considered one of the most popular languages for web development, in this article we will learn and understand how we can install the PHP in the ubuntu.
Table of Content
- What is PHP?
- Prerequisites
- How to Install PHP in Ubuntu?
- Method 1: Install PHP Using Apt/Terminal
- Method 2: Install PHP Using Apache on Ubuntu