How to Change the WWW Root Directory on Wampserver 3

September 4, 2018| PhantomThemes Editorial

Yes, we all want to save our files and documentation from system crash of C Drive. To avoid this issue we generally locate our “WWW” or “htdocs” directory in different location from the default installation directory i.e. C Drive.

So it’s very easy to change the “WWW” directory in latest WampServer 3 that comes with PHP 5.6 , 7.x , MySQL as well as MariaDB.

  1.  Click on WampServer icon in right side bottom taskbar
  2. Select the Apache menu  -> httpd-vhosts.conf from the Pullup menu box.
  3. Search (CTRL + F)for the term “DocumentRoot”
  4. Change the DocumentRoot path
    DocumentRoot "${INSTALL_DIR}/www"
    <Directory "${INSTALL_DIR}/www/">

    to your custom directory e.g.

    DocumentRoot "E:/www"
    <Directory "E:/www/">
  5. Save your changes and “Restart All Services”

When you browse to http://localhost, before the directory change the localhost window looks like this one.

And after the change for directory the localhost window looks like this one.

Categories: Tips and Tricks

Leave a Reply

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