Install PHP Guide

install php

Sharing is caring!

Here I have listed the steps to install PHP manually on your machine. Before installing PHP make sure that you have already installed Apache.

Now lets see how to install PHP manually on to your machine.

Step 1: Download Php files

Download the latest version of the PHP zip package from www.php.net/downloads.php

Step 2: Unzip downloaded  Php files

Create a folder in C: PHP and extract the content of the zip file. You can install PHP anywhere in the system, But you have to change the paths referenced in the below steps.

Step 3: Edit php.ini

Make a new copy of php.ini in C: PHP and rename it as php.ini. Now you need to change Serval lines in php.ini. Open php.ini with any of the text editors. Find the following string doc_root and change it to doc_root = “C:\php”(change to whatever your root directory is ) and also change extension_dir = “. /” to

Don’t forget to remove the ;(semicolon) in front of it.

Step 4: Add C:php to the path environment variable

Now set the path environment variable. From the control panel, choose System->Advanced System Setting->Select Advanced Tab and click on “Environment Variables” button.
Scroll Down System variable list and click on the path by Edit System variable window. Enter “;c: PHP”to the end of the variable value line.

install php path

Step 5: Test a php file

Successfully you have installed PHP on your machine. Check the installation by creating a PHP file with.php extension and run it.

Ensure that the Apache server has started successfully. If there is no problem in installation then the above code will show “PHP version page”.

You can install PHP manually otherwise you can use some excellent all-in-one windows distributors that contain Apache, PHP, MYSQL in a single installation file Example: XAMPP.

Sharing is caring!