0

Word Press Woes

Posted by mbos on Jul 2, 2009 in General

I have a bad habit of tinkering with my blog here and there.  Adding in new features, checking out new plugins and so forth.  Well, last week, this came back to bite me.

I had input some code that would make “related” posts appear on each post page.  All of a sudden, the entire blog went blank.  I couldn’t access the admin panel, nor view the blog at all!  To compound matters, this occured at the precise moment when our database servers suffered some response issues.  So all of our sites were down for a few minutes.

Of course, finding out the the servers were having issues, I assumed that was the problem.  A few minutes later, after the server issue was resolved and all of our sites were back up and running, I went back in to continue work on the blog.  Everything for the blog was still blank!  I tried re-updating, uploading all of the files from the source again, to no avail.

I went into our theme folder under wp-content/theme/ and removed the code I had input from the functions.php file, and the blog returned.  So did the admin panel.  Then today, I came in to write a post, and found that my admin panel had disappeared again!  Doing another quick search, I found that if your functions.php page has any empty lines at top or bottom, this will occur.  I went in to check the file, and sure enough there was a blank line at the end of it.  I removed the offending line, uploaded and voila!  The admin panel returned.

Now, luckily this was a relatively easy fix for us, because we are pretty comfortable in modifying php files.  However, how would this impact a user who has no clue about how to do this, or even what any of this means?  It seems to me there should be some code somewhere in WP that tells the system to ignore empty lines….seeing that it causes such a problem.

Tags: , , ,

Copyright © 2012 MutinyWare Blog All rights reserved.