My need is to change the default sites directory of wamp from say "c:\wamp\www" to say "d:\sites". Right now my projects in "d:\sites" do not show in the project list:
I found a few past answers like this one and this one which I think are not applicable to WampServer 2.5 (anyway, it did not work for me).
I also found this procedure in the documentation, but it seems far too complex for what I need.
Any help on this matter would be appreciated.
The thing you wanna do is little bit tricky.To do the thing you want just follow following steps:
1 Open file
C:\wamp\bin\apache\Apache*.*.*\conf\httpd.conf
2 Find following lines :
3 Modify them to change your root directory
/*In my case i want my "C:\" drive as root*/
so i do this :4 Now go to
c:\wamp\www
findindex.php
and copy it,and pest into your new root/*In my case i want my "C:\" drive as root*/
5 Now open that
index.php
and find the following lines:6 Now just modify them relative to your root
/*In my case i want my "C:\" drive as root*/
so i write:Now it will show the default wamp opening page which is shown in the picture!
Edit the path in below file then restart wamp server C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
Go to apache httpd
C:\wamp\bin\apache\apache2.2.22\conf
Open httpd
Find DocumentRoot in that file
Change the path
Find the directory tag
Change to Allow from all from Deny from all in Directory tag
Save & exit
Restart wamp services
In newer version of wamp, changing DocumentRoot in httpd.conf did not change DOCUMENT_ROOT. Even after restarting, it stayed as "c:/wamp64/www/".
Instead, the DocumentRoot is set in this file:
To change the localhost directory, change these to your path: