How to Create a Project or Virtual Host with WAMP

The release of WampServer 2.5 greatly improved the virtual server’s speed which was already fast to begin with. Also, with the new process of creating Projects or Virtual Hosts, you can now have URLs like http://mytest instead of the old http://localhost/mytest which is a great improvement especially for users like me who play with WordPress Plugins.

  • Step 1

    Once you get WampServer or WAMP installed, go to the installation folder then locate the www folder. This is where all your virtual website’s file are going to be stored. Inside the www folder create a new folder. Name it anyway you want. In the example below we’ll use the name wp-one.

  • Step 2

    Make sure WAMP is running then right-click its icon on the Taskbar then go to Apache then open httpd.conf (OR) you could also manually open that file on this location: /wamp/bin/apache/apachexxx/conf/httpd.conf

    Once the file is open in your text editor, find this line:

    # Include conf/extra/httpd-vhosts.conf

    then change it to this:

    Include conf/extra/httpd-vhosts.conf

    You simply remove the # sign thereby uncommenting it. You’ll only do this step once.

  • Step 3

    Locate and open another file:

    Then add this code at the bottom:

    <VirtualHost *:80>
       DocumentRoot "d:/wamp/www/wp-one"
       ServerName wp-one
       <Directory "d:/wamp/www/wp-one">
          AllowOverride All
          Require local

    Note: d:/wamp/www/wp-one is the path to the folder we created on Step 1.

  • Step 4

    Open your Windows Host file with your text editor.
    Add these two lines: wp-one
    ::1 wp-one

  • Step 5

    Restart WAMP Server so that it could pick up the changes. You can now check your new Project website on your browser. http://wp-one/

To add another Project or Virtual Host repeat the steps above except for Step 2.

Share This Post


Add a Comment
  1. I want to do several projects in wordpress. Will I have to do new databases?
    Thank you

    1. Yes. One for each of your projects.

  2. I’m at Step 4 and added the lines in but it does not allow me to save the changes citing that I do not have permission to do so. And now, I couldn’t even launch the localhost to view the projects. Please advice. Thank you

    1. Run notepad.exe as administrator then open the host file. You should be able to save the changes.

  3. It’s a good lesson。I get it ,thank you!

  4. This tutorial teaches how to add another virtual host, not how to create a new project , as adding new project to the wamp server is simply done by creating a new folder in {installationPath}/www folder. I wish you warned this before i **** up my wamp server configurations

  5. I can’t get relative paths to image files working. By relative paths I mean src=”/wp-content/uploads/picture.jpg” Absolute paths work but that would mean manual editing of paths after uploading the site to a production server. Even if I create a virtual host for each project I just get a square “broken” symbol on the page. What am I doing wrong?

Leave a Reply

Please write your comments in english. I delete anything that even remotely resembles spam.

Note: When posting code, enclose it in pre and code tags.
e.g. Add code here