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