How to Change the Apache Port in WampServer (Port 80 Conflict Fix)
WampServer uses Apache, which listens on port 80 by default, and so does a surprising amount of other Windows software. When IIS, Skype, or another local tool claims port 80 first, WampServer cannot start Apache, your icon stays orange, and none of your local sites load. Changing the Apache port to a free alternative such as 8080 is the clean, permanent fix, and it takes only a few minutes.
This change is the direct solution behind many cases covered in our guide to fix the WampServer orange and red icon, so work through it carefully if that is your symptom. After changing the port, remember that your project addresses change too, which matters when you create a virtual host in WampServer for cleaner local domain names.
Why Change the Apache Port in WampServer?
A port is a numbered channel a program uses to send and receive data. Only one program can listen on a port at a time, and port 80 is the standard web port, so many programs compete for it.
Changing Apache to 8080 does not slow your sites, change PHP or MySQL, or affect files in C:\wamp64\www. The only difference is the browser address: http://localhost:8080/myproject/ instead of http://localhost/myproject/.
How to Check If Port 80 Is Already in Use
Step 1: Use the Built-In Port Test
Left-click the WampServer tray icon, hover over Apache, then Service administration, and click Test Port 80. WampServer checks the port and reports the result in a small window.
Step 2: Read the Result
If port 80 is free, your problem lies elsewhere. If another program owns it, the message names it; common owners are IIS, Skype, and virtual machine software. Then changing the Apache port is the right move.
How to Change the Apache Port in WampServer: Step-by-Step
WampServer gives you two methods. The tray menu method is safer because it edits the right files for you.### Method 1: Change the Port From the Tray Menu
- Start WampServer and left-click the tray icon.
- Hover over Apache and look for the option to change the port, labelled with the current port, such as Use a port other than 80.
- Click it and enter
8080in the dialog box. - Confirm, then wait while WampServer updates its configuration and restarts Apache.
- Watch the tray icon and confirm it turns green.
WampServer updates the Listen setting and its own internal references together, which is why this method causes fewer mistakes.
Method 2: Edit httpd.conf Manually
- Left-click the tray icon, hover over Apache, and click httpd.conf to open the main configuration file.
- Find the line that reads
Listen 0.0.0.0:80and a similar line forListen [::0]:80if present. - Change
80to8080in those Listen lines. - Also find
ServerName localhost:80and change it toServerName localhost:8080. - Save the file, then left-click the tray icon and choose Restart All Services.
Do not change every 80 in the file. Only the Listen and ServerName lines control the port; bulk replacements can break other settings.
How to Update Virtual Hosts and Project URLs
If you use virtual hosts, each host definition includes the port, so those files need the same update.
| Item to Update | Before | After |
|---|---|---|
| Browser address | http://localhost/myproject/ | http://localhost:8080/myproject/ |
| Virtual host tag | <VirtualHost *:80> | <VirtualHost *:8080> |
| ServerName line in httpd.conf | localhost:80 | localhost:8080 |
| WordPress site URL, if set manually | http://localhost/myproject | http://localhost:8080/myproject |
Open httpd-vhosts.conf in the Apache configuration folder and update each <VirtualHost *:80> tag, then restart all services. For WordPress, also check a manually set site address in wp-config.php or the database, because a mismatch causes redirect loops.
How to Verify the New Apache Port Works
Step 1: Check the Tray Icon and Test the Port
After restarting, confirm the tray icon is green and Apache is listening on the new port.
Step 2: Open Your Sites With the New Address
Type http://localhost:8080/ in your browser. The WampServer homepage should list your projects from C:\wamp64\www. Open a project and a database-driven page such as a WordPress login screen, and check phpMyAdmin at http://localhost:8080/phpmyadmin/.
Step 3: Bookmark the New Addresses
Update your bookmarks, project notes, and any shortcuts that point to the old address without the port number. Most repeat confusion after a port change comes from an old bookmark, not from the server itself.
Common Mistakes When Changing the Apache Port
First, forgetting :8080 in the browser address: without it, the browser still tries port 80. Second, changing WampServer but not virtual host files, which breaks custom local domains. Third, choosing a new port that is also busy; try 8888 if 8080 fails. Finally, avoid ports below 1024, which are reserved for system services.
For background reading on how numbered network ports work, the explanation of a port in computer networking covers why two programs cannot share one port at the same time.
FAQ
What is the best alternative port for Apache in WampServer?
Port 8080 is the most common and safest choice, because it is widely used for alternate web servers and rarely conflicts with Windows services. Port 8888 is a good second option if 8080 is also taken.
Do I need to change the MySQL port too?
No. A port 80 conflict only affects Apache. MySQL uses its own separate port, 3306 by default, and changing Apache has no effect on your databases or phpMyAdmin connections.
Will changing the port break my WordPress site?
Your files and database stay untouched. You may only need to update the site address if it was set manually, and use the new address with :8080 in the browser. Most local WordPress installs adjust automatically when you visit the new address.
Can I change the Apache port back to 80 later?
Yes. Repeat the same tray menu or httpd.conf steps and set the port back to 80, update any virtual hosts, and restart all services. Only do this after the program that caused the original conflict is removed or reconfigured.
Conclusion
Changing the Apache port in WampServer from 80 to 8080 ends the most common local server conflict for good. Test port 80 first to confirm the clash, make the change from the tray menu where possible, update your virtual hosts and bookmarks, and verify everything at the new localhost:8080 address. Your projects, databases, and workflow stay exactly the same, just on a port that is finally free.