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

WordPress WordPress Theme Development WordPress Header and Footer Templates The header.php and footer.php Files

Sirin Srikier
Sirin Srikier
7,671 Points

I'm getting a HTTP 500 error The localhost page isn’t working when I turned on mamp again to work on this course.

I was able to do this course yesterday and set up mamp just fine but now I can't access this because I am getting a The localhost page isn’t working localhost is currently unable to handle this request HTTP error 500. How should I fix this?

10 Answers

Sirin Srikier
Sirin Srikier
7,671 Points

I fixed it. It was a syntax error in my functions file, thanks for the help!

Since 500 is a server error it looks like you haven't started the server. Setting up MAMP is one thing. Making sure the server is running is another. When you start MAMP it should start both the Apache web server and the MySQL database server, and you should see the red lights on the startup window turn to green for both servers.

Sirin Srikier
Sirin Srikier
7,671 Points

The server is running, I added a test folder with an index.php file and that one works just fine. It's the wp site that I can't access anymore.

Can you include a copy of the url that is in your browser's address box?

What happens if you add a page to this url, e.g., http://localhost:8888/localwp.com/wp-login.php?

Sirin Srikier
Sirin Srikier
7,671 Points

Still gives me the same error 'localhost page isn't working'

Open Finder. If you haven't changed the default folder for the web server go to Applications > MAMP > htdocs and look there to see what the folders and files are.

In order for a file to be served up by the web server it has to either be in or under htdocs or in the folder you indicated you wanted to use other than htdocs in MAMP's Preferences (on the page with the Web Server tab).

Sirin Srikier
Sirin Srikier
7,671 Points

My folders are in the htdocs and the settings are set to htdocs as well. I think that was the default setup so I left it as is. I put my localwp.com folder in the htdocs folder.

Sirin Srikier
Sirin Srikier
7,671 Points

I fixed it. It was a syntax error in my functions file, thanks for the help!

I'm having the same issue. Do you know how I can fix the syntax error please?

Ran Mamp in compatibility mode and that fixed the problem.

Sirin, that's good news that you've got it fixed!!