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! While you're at it, check out some resources Treehouse students have shared here.

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

PHP

Using MAMP to manage sites with PHP

I am helping someone manage a website that uses PHP and would like to work locally. I am wondering if anyone knows how to add another webpage to MAMP as I am currently using the htdocs folder for the Shirts 4 Mike project. Thanks!

3 Answers

Using the free version of MAMP it doesn't have a way to segment sites into multiple htdocs folders.

A couple of solutions are:

  1. To put each project in the htdocs into its own folder so shirts4mike would have its own folder in htdocs and go to eg: localhost:8888/shirts4mike

  2. Use anvil (I'm not totally sure this will work the best though) http://anvilformac.com

  3. Get MAMP pro which allows you to add custom local domains

Hopefully this helps and someone else has a better solution :)

Yep, no problem doing what is described here. I have the free version of MAMP and currently have 8 different web projects inside the htdocs folder.

You can add another folder in htdocs containing the project you want to work on. Then open MAMP's start page and then create a new database in phpMyAdmin for the new project. You should be good to go after that.