You double-click the XAMPP icon, hit «Start» on Apache, and… nothing. Red text. Same story with MySQL. If you’re stuck asking yourself why XAMPP won’t start MySQL or Apache, take a breath. Nine times out of ten it’s a port conflict or a service eating your sockets, and it’s fixable in under five minutes. I’ve broken XAMPP more times than I care to admit, so here’s the no-BS playbook.
Why won’t Apache start in XAMPP? The port 80 problem
Apache dies silently because something else already owns port 80. On Windows the usual suspects are IIS (World Wide Web Publishing Service), Skype, VMware’s «VMware Workstation Server», and even Docker Desktop if you installed it for something else.
The fastest way to confirm it: in the XAMPP Control Panel click Netstat, or open CMD as admin and run netstat -ano | findstr :80. If you see a PID, that’s your thief. Kill it or move Apache.
Fix it by changing Apache’s port
Open the XAMPP Control Panel as administrator, click Config next to Apache, and open httpd.conf. Change:
- Listen 80 → Listen 8080
- ServerName localhost:80 → ServerName localhost:8080
Save, restart Apache, and load http://localhost:8080. Done. Remember to update any WordPress site URL or vhost that hardcodes port 80, otherwise you’ll get redirect loops. Also check httpd-ssl.conf if you use HTTPS locally — port 443 has the same problem.
Don’t just blindly change the port. First figure out what’s holding port 80, because if it’s IIS you can just stop that service and keep Apache on the standard port. Cleaner.
Why won’t MySQL start in XAMPP? Port 3306 and corrupted data
MySQL in XAMPP usually fails for two reasons: another MySQL instance is already running, or the data folder got corrupted after a hard shutdown.
Case 1: Port 3306 already in use
If you have MySQL Workbench installed standalone, or WAMP, or a Docker MySQL container, they’ll grab port 3306 first. In the XAMPP panel, click Config next to MySQL, open my.ini, and change:
- port=3306 → port=3307
Restart the service. Then update your PHP connections from localhost:3306 to localhost:3307, or your WordPress wp-config.php if that’s what you’re running. This alone fixes the MySQL won't start in XAMPP error for most people.
Case 2: Corrupted InnoDB tables
You killed XAMPP with Task Manager one too many times. Now MySQL refuses to boot with an InnoDB error in the log. Fix:
- Shut down XAMPP completely.
- Go to xampp/mysql/data.
- Rename the affected database folder (mydb → mydb_old).
- Restart MySQL. If it boots, the corruption was isolated to that DB.
- Restore from a dump if you have one. If not, this is your lesson: schedule mysqldump backups.
Check the log at xampp/mysql/data/mysql_error.log before you rename anything. The log tells you exactly which table or file is broken — guessing wastes time.
Port 80 error in XAMPP on Windows: the IIS trap
Windows 10 and 11 sometimes activate IIS without asking, especially after enabling «Internet Information Services» for .NET development or installing Visual Studio with web workloads. Step-by-step:
- Press Windows key and type Services.
- Find World Wide Web Publishing Service.
- Right-click → Stop. Set startup type to Manual so it doesn’t come back on reboot.
- Restart Apache in XAMPP.
That’s how you free up occupied ports in Windows so XAMPP works. If the service isn’t there, check Web Deployment Agent Service and SQL Server Reporting Services too — both love port 80.
Golden rules to configure XAMPP without errors
After years of local dev headaches, this is what actually works:
- Always launch the XAMPP Control Panel as administrator. Non-admin runs fail silently on Windows.
- If you already have Apache, Nginx, or MySQL installed for other tools, change XAMPP’s ports from day one instead of fighting conflicts later.
- Keep projects outside htdocs and use virtual hosts. It makes backups and Git repos ten times easier.
- Update XAMPP only from the official source: apachefriends.org. Third-party «XAMPP full version» downloads are malware bait.
- Install Visual C++ Redistributable 2015-2022 from Microsoft. Half of the «Apache won’t start» cases on clean Windows installs are missing runtime DLLs, and the error log won’t tell you clearly.
XAMPP pros and cons in 2026
Is XAMPP still worth it? Honestly, it depends on what you’re building.
- Pros: one-click install, PHP + Apache + MySQL + phpMyAdmin in a single folder, huge community, perfect for tutorials and quick tests.
- Cons: it clashes with Windows services, it’s not meant for production, and some antivirus tools (looking at you, Avast and Kaspersky) block its executables silently.
If you’re building anything serious in 2026, look at Laragon (lighter, faster, isolated configs) or Docker with docker-compose. But for a quick WordPress test or a PHP snippet, XAMPP still does the job.
When nothing works: nuclear options
You changed ports, stopped IIS, reinstalled VC++ redistributables, and it still refuses. Try this order:
- Check Windows Firewall and your antivirus — add exceptions for xampp.exe and mysqld.exe.
- Look at xampp/apache/logs/error.log and mysql_error.log. Read them. Really.
- Uninstall XAMPP completely, delete the C:xampp folder, and reinstall from scratch.
- Switch to Laragon or MAMP. If your goal is just running PHP, fighting XAMPP for hours is a waste.
Here’s the honest take: why XAMPP won’t start MySQL or Apache almost always comes down to a port being occupied (80 or 3306), a competing Windows service, or a corrupted data folder. Fix the port, stop the conflicting service, and check the logs. If you skip the logs, you’ll keep guessing — and guessing is what makes XAMPP feel broken when it isn’t.