Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Setup Your Local Development Environment

Max Betancourt
Max Betancourt
808 Points

local host page is blank.

So I installed MAMP Pro and everything was running fine, I followed all the instructions to a t (I think), however I received a prompt that my local port (80) wasn't working and I had to use a new one (81). So after removing the characters on my address bar leaving only "localhost" I receive a blank web page. I thought nothing of it and I opened my text editor (sublime text 3) saved the text as index.php, refreshed my window and still got a blank page. Keep in mind that I have MAMP Pro running so I am not sure where I went wrong here.

Any one have any clue?

Thanks in advance.

1 Answer

Patricia Hector
Patricia Hector
42,901 Points

Open up MAMP and before you start the server go to Preferences, and there on the top menu go to Ports and check in which port Apache is running (80, 8888, 81). Once you know that, start your server and go to localhost:<your Apache port> on the browser. Here are the possible directions depending on your port

  • localhost:80
  • localhost:8888
  • localhost:81

If everything is alright you should see a welcome page from MAMP. Then you can go to wherever is located the MAMP folder and inside it, look for the htdocs folder and start creating your projects there. Happy Coding. Ciao.