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 Whitescreen - possible causes?

Hi,

I've been working my way through Zac's excellent seminar on building a theme with Foundation - http://teamtreehouse.com/library/building-a-wordpress-theme-with-foundation-5 However earlier I got the dreaded whitescreen which I seem to have fixed now but I wondered if anyone had any info on why this happens?

As a bit of background; midway through coding the functions file (whilst enqueueing javaScript files) I noticed I'd lost the ability to log into the dashboard via wp-admin. From past experience I figured it was probably something in the functions file, so removed all the code from this and then added it back piece by piece. Again, a few times more I got the whitescreen but there seemed to be no pattern, the stylesheet enqueues always worked fine but different lines of syntactically correct js seemed to prompt the whitescreen. Eventually as part of testing the process of adding new lines of code everytime I added new code I cleared the cache, history etc in chrome and safari and all of a sudden the problem seemed to solve itself.

I guess simply put I wanted to know if clearing the cache could affect whitescreen and not being able to login via wp-admin? There were no errors in my code and the only thing I did other than clear the cache etc was to take some numbers out of a commented out piece of code //Load jQuery 2.1 became //Load jQuery and I can't see this affecting things.

I also wondered if the database could be causing rpoblems - I find MAMP very slow to update sometimes and wondered if a by-product of this could be the whitescreen?

Does anyone have advice or tips? Normally I find theres' a simple mistake in the code - a line not closed etc that cause the whitescreen however this time I'm a bit stumped as my code was fine...

Hopefully someone could help with this..

Many thanks!

Steve.

Ps. Zac Gordon I tagged you in this - hope you don't mind!

1 Answer

Double check the functions.php file again and make sure there isn't any extra white space at the end and that all tags are closed properly.