Skip to main content

How to install PHP on windows using XAMPP

In now days, PHP is a most famous server side scripting language on the web. PHP is open-source and very simple language. There are lots of opportunities in PHP development. CMS like WordPress, Magento, Joomla, etc. developed in PHP. There are lots of web application developed and still developing in PHP. So, I decide to create a tutorial on How to install PHP on windows. Here in this tutorial we will learn how to install PHP and MySQL (Most famous, simple and open-source database) on windows. So let’s start it step by step.

First of all we have to install a XAMPPserver, WAMP server or LAMP server. Here keep in mind that WAMP server stands for Windows, LAMP is stand for Linux system and XAMPP is stand for cross platform. Here we start with XAMPP server. XAMPP is very easy to install and very powerful. Follow the below steps to install XAMPP server.

  • Download XAMPP server from Here. Now click on it’s .exe file.
  • You will see window like this. Please forget it and click on “Yes” button.
  • click on “Ok” button in below message.
  • You will see window like below. Please click on “Next” button to go next window.
  • Click “Next”.
  • Click “Next”.
  • Click “Next”.
  • Click “Next”.
  • Click “Finish”.
  • Click on XAMPP server icon from the right-bottom side.
  • If you do not find out that icon there then click on start button and search “xampp control panel”. Click on it.You will find out the window like below. Start APACHE and MySQL here.
  • Open your browser and type “Localhost”. You will find out screen like below image. Choose your language.
  • If you see this screen that your XAMPP server installed successfully for PHP and MySQL. In the left side corner you will find out “PHPMYADMIN”. This is most famous MySQL database software which will help you most in database management.

Now it’s time to test your first PHP program.Follow the below steps.

  • Open your “C:” drive in windows.
  • Search “XAMPP” folder and click on it.
  • Search “htdocs” folder and click on it.

“htdocs” is your destiny folder for PHP development. Your PHP application code will set in this folder. Let’s start to build a simple PHP program on “XAMPP” and test it.

  • Open “htdocs” folder in xampp as shown above.
  • Create a folder and name it “TEST”.
  • Create a “index.php” file in “TEST” folder. Copy the below code inside it.
  • <?php
    echo "Hii i am PHP programmer and This is my first program";
  • Save the index.php file.
  • Open your browser and navigate your TEST folder path like this way “localhost/TEST/index.php”

That’s it you complete your first PHP program. Best of Luck!!

As a developer, I hope that you may like this article. Article is full of information but still if you have any question then let me know in the comment-box. I will help you to solve it. Thank you friends!!


HI, i am software developer having knowledge of PHP, C, C++ programming languages. I am very passionate about programming and ability to solve the programming problems. CodeandTuts is my blog where i like to put new tutorial and help new developer.