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 Build a Simple PHP Application Creating the Menu and Footer Starting the Project

Kevin Fitzhenry
Kevin Fitzhenry
30,096 Points

MAMP not connecting to test.php

I set up MAMP initially in the Local Wordpress Development course. Now, when I open the localhost in the browser it shows the Wordpress site I made.

I cannot get the test.php file to show. I added it to the htdocs folder and tried to change the port. No luck.

Thanks for any and all help.

2 Answers

Kevin Fitzhenry
Kevin Fitzhenry
30,096 Points

Kevin. How could you be so silly?

Inside the MAMP app, go to preferences > Web Server > Document Root

There you can change to the test.php file inside the htdocs folder.

PS - I wonder If I still get points for forum participation if I answered my own question? My Career Program profile could really use those points...

jeremy rackley
jeremy rackley
22,336 Points

Another option instead of MAMP would be to set up a local environment using Vagrant and Virtual box. This will allow you more flexibility than MAMP in the future.

Hi jeremy (apologies to the OP), I'm interested in this option you mention. Would you please elaborate or suggest a good reference / tutorial? This would involve the Terminal (or iTerm) and some command line wizardry, no? Is this a platform agnostic alternative as well? thanks

jeremy rackley
jeremy rackley
22,336 Points

greggv, using vagrant and virtualbox really doesnt require too much command line other than a few simple vagrant commands to start and stop your environment. Another option as well is to use Docker containers for fast depployment. I can give you some assistance and links when I have more time, right now I am at work working on a project. Feel free to message me direct if you need to.