Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Bryan Elliott6,835 Points
Why exactly do we move the root directory from htdocs to a sites folder? Is this for hosting multiple sites ?
I'm not seeing the benefit of these changes just yet. Can anyone elaborate ?
Bryan, good question! I never saw any reason to leave htdocs. You can have as many sites (folders) as you want under htdocs, and it's not a problem to key in localhost:8888/sitename/
I think some folk don't like it being so far down in the directory structure: Applications > MAMP > htdocs. They'd just rather it was directly under MyDocuments or the root.
It's a matter of personal preference, but since my local dev environment is under MyDocuments, I like having the server root somewhere else.
I have no problem comiting to gitHub or posting to my remote sites.
Nate Conley16,191 Points
It is really just personal preference. All of my projects go in a folder called Projects. I change the root directory to the specific project I am working on. The only difference in the case is localhost/some-folder/ vs localhost. It is also handy when you are using a program like Browsersync and don't have to set the index each time.
pat barosy6,759 Points
Should I put all the sites that I'm working on in the sites folder that I just created? What if I'm hard coding a one page HTML/CSS site. Would this go in my sites folder as well? If I had multiple projects in my sites folder, how would I call the specific one that I needed at that time? Sorry for all the questions. I am new at this.