How to install PHP on Windows

To run the PHP program we need the following things:

  • PHP file
  • Web server (eg, Apache)
  • Database
  • Web browser (eg, Mozilla, Chrome)

We can install PHP and Apache as separately or install the “XAMPP” software which contains PHP, Apache and Mysql package. Here we have explained how to install PHP in your windows system using XAMPP.

Step 1:
  • Go to and download the latest version of XAMPP.
Step 2:
  • Run the downloaded .exe file. The following window will appear. Click “Next”.
Step 3:
  • There will be selected all available components as default. If you don’t want any of components then you can uncheck the box.


Step 4:
  • You can change the installation path if you want any other location of default path (C:\xampp).


  • Click “Next” to start installation process


Step 5:
  • You have finished your XAMPP installation.


  • Go to C:\xampp and run “xampp-control.exe”. The XAMPP control panel will be displayed. Click “Start” button for Apache module.


Step 6:
  • Now you are ready to run the PHP file. Craete your first PHP file and save it into C:\xampp\htdocs\sample.php. Then run http://localhost/sample.php in your browser and enjoy.
Please follow and like us:

Leave a Reply

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