Apache Won’t Start in XAMPP? Here’s a Simple Fix

Apache Shutdown Unexpectedly Error
If you’re using XAMPP, you’ve probably bumped into this annoying message: “Apache Shutdown Unexpectedly.” Basically, Apache just crashes or stops right after you try to start it. It’s frustrating, but the good news is, it usually happens because of a few common issues like port conflicts, missing files, or permission problems.
In this post, I’ll show you how I fixed it on both Windows and Mac, step-by-step.
Fixing the “Apache Shutdown Unexpectedly” Error on Windows
If you’re on Windows and Apache won’t start, it’s often because something else is using port 80 or 443, or some needed files are missing. Sometimes, apps like Skype or other web servers take those ports without you realizing it. It can also be caused by missing system files or permission issues. Here’s how I fixed it step-by-step:
1. Change the Apache Ports
Open your XAMPP Control Panel.
Click “Config” next to Apache, then open httpd.conf.
Find all instances of port 80 and change them to 8080.
Also, update
Listen 80
toListen 8080
andServerName localhost:80
toServerName localhost:8080
.Save and close the file.
2. Update SSL Port
Back in the XAMPP Control Panel, open http-ssl.conf from Apache’s Config menu.
Change port 443 to 4433 in the same way.
Save and close.
3. Check Missing Dependencies
Look at the error logs for messages about missing DLLs like
vcruntime140.dll
.If missing, download and install the latest Microsoft Visual C++ Redistributable for your system.
4. Run XAMPP as Administrator
Right-click your XAMPP Control Panel shortcut and choose “Run as administrator” to avoid permission issues.
5. Restart Apache
Stop and start Apache from the control panel.
That should get Apache back online on Windows.
Fixing the “Apache Shutdown Unexpectedly” Error on Mac
If you’re using a Mac, this error usually comes from the same stuff: port conflicts or config problems. Here’s what I did:
Open the XAMPP Application Manager from your Applications folder.
Go to the Manage Servers tab and select Apache Web Server.
Click Configure, then open the httpd.conf file.
Find where it says
Listen 80
and change it toListen 8080
.Save the file and close it.
Go back to the Manage Servers tab, stop Apache if it’s running, then start it again.
That usually does the trick on macOS.
Extra Tips and Troubleshooting
If you’re still stuck, here are a few more things to check:
Make sure only one XAMPP instance is running. Having multiple instances open can cause conflicts.
Check if other apps are using port 80 or 443. On Windows, run
netstat -aon | findstr :80
in Command Prompt to see what’s using the port. On Mac, uselsof -i :80
in Terminal.Kill any processes using those ports if needed. On Windows, use Task Manager or
taskkill /PID [PID] /F
. On Mac, usekill -9 [PID]
.Verify XAMPP has admin rights to access necessary files and ports.
Look at Apache error logs for clues. They’re usually in
xampp/apache/logs/error.log
.
Try these steps, and you should get Apache back up.
Final Thoughts
Apache shutting down unexpectedly in XAMPP can be a pain, but it’s usually fixable with a few tweaks. Changing ports, checking for missing files, and making sure you run XAMPP with admin rights usually does the trick.
If you keep running into issues, check the error logs. They’re your best friend for troubleshooting. And remember, this happens to almost everyone using XAMPP at some point, so you’re not alone.
Hopefully, this guide helped you get your local server back up and running fast.
Enjoyed this article? Explore the blog for more.
Alex David Du
Hi, I’m Alex. I’m 28, born in Brazil, studied computer science, and writing is how I communicate best. I cover gaming, tech, simple ways to make money online, and other things I find interesting. I also love coding and building projects that bring ideas to life.
Languages: Portuguese, English, Spanish
Work Mode: Freelancer - Remote
Country: Brazil