How to Install and enable PHP on Linux based server ?

A complete guide on how to update, install and enable PHP latest version on Linux OS based web server.

PHP is web scripting programming language that is use for creating dynamic web pages. PHP is supported by Apache and MySQL servers for dynamic updating of website. Hence it is used to develop our very famous WordPress CMS.

PHP is already available with Linux OS, we have to just update it to latest version and install from Library.

Install PHP on Linux server OS

Install PHP on Linux server OS

To update PHP and get it started running with other programs like Apache and MySQL, enter following command in Linux Terminal.

Related:  How to search and install different PHP libraries and modules ?

This will prompt for PHP installation, you have to enter yes then it will complete installation automatically.

By default, web servers are made to server only index.html file only. We need to configure server to read and server php index file. Use following command to change the configuration.

Add index.php to the beginning of index files. The conf file should look like below:

Related:  Complete list of PHP modules and libraries available

Now make this changes effective, we need to restart Apache using below command.

Now PHP is successfully updated and installed you Linux server.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *