Home Tutorial Install PHP with Apache on Ubuntu , How ?

Install PHP with Apache on Ubuntu , How ?

by MH RISHAD - 17 Apr 2022

How to Install PHP with Apache on Ubuntu 

If you're running an Apache web server, you need to introduce PHP with the Apache module. Underneath you'll discover establishments for PHP 7.4 and PHP 8.0. 1.


1. Guarantee you're utilizing the most recent Ubuntu upgrades by entering the taking after command into a terminal window:

sudo apt update && sudo apt upgrade


2. Introduce software-properties-common to assist you oversee conveyances and autonomous program sources:

sudo apt install software-properties-common


3. Next, You need to add the ondrej/php PPA which gives you all latest releases of PHP for Ubuntu:

sudo add-apt-repository ppa:ondrej/php


4. Update the repository and also include the new packages:

sudo apt update


5. Presently you'll install PHP. 

 To intall PHP 7.4, use this command:

sudo apt -y install php7.4


6. For Install PHP 8.0:

sudo apt -y install php8.0


7. Verify the Version you installed: 

php -v



The output to show the PHP Version form you Installed

Thank You

Next will be  "Install PHP with Nginx on Ubuntu"


Leave a Comment

Required fields are marked *