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:
- What is XAMPP and what it does?
- Download XAMPP For Windows (Variety of installer file)
- How to Install XAMPP on Windows
- How to Run XAMPP on Windows
- 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:
- Apache Web Server that is used to run the PHP program.
- MariaDB (previously using MySQL), which is used as a database. MariaDB is an open source database that is a “duplication” of MySQL.
- 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 www.apachefriends.org, then click on the “XAMPP for Windows” button in the downloads section, it will automatically download the FULL version (.exe file).
b XAMPP Portable Version – Installer (.exe)
If you want to download the latest PORTABLE version (.exe file), you want directly go to the link: https://sourceforge.net/projects/xampp/files/latest/download, 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: https://sourceforge.net/projects/xampp/files/, 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:
Suppose we click on 5.6.19, it will display a list of XAMPP builds version 5.6.9, like so:
From the figure above, the files can be categorized as:
- XAMPP Full Installer with .exe extension that contains FULL version of XAMPP – the largest file size.
- 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.
- 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.
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:
- 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.
now, you may want to go directly to the section: How to Run XAMPP on Windows.
- 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.
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.
Step 2: Then you’ll see the “Welcome to the XAMPP setup Wizard” screen. Just click next.
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.
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.
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: https://bitnami.com/stack/xampp). For simplicity, uncheck this option and click next to continue.
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.
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.
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.
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.
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.
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.
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.
Loves articles on webdevzoom.com? join our newsletter to get quality article right to your inbox. Nothing else, just quality stuff!!!