Changing WAMP port

It took me a while searching the web to find this so I’ll just post it here.
First thing you’d want to do is edit the httpd.conf,
which you can find here:

C:wampbinapacheApache2.2.17conf

In this file you should search for 2 occurrences of “80″

Listen 80
and
ServerName localhost:80

Change the port to the desired port number. You should now be able to navigate to http://localhost:8888/ or whatever port you chose.

If you use the wamp server icon to navigate to the localhost you will see it won’t find it. You have to manually fill in the new port number. To fix that do the following.

 

Got to the root of your wamp server “C:wamp” in my case, Open the file named “wampmanager.tpl”.

In this file search for “http://localhost/” and add the new port number.

I found mine under “[Menu.Left]” around line 120

Type: item; Caption: “${w_localhost}”; Action: run; FileName: “${c_navigator}”; Parameters: “http://localhost:8888/”; Glyph: 5
Type: item; Caption: “${w_phpmyadmin}”; Action: run; FileName: “${c_navigator}”; Parameters: “http://localhost:8888/phpmyadmin/”; Glyph: 5

As you can see I changed my port number to 8888.

Save it and restart wampserver.

Now if you try to open the localhost through wampserver it should automatically open at the new port

Hope this helps, otherwise just ask ;)

  • http://twitter.com/bmtyson Brian Tyson

    Thanks! Looked forever on where to change this setting, and you had it.