Home » Php » php – How to Change the www root directory on WampServer 3

php – How to Change the www root directory on WampServer 3

Posted by: admin July 12, 2020 Leave a comment

Questions:

How can i change the root directory of the currently installed wampserver to some other directory.
I have change directory location from httpd.conf
like.
I am using Hash tag before Dcoument root, and Directory but for new root i have new line without hash tag.

#DocumentRoot "c:/wamp64/www"
DocumentRoot "G:/04-WebSites/NEW_WORK"
#<Directory "c:/wamp64/www/">
<Directory "G:/04-WebSites/NEW_WORK/">

C:\wamp64\bin\apache\apache2.4.18\conf\httpd.conf

after many time restart server, pc, wamp server still showing www/index page.

index page is shown

How to&Answers:

You need to change these values also in httpd-vhosts.conf located in \conf\extra

Answer:

  1. Open wampserver 3 .
  2. Select the Apache menu -> httpd-vhosts.conf.
  3. Change the DocumentRoot path –> “${INSTALL_DIR}/www” to your folder location e.g. “E:/www”
  4. Restart the Wampserver
  5. Done.

For detail blog go here : https://phantomthemes.com/how-to-change-the-www-root-directory-on-wampserver-3/

let me know if it doesn’t work