In a previous article, we’ve explored the issue of Apache being unable to start on macOS devices. In this article, we will be exploring the same thing, but for the Windows version of XAMPP.
What should you do if XAMPP’s Apache service does not run on your Windows machine? Read on to find out.
- The problem
- Possible causes and fixes
1. The problem
If Apache is unable to start on your XAMPP Control Panel, you will likely see the following error shown below:
When you try to start Apache Web Server, the XAMPP Control Panel will attempt to do so, but end up failing abruptly, mentioning that “Apache shutdown unexpectedly” (like the red text shown in the photo above).
Below is a transcription of the error, with the shutdown message highlighted.
[Apache] Attempting to start Apache app... [Apache] Status change detected: running [Apache] Status change detected: stopped [Apache] Error: Apache shutdown unexpectedly [Apache] This may be due to a blocked port, missing dependencies, [Apache] improper privileges, a crash, or a shutdown by another method.
2. Possible causes and fixes
If XAMPP’s Apache cannot start, it is very likely that your default HTTP port (80), is blocked or being used by another application. To fix that, you can explore the solutions below.
a. Changing the default XAMPP Apache port
To determine if port 80 being blocked is your actual problem, you can change the default port number for Apache and see if it fixes your issue.
To change XAMPP Apache’s port number, refer to the steps below:
- Click on the Config button next to the Apache Web server (refer to the image below), and select
- In the file, search for
Listen 80and change it to
- Once done, try starting Apache on XAMPP again. If the problem was due to a blocked port, Apache should now start with no problem.
Article continues after the advertisement:
Note that if you are using any other port than 80 or 443, you will have to append the port number at the end of the URL to access the page(s) on XAMPP. For example, if Apache listens to port 8080, the URL you will have to access will be
localhost:8080 instead of the default
Note that for pre-existing virtual hosts on your XAMPP Apache, you will also need to update them to listen to port 8080 instead of 80.
If XAMPP still fails to start after changing your port, that means that the problem is not caused by a blocked port. In this case, you will want to undo the changes made to
httpd.conf, so that Apache is back to using Port 80.
b. Disabling the World Wide Web Publishing Service (W3PS)
If you are running a Windows server machine, you may have a process running called the World Wide Web Publishing Service (W3PS). The W3PS is a component of Windows’ Internet Information Services (IIS) — which is responsible for providing HTTP and HTTPS services on Windows machines — may be using port 80, thereby not allowing XAMPP Apache to connect to the same port.
Below, you can read instructions on how to either deactivate or stop the W3PS service, so that port 80 can be freed up for Apache’s use.
To deactivate the W3PS service (so that it doesn’t automatically start on your Windows device):
- Open the Control Panel.
- Select View by > Large Icons, so that all the icons in the Control Panel appear. Then, select Programs and Features.
- In the Programs and Features window, click on Turn Windows features on or off.
- In the newly-opened window, expand the Internet Information Service field, and uncheck the World Wide Web Services checkbox (see the image below).
- Once done, reboot your device, then try to start XAMPP Apache again. It should be able to run on port 80 now.
To stop the W3PS service (for this current boot) on your Windows device:
- Open the Windows Service Manager by pressing Windows ⊞ + R keys, and in the popped window, type in
services.mscand press Enter.
- Search for the World Wide Publishing Service option under the Name column and open its properties by double-clicking on it.
- In the General tab, click Startup Type and switch it to manual. Now, you are able to turn on/off W3PS manually.
- Stop the service and click OK.
- Try to start the XAMPP Apache web server again.
Having read the article and applied the described solutions, we hope you could manage to fix your problems. Of course, there can be many more problems that cause this, and many with different solutions for these problems. If you are facing one of them that is not described in the article, please leave us a comment so that we can add this to the article (and credit you). Hence, your comment will help us make this article more and more helpful to everyone.
Article continues after the advertisement: