How to install and configure WAMP Part 3

Finally, everything is installed and working! Now it’s time to start using WAMP and making use of some of it’s advanced features.

By default, all you have to do is place your website in the www folder and away you go. I have just created a folder in C:\wamp64\www called testsite. Inside testsite I have created a file called index.html

I simply typed <h1>Hello World!</h1> into the file so we can see WAMP working.

Enter http://localhost/testsite/ into the address bar of a web browser and you should see the page shown below.

This works but it’s not very user friendly. There is a much better way of doing this, WAMP uses something called Virtual Hosts and it allows you to use domain names for your projects. So, instead of typing out http://localhost/testsite/ you can use something like testsite.test. It’s best to use extensions that are not used out on the real internet and .test is ideal. So how do we make that work?

If you left click on the “W” icon in the taskbar and hover over “Your VirtualHosts” you will see something like the image above. Click on “VirtualHost Management”.

I have filled out the form above. The firstbox is the name of the site or the web address. In this case when I type testsite.test into a browser it will open the web page. The next line is the path on your computer to the folder that holds the website. This path can be anywhere on your computer, for example, in your documents folder. Although it is recommended that WAMP itself is installed in the root of the C drive, your web files can be anywhere. This is a very useful feature of Virtual Hosts.

After you click on the “Start the creation of the VirtualHost” button you will see the screen above. It tells you that you need to Restart DNS for this to work. Right click on the “W” icon in the taskbar and hover over “Tools”, then go to the top and click on “Restart DNS”. This may take a minute or so, having said that, it may take a lot less depending on your machine. Once done you can type testsite.test into a browser and you site will open.

 

 

One thought on “How to install and configure WAMP Part 3”

Leave a Reply

Your email address will not be published. Required fields are marked *