How to change port number in wampserver

Sometimes developer comes in a situation where they have to work with Apache along with IIS. so to run Apache along with IIS in wamp server following are the steps for changing the port number in wamp server.

Step-1 : Open the http.conf file of the Apache server. The location of the file will be C:wampbinapacheapache[version]confhttpd.conf. Search “Listen 80″ and Server Name in the file change them to “Listen [Port number you want to use]” and ServerName to localhost:[Port number] . Save changes and close the file.

wamp

Step-2 : Open the wampmanager.tpl file of wamp server. The file will be located at C:wampwampmanager.tpl. Search “http://localhost/” and replace it with “http://localhost:[portnumber]/” (Total 3 Replacement). Also change “${w_testPort80}” to “${w_testPort[portnumber]}”. save the changes and close the file.

Wamp_1

Step-3 : Open the testPort.php file which is located at C:wampscriptstestPort.php . Search for “80” and replace it with “[Portnumber]” (There will be total 3 replacement). save the changes and close the file.

wamp_test

Step-4 : Open the english.lang file which is located at C:wamplangenglish.lang . In this file change “$w_testPort80 = ‘Test Port 80″;” to “$w_testPort[Portnumber] = “Test Port [portnumber]”;. Save the changes and close the file.

After completing all these changes. Restart your wampserver and now your wampserver will be running on the desired port number.

Rajat Jain
Rajat Jain

Latest posts by Rajat Jain (see all)

2 Comments
  1. Calvin Knight
    • admin

Leave a Reply