I like to keep all programs and data on separate physical drives, however XAMPP creates the default root folder (htdocs) on the C: alongside all the other program files. Over time it’s easy to accumulate a lot of data in this folder so it makes sense to keep it with the rest of your data files. Here’s a quick tip for changing it’s location.
First navigate to:
c: > xampp > apache > conf > httpd.conf
…and load the httpd.conf file in your favourite text editor. In the file search for ‘htdocs’:
You should see that path to htdocs listed next to DocumentRoot as listed below. Simply copy and paste your htdocs folder (and rename if you like) then update the the highlighted lines to reflect it’s location:
Save the httpd.conf file and restart apache to ensure the changes are loaded:
Categorised in: Web Development
This post was written by WillyNilly