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 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,902 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.