How to install PHP in Ubuntu – Step by Step Guide

1 min

This tutorial will teach you how to install php in Ubuntu linux system.

To install PHP 5 in Ubuntu – follow below steps:

a) Open terminal and type below commnad:

sudo apt-get install libapache2-mod-php5

b) The installer itself would create the PHP configuration file i.e. php.ini in the installation directory /etc/php5

I would recommend you to install Apache2 before installing PHP5. A step-by-step guide for installing Apache2 is available here.

To run PHP, you need to configure apache. A detailed guide available here.


Creator and author of Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments