Look, XAMPP is a damn good tool for local development, but it’s also one of the most frustrating pieces of software you’ll ever install. You fire it up, click Start on Apache, and… nothing. Or MySQL crashes two seconds later.
If you’re dealing with XAMPP errors that halt your development, you’re not alone, and most of the time it’s your own fault, not XAMPP’s.
I’ve broken XAMPP more times than I care to admit. Port conflicts, corrupted InnoDB files, half-installed services, Windows deciding that port 80 belongs to IIS now.
After years of this, I can tell you the real reasons behind the most common XAMPP Apache and MySQL startup errors and how to actually fix them instead of reinstalling the whole thing like a chump.
Why XAMPP Won’t Start on Windows (The Real Culprits)
Nine times out of ten, XAMPP refuses to start because something else grabbed port 80 or 443 before Apache could. On Windows, that something is usually IIS, Skype (yes, still), VMware, or the World Wide Web Publishing Service running silently in the background.
The other big one: you’re not running XAMPP as administrator. Apache and MySQL need elevated permissions to bind to low ports and write to their log folders.
If you launch xampp-control.exe by double-clicking without admin rights, services will silently fail. Right-click → Run as administrator. Every single time.
One more thing people ignore: antivirus. Windows Defender, Avast, and even some corporate firewalls block Apache’s httpd.exe from listening. If your XAMPP Apache service won’t start and logs show nothing useful, temporarily disable the firewall and test again.
How to Check If Port 80, 443, or 3306 Is Already Taken
Before you touch any config file, run this in an elevated Command Prompt:
netstat -ano | findstr :80
Do the same for :443 and :3306. You’ll get a PID number at the end. Match it in Task Manager (Details tab) and you’ll see exactly which process is stealing your port. Kill it or configure XAMPP to use something else.
For a full list of everything listening, just run netstat -ano alone. It’s ugly but it tells you the truth.
Changing Apache’s Port the Right Way (httpd.conf)
Open xampp/apache/conf/httpd.conf and find these two lines:
- Listen 80 → change to Listen 8080
- ServerName localhost:80 → change to ServerName localhost:8080
Save, restart Apache. If you use virtual hosts, don’t forget to update httpd-vhosts.conf too, because that’s where half the “why does my local site redirect to the wrong port” complaints come from.
For HTTPS, edit xampp/apache/conf/extra/httpd-ssl.conf and change Listen 443 to something like Listen 8443. Otherwise you’ll keep getting the classic port 443 already in use error every time you start Apache.
MySQL Shutdown Unexpectedly: The InnoDB Nightmare
This is the one that makes people cry. You see MySQL shutdown unexpectedly in the XAMPP control panel, and MySQL refuses to restart no matter what. Behind the scenes, InnoDB has a corrupted redo log, usually after a hard shutdown or a Windows crash.
Here’s the fix that actually works, and it’s not just “restart the service”:
- Stop MySQL if it’s running.
- Go to xampp/mysql/data.
- Rename ibdata1 to ibdata1_old.
- Do the same with ib_logfile0 and ib_logfile1.
- Copy fresh ibdata1 and ib_logfile files from xampp/mysql/backup (XAMPP ships them there).
- Start MySQL again.
You’ll lose data if your databases weren’t backed up, so yes, this hurts. But it’s the only reliable way to recover a broken XAMPP MySQL installation without reinstalling everything.
Also check xampp/mysql/data/mysql_error.log. It tells you exactly which file is corrupted instead of making you guess.
PHP Settings in XAMPP: Upload Limits and php.ini
If your WordPress or Laravel app throws a “file too large” error, it’s not your code. Open xampp/php/php.ini and adjust these:
- upload_max_filesize = 64M
- post_max_size = 64M
- max_execution_time = 300
- memory_limit = 256M
Restart Apache after saving. People forget that php.ini changes don’t apply until Apache reloads, and then they wonder why their XAMPP PHP configuration isn’t working.
Switching PHP Versions Without Breaking Everything
XAMPP ships with one PHP version, but you can swap it. Download the version you need from the official PHP Windows builds page (windows.php.net/download), then replace the php folder inside your XAMPP directory.
Critical step everyone skips: copy your php.ini from the old folder to the new one, and re-enable the extensions you need (curl, openssl, mbstring, pdo_mysql). Otherwise Apache loads PHP but nothing works because half the modules are missing.
UAC, Permissions, and the “Apache Is Not Started” Message
Windows User Account Control is a bigger problem than most tutorials admit. XAMPP’s control panel shows “Apache is not started” even when the process is technically running, just because Windows blocked the service registration.
You’ve got two options:
- Install Apache and MySQL as services from the XAMPP control panel (with admin rights) so they start automatically.
- Lower UAC to “Never notify” in Control Panel → User Accounts. It’s aggressive and I don’t love recommending it, but for a local dev machine it’s a valid trade-off.
What I’d actually recommend: keep UAC on, but always launch XAMPP as admin and install the services properly. You get stability without gutting your security.
The Errors That Mean You Should Just Reinstall
Sometimes the smartest move is nuking the installation. If Apache logs show missing DLLs (like VCRUNTIME140.dll or api-ms-win-crt errors), your Visual C++ Redistributable is broken or outdated. Reinstall both the x86 and x64 versions from Microsoft. Reinstalling XAMPP without fixing that won’t help.
Same story if my.ini is corrupted and MySQL never starts: back up your databases folder, uninstall XAMPP cleanly, remove leftover folders in C:xampp, and start fresh. Half-fixed installations create more bugs than they solve.
And if you’re on a 64-bit system, make sure you didn’t accidentally install the 32-bit XAMPP. It runs, but MySQL memory allocation errors become routine, and you’ll waste hours chasing a problem that’s just the wrong installer.
Stop Fighting XAMPP, Start Understanding It
The pattern behind almost every XAMPP error is the same: something else owns the port, permissions are missing, or a config file got edited wrong. Fix those three things and 90% of your startup failures disappear.
Don’t reinstall blindly. Don’t disable every security feature on your machine. Read the logs in xampp/apache/logs and xampp/mysql/data, check your ports with netstat, and run as admin. That’s the whole game.
If you’re running XAMPP in 2026 and it’s still breaking on you, the tool isn’t the problem. Your setup is. Fix the setup.