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

I'm getting a HTTP 500 error. How to solve this?

I've activated MAMP. Have the files inside my folder: ABC123 . I've checked all other threads regarding this problem and some more. Can't figure it out. I'm working on my chrome browser and this is the error I get:

The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500

This is the setup:

functions.php: <?php

function wpt_theme_styles() {

wp_enqueue_style( 'foundation_css', get_template_directory_uri() . '/css/foundations.css' );
wp_enqueue_style( 'normalize_css', get_template_directory_uri() . '/css/normalize.css' );
wp_enqueue_style( 'normalize_css', 'http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic' );
wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );

} add_action( 'wp_enqueue_scripts', 'wpt_theme_styles' );

function wpt_theme_js() {

wp_enqueue_scripts( 'modernizr_js', get_template_directory_uri() . '/js/modernizr.js', '', '', false );
wp_enqueue_scripts( 'foundation_js', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '', true );
wp_enqueue_scripts( 'main_js', get_template_directory_uri() . '/js/app.js', array('jquery', 'foundation_js'), '', true );

} add_action( 'wp_enqueue_scripts', 'wpt_theme_js');

?>

index.php: <?php get_header(); ?>

<h1>Index file</h1>

<?php get_footer(); ?>

header.php <p>Header</p>

footer.php <p>Footer</p>


Let me know if I should include the css&js folder & style.css file in this question.

Thank you so much

Can you help Rich Bagley / Zac Gordon ?

1 Answer

So I was tired. It happens. I didn't have the folder within the wp theme folder. That's why it showed a 500 error. I moved the files within the wp themes folder and it works.