17 Oct 2017
wamp server

How to add custom Virtual Hosts to WAMP

(Refers to WAMPSERVER 3.0.6 64-bit)

If you’re developing a site in WordPress or similar on your local machine and want to run your site from //customsitename instead of //localhost in WAMP every time you test, or even have a bunch of virtual hosts like //sitename1 //sitename2 etc, here’s how to do set them all up:

Open wamp64/bin/apache/apachex.x.xx/conf/extra/http-vhosts.conf and make a duplicate of the Virtual host entry for your localhost, paste it below localhost’s and change the ServerName, DocumentRoot and Directory to your own names and locations. DO NOT replace localhost, copy and paste it below. Change the names like for example:

<VirtualHost *:80>
ServerName yoursitename
DocumentRoot C:/wamp64/www/yourfolder
<Directory  "C:/wamp64/www/yourfolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All Require local


Then, open C:\Windows\System32\drivers\etc\hosts in administrator mode and below: localhost
::1 localhost

add yoursitename
::1 yoursitename

Save and restart WAMP. Go to your localhost page and you will see it show up as a clickable virtual host.

Leave a Comment