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:
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All Require local
Then, open C:\Windows\System32\drivers\etc\hosts in administrator mode and below:
Save and restart WAMP. Go to your localhost page and you will see it show up as a clickable virtual host.