Disaster! Blank page when I log in to Wordpress

It’s fixed now, thankfully, but last night I had a blogging disaster! I was changing the wp-config.php file, and started getting errors — and was unable to log in to Wordpress — I just saw a blank page without any error messages.

HOW IT HAPPENED
I was installing the WP-Cache plugin, to improve performance. This involved changing permissions to the wp-content directory, and adding a line to the wp-config.php file. I downloaded the file, opened it up in Dreamweaver, added “define(’WP_CACHE’, true);” to the file, and re-uploaded the file.

Seems innocuous enough.

But suddenly, when I looked at my live blog, everything was wrong. The sidebar was displaying ON TOP OF my main content column. I panicked. I hadn’t changed any of the layout files or css files, but I re-uploaded them just in case. Still not fixed. I took the new line out of the wp-config.php file, and that didn’t help either.

Somehow, suddenly, the “Theme” that I had created was gone, and my blog had gone back to the default wordpress theme! I tried to change it back, but got either an error saying:

Warning: Cannot modify header information - headers already sent by (output started at /home/artfulco/public_html/wp-config.php:49) in /home/artfulco/public_html/wp-includes/pluggable.php on line 329

Blaming the wp-cache plugin for my problems, I tried to deactivate it through wordpress — and got a similar error.

I wondered if there was a browser cache problem going on, so I logged out, closed Firefox, and restarted. When I tried to log into my blog after that, I was greeted with only an ominous blank page… no errors, just a blank page!


THE SOLUTION

It was a problem with the wp-config.php file. When I opened it up in Dreamweaver, Dreamweaver had inserted a space at the end of the file. This tiny little space was causing ALL of these errors — the wp-config.php file sends the header information every time its read, but if that file sends any other information before the headers (even a space), it will cause an error. This error caused the css layout problems, the “cannot modify header information” errors, and the blank page that showed up when I tried to log in. I removed the space, and now everything works perfectly.

From now on, I’ll only edit .php files in Notetab. No more Dreamweaver for me.




Like this story? Share with others on:
   del.icio.us    digg    reddit    furl      Stumble it!


SPEAK / ADD YOUR COMMENT
Comments are moderated.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Return to Top

Technorati Tags: