Change location of htdocs in XAMPP

September 16, 2015 11:10 pm
Published by
Leave your thoughts

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
locate-httpd …and load the httpd.conf file in your favourite text editor. In the file search for ‘htdocs’: seaarch-htdocs-text 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: update-htdocs-paths Save the httpd.conf file and restart apache to ensure the changes are loaded: restart-xampp

Categorised in:

This post was written by WillyNilly

Leave a Reply

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