How To Install PHP 7.2 Using Repository In Ubuntu 19.04

There’s no PHP would be installed in Ubuntu machine. If you require PHP, so you need to install through command line using php-cli. let’s see how to install PHP 7.2 using repository in the machine. There are many ways to install it. how to PHP version check Ubuntu using command line. you can also configure PHP in Ubuntu at this location /etc/php/7.2/

Check Out : Install PHP 7.2 Hypertext Preprocessor on Ubuntu 17.10/18.04

you can search what’re the dependencies would install with PHP using the below command. You need to install php when you will be working with LAMP technology for building up the websites. LAMP stands for Linux, Apache, MySQL and PHP. you can install all these together in the Linux server to host PHP based website on the server.

sudo apt-cache pkgnames | grep php7.2

you can find the PHP configure in Ubuntu at /etc/php/7.2/apache2 here you can define the upload and many parameter in php.ini file. 

you may also use this below command to get install. In the default Ubuntu repository, you will get php version 5.2 and can upgrade this version using the repository. All the CMS (Content Management System) website based on PHP and these are open source GUI based technology.

sudo apt-get install php-{bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm} -y

sudo apt install php -y

Check Out : How To Load PHP Module For Apache

you can install php-cli using this command.

sudo apt install php7.2-cli

if above commands does not work for you, you can try to add PHP and installing repository.

Use the below command to add repository

sudo add-apt-repository ppa:ondrej/php

sudo apt install update

Start the installation of PHP

sudo apt-get install php7.2

Check Out : Step To Install PHP5.4 Version On Linux

PHP version check Ubuntu, php -v

php install ubuntu

with this repository. You can other versions of PHP.

You’re done


Please enter your comment!
Please enter your name here

17 − 3 =