XAMPP is the fastest way to turn a Windows 11 PC into a full local web server. One installer gives you Apache, MySQL (MariaDB), PHP and Perl, so you can build and test WordPress sites, PHP apps and database-driven projects without touching a live server or paying for hosting. This guide walks you through downloading, installing, configuring and securing XAMPP on Windows 11, step by step.

This tutorial is written for beginners and developers on Windows 11 (Home or Pro). By the end you will have Apache and MySQL running as services, a working phpMyAdmin dashboard, and a local project folder ready for your code.

Prerequisites

  • Windows 11 (64-bit), any edition, with at least 4 GB RAM.
  • Administrator access on the PC.
  • No other software using ports 80 or 443 (close Skype, IIS or any local web server first).
  • About 1 GB of free disk space for the XAMPP installation.

Step 1: Download the XAMPP installer for Windows

Download XAMPP only from the official Apache Friends website. Third-party mirrors sometimes bundle adware with the installer.

  1. Go to https://www.apachefriends.org/download.html and pick the XAMPP for Windows build with the latest PHP 8.x version.
  2. Save the installer (for example xampp-windows-x64-8.x.x-x-VS16-installer.exe) to your Downloads folder.

The official site lists a checksum file next to each build. If you want to verify the download, compare the SHA-256 hash in PowerShell:

Get-FileHash $env:USERPROFILE\Downloads\xampp-windows-x64-8*-VS16-installer.exe -Algorithm SHA256

Matching hashes confirm the file was not tampered with in transit.

Step 2: Run the installer

Right-click the installer and choose Run as administrator. Elevated rights let XAMPP register Apache and MySQL as Windows services later.

  1. If a User Account Control warning appears saying "It seems you have an antivirus running", click Yes to continue — this is a standard notice, not an error.
  2. On the components screen, leave the default selection (Apache, MySQL, FileZilla FTP server, Mercury Mail server, Tomcat, PHP, Perl, phpMyAdmin, Webalizer, Fake Sendmail) unless you have a reason to trim it.
  3. For the install folder, keep the default C:\xampp. Short path with no spaces avoids classic PHP path bugs. Do not install inside Program Files — Windows permission restrictions there break XAMPP's write access.
  4. Uncheck "Learn more about Bitnami for XAMPP" and click Next, then Next again to start installing.

The installer extracts several hundred megabytes; expect 2-5 minutes depending on your disk speed.

Step 3: Open the XAMPP Control Panel and start Apache

When installation finishes, tick "Do you want to start the Control Panel now?" The control panel is your dashboard for starting and stopping every service.

  1. In the XAMPP Control Panel, click Start next to Apache.
  2. The background turns green and the log shows "Attempting to start Apache service..." followed by "Status change detected: running".

If Apache refuses to start, the most common cause is a port conflict: Skype, IIS, or the World Wide Web Publishing Service already owns port 80. Stop the conflicting app, then press Start again. See the troubleshooting section below for the exact IIS fix.

Step 4: Start MySQL

  1. In the Control Panel, click Start next to MySQL.
  2. Wait for the green "running" status in the log.

MySQL listens on port 3306 by default. If it fails to start, check that no other MySQL or MariaDB instance (for example a leftover MySQL Server install or a WAMP stack) is already holding that port.

Step 5: Open phpMyAdmin and create your first database

With Apache and MySQL running, open your browser and visit:

http://localhost/phpmyadmin/

The phpMyAdmin login screen appears. By default the username is root and the password is empty — you will set a proper password in the next step.

  1. Click the Databases tab, type a name such as myproject, choose utf8mb4_general_ci collation, and click Create.
  2. Your database now shows in the left sidebar, ready to hold tables.

Step 6: Set the MySQL root password

A blank root password is fine for five minutes of testing but unacceptable for anything beyond that — any program on your PC can connect to your databases.

  1. In phpMyAdmin, click the User accounts tab, then Edit privileges on the root@localhost row.
  2. Go to Change password, type a strong password, and click Go.
  3. Open C:\xampp\phpMyAdmin\config.inc.php in a text editor and update the auth lines so phpMyAdmin can still log in:
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOUR_NEW_PASSWORD';

Save the file and reload phpMyAdmin — it should log straight in with the new password applied.

Step 7: Install Apache and MySQL as Windows services

By default the modules only run while the Control Panel is open. Installing them as services means they start with Windows and keep running in the background.

  1. Stop both modules in the Control Panel first (services cannot be registered while running).
  2. Click the red X icon (service column) next to Apache, then confirm — the icon becomes a green check.
  3. Do the same for MySQL.
  4. Restart the Control Panel as administrator, then Start both modules. They are now Windows services and can be managed from services.msc.

The service names are Apache2.4 and mysql if you ever need to start or stop them from an elevated command prompt:

net start Apache2.4
net start mysql

These commands start the services from any admin terminal without opening the Control Panel.

Step 8: Put your project in htdocs and test PHP

XAMPP serves websites from C:\xampp\htdocs. Anything you place there becomes reachable at http://localhost/.

  1. Create a folder C:\xampp\htdocs\myproject.
  2. Create index.php inside it with this content:
<?php
echo "Hello from XAMPP on Windows 11!";
echo "<br>PHP version: " . PHP_VERSION;
  1. Visit http://localhost/myproject/ in your browser. You should see the greeting and your PHP version number.

That page proves Apache, PHP and the document root are all wired up correctly.

Verify it worked

  • Apache: http://localhost/dashboard/ shows the orange XAMPP welcome page.
  • PHP: http://localhost/myproject/ prints your PHP version.
  • MySQL: http://localhost/phpmyadmin/ logs in and lists your databases.
  • Services: open services.msc and confirm Apache2.4 and mysql are set to Automatic and Running.

Common issues & fixes

Apache will not start — port 80 in use

Symptom: "Port 80 in use by Unable to open process". Run netstat -ano | findstr :80 in an admin terminal to find the PID, then kill it with taskkill /PID <pid> /F. If IIS is the culprit, disable it permanently: open Services, find World Wide Web Publishing Service, set Startup type to Disabled, and stop it.

phpMyAdmin says "Access denied" after setting the password

You changed the root password but phpMyAdmin still tries the old (blank) one. Edit C:\xampp\phpMyAdmin\config.inc.php and put the new password in the $cfg['Servers'][$i]['password'] line exactly as shown in Step 6, then reload the page.

MySQL shuts down unexpectedly

Usually another MySQL/MariaDB instance holds port 3306. Uninstall or disable the other instance, or in the Control Panel click Config → my.ini and change port=3306 to port=3307, then restart MySQL.

Antivirus quarantines xampp files

Some antivirus tools flag mysqld.exe or httpd.exe as suspicious. Add C:\xampp to your antivirus exclusion list and reinstall if files were deleted.

"Access forbidden" on a new project folder

Windows folder permissions on a manually created subfolder can block Apache. Right-click the folder → Properties → Security, and grant Read to the Everyone group (local development only).


Conclusion

You now have a complete local LAMP-style stack on Windows 11: Apache serving PHP apps from C:\xampp\htdocs, MySQL running as a service with a secured root password, and phpMyAdmin for database management. This setup is ideal for learning PHP, building WordPress themes, or prototyping client projects offline. Remember that XAMPP defaults are development-only — before exposing anything to the internet, harden it properly. If your team needs production-grade server setup, hardening, or migration help, XpertBees handles Linux and Windows server work end to end.