Table of Contents
Installing and configuring XAMPP on Windows Server is one of the easiest ways to set up Apache, PHP, and MySQL for web development or hosting lightweight applications. XAMPP provides a ready-to-use local server environment, and with a few simple steps, you can run websites or applications smoothly on Windows Server.
Step 1: Download XAMPP for Windows
To start, download the latest version of XAMPP from the official Apache Friends website, which ensures you get a stable and secure installer for Windows Server.
https://www.apachefriends.org/index.html
Step 2: Run the Installer
After downloading, run the installer and follow the setup wizard.Choose the components you need
(Apache, MySQL, PHP, phpMyAdmin) andselect the installation directory, usually
C:\xampp
Step 3: Start Apache and MySQL
Once installation is complete, open the XAMPP Control Panel and start Apache and MySQL. This activates the web server and database service so you can begin hosting projects.
Click "Start" next to Apache and MySQL
Step 4: Allow Services in Windows Firewall
To ensure XAMPP services like Apache and MySQL run smoothly without being blocked, you need to allow them through the Windows Firewall for proper access and stable performance.
netsh advfirewall firewall add rule name="Apache HTTP" dir=in action=allow program="C:\xampp\apache\bin\httpd.exe" enable=yes
A short intro for second command:
netsh advfirewall firewall add rule name="MySQL" dir=in action=allow program="C:\xampp\mysql\bin\mysqld.exe" enable=yes
Step 5: Test XAMPP in Your Browser
To ensure that XAMPP is installed and working correctly on your Windows Server, you should test it directly in your browser to confirm that Apache is running and serving pages properly.
http://localhost
Step 6: Secure phpMyAdmin Access
Securing phpMyAdmin is essential to protect your database from unauthorized access, so this step explains how to strengthen its security on Windows Server using simple and effective methods.
C:\xampp\phpMyAdmin\config.inc.php
Step 7: Add Your Website to htdocs
To make your website accessible through XAMPP on Windows Server, you simply need to place your project files inside the htdocs directory, which is the default web root used by Apache for serving content.
C:\xampp\htdocs\
Then access it from your browser:
http://localhost/yourproject
Step 8: Restart XAMPP Services
Restarting XAMPP services is an important step to ensure that all configuration changes, website files, or module updates are properly applied and loaded by Apache, MySQL, and other components.
# Restart Apache and MySQL from Command Prompt
xampp_stop.exe
xampp_start.exe
Or restart manually from the Control Panel:
Open XAMPP Control Panel → Stop Apache & MySQL → Start again
