Comandos, herramientas y utilidades internas de Windows

XAMPP Errors in 2026: Why Apache & MySQL Won’t Start (Real Fixes)

XAMPP is one of those tools that works flawlessly until it doesn’t. And when it breaks, it usually breaks hard: Apache won’t start, MySQL shuts down unexpectedly, and your whole local development environment goes to hell. In 2026 this is still happening on Windows 11, and most of the time the culprit is embarrassingly simple.

I’ve spent years dealing with XAMPP errors in real projects, and I’ll tell you straight: 90% of the cases are port conflicts, missing admin permissions, or a config file someone (maybe you) touched without knowing what they were doing.

Port 80 and 443: The Usual Suspects Behind XAMPP Apache Not Starting

Apache isn’t picky. It just wants port 80. The problem is that on Windows, port 80 is a free-for-all. IIS, Skype, some random Windows service, World Wide Web Publishing Service… they all want a piece of it.

When you see the classic «Port 80 in use by PID 4″ in the XAMPP control panel, you already know: another process got there first. The same thing happens with port 443 for HTTPS and port 3306 for MySQL.

Before touching anything, open CMD as administrator and run:

netstat -ano | findstr :80

That gives you the PID hogging the port. Then match it in Task Manager. Nine times out of ten it’s IIS or the Windows Web Deployment service. If you don’t need IIS, disable it from «Turn Windows features on or off.» Done.

How to Change Apache’s Port in XAMPP Without Breaking Anything

If you can’t (or don’t want to) free port 80, change Apache’s port. It’s a two-minute fix, but people screw it up constantly because they only edit half the file.

  1. Open xampp/apache/conf/httpd.conf
  2. Find the line Listen 80 and change it to Listen 8080
  3. Find ServerName localhost:80 and change it to ServerName localhost:8080
  4. Save and restart Apache from the XAMPP control panel

Now access your projects via http://localhost:8080. If you forget this last part, you’ll think Apache is broken when it’s actually running fine.

For HTTPS, the file is different: xampp/apache/conf/extra/httpd-ssl.conf. Change Listen 443 to Listen 8443 there, otherwise you’ll still hit the «port 443 already in use» error.

MySQL Shutdown Unexpectedly: The Error That Ruins Your Day

«MySQL shutdown unexpectedly» with XAMPP on Windows is a classic. And no, it’s almost never because MySQL is broken. It’s usually one of these three things:

  • Port 3306 occupied by another MySQL instance (yes, you can have more than one installed)
  • Corrupted InnoDB tables after an abrupt shutdown
  • Antivirus or firewall blocking mysqld.exe

First, check xampp/mysql/data/mysql_error.log. Everything is there. If it says something about InnoDB not being able to recover, the fix is annoying but effective: go to xampp/mysql/data, rename the ibdata1 file and the ib_logfile* files, and copy them back from xampp/mysql/backup if you have it. Then restart.

If the error points to a specific database, delete the ibdata1 in that database folder only. You lose that DB, but the rest survives.

Real talk: if you don’t have backups of your local databases, start making them. XAMPP isn’t a production environment, but losing three weeks of work because you didn’t export a .sql file hurts the same.

Administrator Permissions and UAC: The Silent Killer

XAMPP needs admin rights to bind to ports below 1024 and to write to certain folders. If you’re launching it as a normal user, some services will silently fail.

Right-click the XAMPP control panel and run it as administrator. Every single time. If you’re tired of doing that, set it in the shortcut properties under «Advanced» > «Run as administrator.»

About disabling UAC: I don’t recommend it. It’s a security hole, and in Windows 11 24H2 it can cause more problems than it solves. Better to just run XAMPP with elevated permissions and leave UAC alone.

PHP Version Changes and Broken Extensions

Swapping PHP versions in XAMPP isn’t as simple as dropping a new folder in. If you downloaded PHP 8.3 or 8.4 and replaced the php directory, you probably broke extensions that were compiled for the old version.

Check xampp/php/php.ini and make sure the extension lines match what that PHP version actually ships. If Apache won’t start after the swap, the log will say something like «Unable to load dynamic library.» That’s your clue.

My advice: don’t mix versions. If you need PHP 8.4, install a fresh XAMPP build that ships with it, or use Docker. Seriously, Docker solves 80% of these headaches.

Upload Limits, Memory, and the php.ini Tweaks You Actually Need

If you’re hitting «file too large» errors when uploading through WordPress or Laravel, it’s not XAMPP’s fault, it’s PHP’s default limits. Open xampp/php/php.ini and adjust:

  • upload_max_filesize = 128M
  • post_max_size = 128M
  • memory_limit = 512M
  • max_execution_time = 300

Restart Apache. If the values don’t apply, you’re editing the wrong php.ini. Yes, this happens more than you’d think. Check phpinfo() to see which file XAMPP is actually loading.

When Nothing Works: Logs, Reinstall, or Move On

If you’ve checked ports, permissions, config files, and logs, and XAMPP still refuses to cooperate, you have two options: clean reinstall or switch tools.

Before reinstalling, export your databases and copy your htdocs folder. Then uninstall XAMPP, delete the leftover folder, and install a fresh copy. If the problem persists on a clean install, it’s Windows, not XAMPP. Check for third-party security software, VPN clients, or Windows services that grab ports on startup.

And honestly? If you’re doing serious development in 2026, look at Laragon, LocalWP, or Docker Desktop. XAMPP is fine for learning and quick tests, but it was never designed for complex, modern stacks. Knowing when to move on is part of being a good developer.