How To Install XAMPP On Windows – A Complete Guide

Hey, today we’ll discuss in more detail about how to install XAMPP on Windows, this article is quite long, but sure that it will be useful and could have some valued information if you -sometimes- encounter some conditions similar to what we discussed here.

Table of contents:

  1. What is XAMPP and what it does?
  2. Download XAMPP For Windows (Variety of installer file)
  3. How to Install XAMPP on Windows
  4. How to Run XAMPP on Windows
  5. How to Change XAMPP Directory

What is XAMPP and what it does?

Before discussing how to install xampp on windows, let us know what xampp is. According to Wikipedia, XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P), from that term -as you suggest- we know that this software consists:

  1. Apache Web Server that is used to run the PHP program.
  2. PHP.
  3. MariaDB (previously using MySQL), which is used as a database. MariaDB is an open source database that is a “duplication” of MySQL.
  4. Perl, as in additional options, if we want to do programming Perl.

whereas the cross-platform itself means that the software can be used for a variety of operating systems, it supports Windows, Linux, and MacOS.

so what the usefulness of XAMPP, it simply to run PHP and MySQL, because in both cases what this software is intended.

Download XAMPP For Windows

a XAMPP FULL Version – Installer (.exe)

To download the latest version of XAMPP, you can visit the front page of XAMPP official website at, then click on the “XAMPP for Windows” button in the downloads section, it will automatically download the FULL version (.exe file).

Apache Friends Front Page

The advantage of this version is that we can install Apache and MySQL service via the XAMPP Control Panel, in addition, XAMPP menu will be added to the start menu of Windows.

b XAMPP Portable Version – Installer (.exe)

If you want to download the latest PORTABLE version (.exe file), you want directly go to the link:, once the link is opened, the browser will automatically download the file.

The advantage of this version is the installer will only extract the installation files, no change will be made in the windows system, an addition we can easily move the installation folder to another location (discuss later).

c XAMPP Archived Version – Archive (.7z and .zip)

For download another version or builds, you can visit the XAMPP page at SourceForge website:, then click on the “XAMPP Windows” link, it will display a directory listing of XAMPP version, click your desired version and then select the file that you wish to download.

The directory listing of XAMPP version looks like the following figure:

XAMPP Files at Sourceforge

Suppose we click on 5.6.19, it will display a list of XAMPP builds version 5.6.9, like so:

Example of XAMPP Files at Sourceforge

From the figure above, the files can be categorized as:

  1. XAMPP Full Installer with .exe extension that contains FULL version of XAMPP – the largest file size.
  2. XAMPP Portable Installer with .exe extension and XAMPP Portable Archive (.7z and .zip). Portable version means that it doesn’t deliver with FileZilla FTP dan Mercury Mail Server.
  3. XAMPP FULL Archive (.7z and .zip) that contains FULL version of XAMPP but without installer, just extract and use.
  • If we had used xampp before, then we can directly use this archive version because Microsoft Visual C ++ is already installed on your system along with previous xampp.
  • For exe portable version (.exe file), it has already been included Microsoft Visual C ++ 2008 installer.
The advantage of the archive version (both FULL and Portable) is we just need to extract and use it (easy), but note that it requires Microsoft Visual C ++ 2008 Redistributable (4Mb) installed to our system. In addition, the portable-version with .exe extension already include Microsoft visual C ++ 2008.

d XAMPP Version Naming Convention

Previously XAMPP uses it’s own version of naming convention, it has been used until 1.8.3 version, at that version, to know the version of PHP that is used, we have to read the file readme_en.txt located in the installation folder, later, XAMPP version follow the PHP version, making it easy to know the version of PHP that is included.

How to Install XAMPP on Windows

Now, we come to the main part: how to install XAMPP on Windows. To install xampp on windows, at least there are two ways we can do:

  1. If you download the archive file (.7z or .zip), you can directly extract it to the desired drive or directory and then run the setup_xampp.bat file located in it, it will automatically configure the xampp path, and you are finished, yes as simple as that, but note that like stated before, you need  Microsoft Visual C ++ 2008 Redistributable (4Mb) installed in your system.How To Install XAMPP Portable On WIndows

    now,  you may want to go directly to the section: How to Run XAMPP on Windows.

  2. If you download the installer version or the portable version with .exe extension, you need to install it by running the .exe file and following the installation wizard.

Installation Wizard

Step 1: Double-click the .exe file, an alert box related to User Account Control – UAC (specifically for Windows Vista and above) will be displayed, tell you that UAC being active in your system, in simple words, avoid installing to C:\Program Files (x86) directory, because there would be restrictions on  XAMPP functionality. Click OK to continue the installation.

Install XAMPP on Windows - UAC Notification

Step 2: Then you’ll see the “Welcome to the XAMPP setup Wizard” screen. Just click next.

Install XAMPP on Windows - Welcome Screen

Step 3: Next, Choose the components you want to install, common use of the additional component is MySQL/MariaDB and phpMyAdmin, so if you intend to use PHP and MySQL, leave these option checked and uncheck the rest options, for simplicity’s sake, for now choose the default option and then click next to continue.

Install XAMPP on Windows - Choose Components

