I have installed XAMPP in C drive on my windows. Today I thought I will move my installation to another directory.
After searching the web for couple of minutes, I got a solution that worked perfectly. Here are the steps you have to follow.
- Open the file httpd.conf from the location C:/xampp/apache/conf
- Search for DocumentRoot and you will get something like this
DocumentRoot “C:/xampp/htdocs”
- Update the DocumentRoot to new location. For example, if you want to
update the DocumentRoot to D:/www , then you will have the following
line after updating the location
DocumentRoot “D:/www”
- Then find the Directory and you will fine something similar to
<Directory “C:/xampp/htdocs”>
- Update it to new location like this
<Directory “D:/www”>
- Then finally restart the Apache server using XAMPP control panel or manually.
That’s it, you are done. The DocumentRoot has been moved to new place successfully.