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 http://www.apachefriends.org/download.html and download the latest version of XAMPP.
Step 2:
  • Run the downloaded .exe file. The following window will appear. Click “Next”.
    xampp-installation_step-1
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.

xampp-installation_step-2

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

xampp-installation_step-3

  • Click “Next” to start installation process

xampp-installation_step-5

Step 5:
  • You have finished your XAMPP installation.

xampp-installation_step-7

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

xampp-installation_step-8

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 *