XAMPP - Port 80 in use by "Unable to open process" with PID 4! 12 XAMPP - Port 80 in use by "Unable to open process" with PID 4! 12 windows windows

XAMPP - Port 80 in use by "Unable to open process" with PID 4! 12


  1. Open a CMD prompt as administrator and execute the following command:

    net stop was /y
  2. Open the Run dialog box (press Win+R), then type: services.msc

    Then search for World Wide Web Publishing Service (WWW-Publishing Service) and Web Deployment Agent Service and stop them. You should also disable them.

  3. Start Apache again with XAMPP :)

Link Ref: https://www.sitepoint.com/unblock-port-80-on-windows-run-apache/


Another very easy option is to simply set Apache to listen on a different port. This can be done by clicking on the "Config" button on the same line as the "Apache" module, select the "httpd.conf" file in the dropdown, then change the "Listen 80" line to "Listen 8080". Save the file and close it.

Now it avoids Port 80 and uses Port 8080 instead without issue. The only additional thing you need to do is make sure to put localhost:8080 in the browser so the browser knows to look on Port 8080. Otherwise it defaults to Port 80 and won't find your local site.

This will also require you to restart Apache for the change to take effect.

Voila! Fixed.


In httpd.conf change the following lines and then restart the application:

  • Listen 80 to Listen 8080
  • ServerName localhost:80 to ServerName localhost:8080

When you press "Start" the application can still say that you have an error like "Port 80 in use by "Unable to open process" with PID..." but it will still work.

If the error includes "Port 443 in use by "Unable to open process" with PID..." you need to change both httpd.conf and httpd-ssl.conf.

In httpd-ssl.conf change:

  • Listen 443 to Listen 4433
  • <VirtualHost _default_:443> to <VirtualHost _default_:4433>
  • ServerName www.example.com:443 to ServerName www.example.com:4433