You are currently viewing How to install PHP, MySQL and Apache Server in Windows for Beginners

How to install PHP, MySQL and Apache Server in Windows for Beginners


In this tutorial, we will learn How to Install PHP, MySQL and Apache Server in Windows machine.

If you like Web Development and want to develop web apps using PHP and MySQL then you will have to develop your web apps in your local machine first before making it public.

After Completing the Development of your web app you have to upload it or you can say deploy it on your online server.

But as you would have known that, to develop Web Applications using PHP in your local machine you will need a PHP, MySQL and Apache Server installed in your local machine.

Today, we will learn How to Install PHP, MySQL and Apache Server in Windows step by step.

It is not that hard if you know the right way of doing it.


At the time when I was also a beginner, I spent a whole week on trying to Install PHP, MySQL, and Apache Server in my Windows machine. It caused so many errors and I had to do so many changes and tweaks to make it run successfully.

Don’t worry, I won’t let you suffer that much because there was no one to guide me at that time but for you, I am here now.

Okay, enough talking, let’s get started!


First of all, I would like to tell you that, there are 2 good ways of doing it and believe me they are the easiest and powerful ones.

You will have to download and Install a Free Software package and that package includes all your required software that you need to make your web apps with PHP.

  • WAMP

What are XAMPP and WAMP?

Actually, if you know the full form of their names, you will automatically understand why we need them and what they do.

In XAMPP, AMPP stands for Apache, MariaDB, PHP, and Pearl.

In WAMP, it is Windows, Apache, MySQL, and PHP.

Hope you got some hint I was trying to say.

Actually, this two software hold the complete package with a control panel to control each of its modules, i.e. Apache, PHP, MariaDB or MySQL, etc.

Don’t worry about MariaDB or MySQL. They both are Database engines and kind of work the same, that won’t bother you.

So, you have to install only one of them, that is up to your choice.

They both have their own extra features with them.

I would personally recommend you to install XAMPP on your machine because it has more extra software which you may require in your future as a Developer. Like FileZilla for uploading files on the server, Pearl for developing Pearl Softwares, Tomcat for developing Java Web Apps, and lot more.

Let’s install XAMPP

Step 1 – Go to their developer’s website, which is Apache Friends

Apache Friends Website to download XAMPP


Step 2 – Now there you will see Download buttons for different operating systems as shown in the picture below, choose which one is yours and download the software.

Downloading XAMPP from Apache Friends


Step 3 – After downloading, run the downloaded application and click on “Next” to start the installation of XAMPP.

Starting XAMPP Installer


Step 4 – Then it shows the “Select Components” Window if anything is not checked in there, just select all those components to install and click “Next”.

Select all components in XAMPP installation


Step 5 – Now, we have to select the installation directory. If you don’t want to change it just click on “Next” or you can change the installation directory where you feel right and click “Next”

Choose Installation directory for XAMPP


Step 6 – Now it will show a checkbox saying “Learn more about Bitnami XAMPP”, just remove the check from that and proceed to the next step by clicking “Next”.

Uncheck extra chekboxes in XAMPP Installation


Step 7 – Now it says that XAMPP is ready to be installed and we just have to click “Next” to start the installation. It will take some minutes just kindly wait and get yourself ready to start PHP Development.

XAMPP is now ready to be Installed

XAMPP Installation Begins


Step 8 – After installation gets finished it shows a checkbox asking you “Do you want to start the Control Panel now?” keep it checked and click “Finish”.

Finishing XAMPP Installation


Step 9 – Now your XAMPP installation will get started and a new small window will popup be asking you to choose the application language. Choose “American Flag” for English.

Select Application Language


Step 10 – Now, the Control Panel of XAMPP will be shown to you, having all the components and services installed in this XAMPP package. Here you will get to see Apache and MySQL services with their “Start” buttons in front of them.

XAMPP Control Panel


Final Step – Running your localhost server and checking your PHP installation. Just click on the “Start” button of Apache Server and “MySQL” server.

Starting Localhost Server in XAMPP


Note – While starting the Apache Server and MySQL Server, your Windows firewall will prompt you to Allow these services to create a localhost server in your machine. You just have to click on the “Allow” button to give them permissions.

Allow XAMPP to Create local Server - Firewall Permissions

Allow XAMPP to Create local Server - Firewall Permissions


Running your Server for the first time

Now when the background color of the service gets Green, that means the service is started and can be accessed by us now. To access the server, click on the “Admin” button of Apache Server and your browser will get open with address “localhost“, and here you see the home page of your localhost server.

Running Localhost Server


To check if PHP is running, click on the “PHPInfo” from the menu of your Localhost server’s home page. If the page showed up that means PHP is successfully installed in your system.

Home Paage of Localhost Server XAMPP

PHP Successfully installed with XAMPP


Note – Your localhost server’s folder is inside the directory of where you installed your XAMPP > htdocs.

The default directory will be “C:\Program Files\xampp\htdocs\

Now, to run your first PHP script on this server, put your PHP files inside your localhost server’s folder and open the Internet Browser and type “localhost/name_of_your_page.php” in the URL section and press Enter, remember to replace “name_of_your_page” with the name you saved your file with.


Thank you so much.
Hope you got to know something from this tutorial, if you were unable to understand anything in this tutorial, kindly let me know in the comments section below, I will surely make that simpler for you so that you can understand that better.

How to install PHP, MySQL and Apache Server in Windows for Beginners
Article Name
How to install PHP, MySQL and Apache Server in Windows for Beginners
This is a tutorial about how to install PHP, MySQL and Apache Server or Localhost Server in Windows showing you step by step guide with images so that you can install PHP, Apache Server and MySQL in your computer without any technical requirement and without wasting so much of time.
Publisher Name
Publisher Logo

Vikas Vimal

Web Designer and Developer from India. Music and Food Lover.

Want to say something? Tell us in the comments section below.