Step 4: The next step is select the directory where you want to install XAMPP, the default is c:\xampp. Try to choose other location that is not the same drive with your operating system (OS), it is to anticipate if something going wrong with your OS, then click next.

Install XAMPP on Windows - Choose Location

Step 5: Next, there is an offer to learn more about BitNami (an installer for popular CMS such as WordPress, Drupal, and Joomla), that can directly install the popular CMS on top of XAMPP (link: For simplicity, uncheck this option and click next to continue.

Install XAMPP on Windows - Bitnami Offer

Step 6: XAMPP start to extract the necessary files to the location that you choose in the previous step and configure the configuration files as needed, this process will take a few minutes.

Install XAMPP on Windows - Installing

Step 7: The installation process is complete, XAMPP is ready for use now, if you want to immediately run XAMPP Control Panel, check the “Do you want to start the control panel now?” option, then click Finish to run the control panel and close the installation window.

Install XAMPP on Windows - Finish

How to run XAMPP on Windows

After we successfully install xampp on windows, now we discuss how to run it. If during the installation process you checked the “Do you want to start the control panel now?” option, then automatically XAMPP Control Panel will open,

If not, it can be run manually by following the menu: START > All Programs> XAMPP > XAMPP Control Panel. If you use the portable version, you can run it by opening the installation folder and double-click the xampp-control.exe file.

Running XAMPP on Windows

Next, start Apache and MySQL component by clicking the start button that corresponds to it. If everything is going well, it will appear green color in these components.

Next, do some test whether PHP can run well. Open your browser and type http://localhost in the address bar, if it goes well, it will display xampp page as shown below.

Running Localhost Using XAMPP

Now, you have successfully Install xampp on your system and the xampp control panel has works as expected, you can now emptying the htdocs folder by deleting the files inside it (the default xampp files) and replace it with your php files.

XAMPP Default Files in htdocs Directory

How to Change XAMPP Directory

In some situation, you may want to move or change your xampp directory, it can be done easily by simply copy-paste all of the files from the old location to the new location (applicable to all kinds of installer type either .exe or archive), and then click on the setup_xampp.bat file, that will reconfigure the application.

During the process, a windows command prompt will pop up and ask whether you really want to do it, just type 1 and press enter, automatically, XAMPP will update the content of configuration file refers to the new location.

How to Change XAMPP Directory

After changing the XAMPP directory, if you use the full version using installer (.exe file), then you need to adjust the XAMPP shortcut link in the start menu to the new location.

There is more…

Something important to know that every time we run the Apache and MySQL modules, we have to start XAMPP Control Panel and click the start button on both modules, it is certainly not practical, there are a simple way: run both modules as a service, so that it will be started along with Windows starts, for the guide of doing this, please refer to these tutorials: Install Apache Service on Windows and Install MySQL Service on Windows.


We can install xampp on windows in two ways either using installation file (.exe file) or using the archive file (.7z and .zip). In order to running the software, you have to get Microsoft Visual C++ installed to your system, the .exe file, both installer or portable are already included this file, while the archive files are not.

This software is flexible as we can move it to other location easily, even in usb drive / flash disk, and the full installer version provide us GUI to install the component service (mainly PHP and MySQL) to Windows.


Subscibe Now

Loves articles on join our newsletter to get quality article right to your inbox. Nothing else, just quality stuff!!!

Our Commitment: We respect your privacy, we'll not share your credential to any party

5 Responses

  • “Now, you have successfully Install xampp on your system and the xampp control panel has works as expected, you can now emptying the htdocs folder by deleting the files inside it (the default xampp files) and replace it with your php files.”

    The problem with how you are explaining this is that you say, “You can now…” as if this is optional. If I have never used an app like this or system like this before, how do I know if you are telling me that I have to delete those files or not? Plus you say “emptying,” instead of just empty, and since you have made this look like it’s optional, I’m wonder if or why I should replace those files with php files; and furthermore, if it is everything in the php folder, or just the file folders, because you said files. It’s very vague and therefore very confusing. A bit more explanation, first of all – confirmation if you are actually telling us that we have to empty those files and replace them; and secondly, why this replacement is necessary.
    Next you tell us how to change the directory, without giving us a reason as to why we should or shouldn’t. Is there a specific circumstance under which we would need to move it? Thanks.

  • setup_xampp.bat does not have Refresh code as explained in –How to Change XAMPP Directory– section. We have used the version xampp-win32-7.2.2-0-VC15-installer.exe. Please help.

    We would like to move c:\xampp folder to a different location

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Like Us


Great information from right to your inbox

  1. Understanding JSONP – With Javascript and jQuery Examples

  2. JSON With Javascript and Ajax

  3. JSON From Database – PHP and MySQL

  4. JSON in HTML Document

  5. JSON With PHP – A Complete Guide

  6. Understanding JSON – A Comprehensive Guide

  7. 7 Best Free Online Image Compressor & Optimizer Tools – Compared & Tested

  8. 40+ Modern Free WordPress Themes For Blog in 2017 – Beautiful & Responsive

  9. Understanding Constant in PHP – Updated to PHP 7

  10. Understanding Variable in PHP – All PHP Version