Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security

Preventing the Unpredictable White Screen of Death for WordPress Sites with Multiple Themes

For the past several months and up until just recently, Perishable Press had been suffering from unpredictable episodes of the dreaded white screen of death. Although blank white screens happen to virtually all WordPress users now and then, certain configurations seem to trigger crashes more frequently than others. Here, I am referring to WordPress version 2.3.

In this case, the unpredictable crashes, inconsistent errors, and general instability began several months ago after I had completed my WordPress theme restoration project. Prior to that, I had removed all of my alternate themes and placed them on a subdomain. Meanwhile, after the themes had been removed, I decided to enable the default WordPress cache (don’t ask why). For the next month or so, before restoring my themes, my site performed exquisitely: uptime at 99% (on a shared server, no less), virtually no errors, and so on. Then, after restoring alternate theme functionality, the site began locking up and crashing multiple times each day. Here is a summary of the sequence of events (estimated time frames):

  • eight months ago: alternate themes available for users, but default WordPress cache disabled. No problems.
  • six months ago: alternate themes removed, default WordPress cache still disabled. No problems.
  • shortly thereafter during site renovation, default WordPress cache enabled. Still no problems.
  • three months ago: restoration of alternate site themes with default WordPress cache still enabled. Problems begin.
  • until recently: white-screen-of-death syndrome persists, daily site crashes, et al.

In my mad rush to resolve the instability, I had forgotten about enabling the WordPress cache and assumed that the problem was entirely theme-related. I began checking each theme individually, testing unusual scripts, disabling various plugins, and so on. Each of the restored themes was using a custom function.php file containing a handful of miscellaneous functions that aren’t required sitewide. After some investigation, I discovered several bits of key information:

  • after making the restored themes publicly available, people were actually using them (surprise!)
  • switching themes (via Ryan Boren’s Theme Switcher Plugin frequently resulted in site errors and crashes
  • multiple theme switches inevitably triggered the white screen of death
  • many of the blank white screen problems were involved with the “Presentation” and “Plugins” pages of the WordPress Admin area
  • the instability also affected comment-form functionality

The Solution?

Of course, in retrospect, the solution is simple: disable the default WordPress cache1. I should have heeded Ozh’s advice a long time ago. Once I finally realized the problem and disabled the cache, everything was fine: no more errors, crashes, or dreaded blank white screens of death. As simple as this may be, it should be noted that, throughout the ordeal, multiple factors were involved:

  • multiple themes, each using its own functions.php file — removing various scripts from the functions.php file reduced but did not eliminate the problems
  • Ryan Boren’s Theme Switcher Plugin, which enables users to skin the site with alternate themes — at one point, I considered replacing Ryan’s plugin with this newer version, but it just wasn’t a good fit. So I wrote my own theme-switch plugin!
  • the WordPress default cache — there are better ways to cache your pages
  • Akismet filter for eAccelerator — my host tried to stabilize performance by implementing an eAccelerator filter for Akismet

Although I am confident that the entire problem was directly related to the WordPress cache, I list these other items for the sake of others who might be dealing with the same issue.

Update: after more testing, it turns out that the eAccelerator filter for Akismet is also important for long-term stability for my particular shared-server hosting configuration at ASO.

I hope this article proves helpful to someone. If you have experienced similar issues, share them with the community, especially if you discovered alternate solutions or strategies.

Footnotes

About the Author
Jeff Starr = Designer. Developer. Producer. Writer. Editor. Etc.
SAC Pro: Unlimited chats.

8 responses to “Preventing the Unpredictable White Screen of Death for WordPress Sites with Multiple Themes”

  1. i m using a cingular 8525 ,n had faced white screen for quite smoetime, but waiting 2 buy a new phne was manging with it,recently i dropped my phone upside down with the screen open, and luckily after that the phone didnt turn up with a white acreen after that.

    guess some one is able to find out the real problem.

  2. Jeff Starr 2009/04/06 1:04 pm

    @sudhir: Hey I also use an 8525. After almost two years, it still works like a dream.

  3. It may be a coincidence – but I’ve found this issue when I’ve deleted the WP default theme from the themes directory. As soon as I put a copy of that in the themes directory, the problem’s solved.

    Not sure if that’s somehow related?

  4. Jeff Starr 2009/05/27 7:27 am

    @Faryl: Perhaps! That is news to me, and definitely something I will be keeping in mind for next time. Thanks for sharing this information! :)

  5. What an idiot. You like to go on and on and on and do nothing to fixt it. What a gigantic egomaniac. No solution just run your mouth on and on and on and your black background is a bunch of crap.

  6. Jeff Starr 2009/08/01 6:06 pm

    My apologies, POed, I was only trying to contribute my experience on the topic. Didn’t mean to upset you. What particular issue are you trying to resolve? Perhaps I can help in a more specific way.

    Also, I have many alternate themes that you can use to change the look and feel of the site. You may either visit this post to choose something that looks good, or else go with a very minimal theme with dark text on a white background (opens in new tab or window).

    Regards,
    – Jeff

  7. Check to make sure there is NO white spaces at the end of your functions.php page after ?>

  8. lol – yes! Absolutely good advice ;)

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
.htaccess made easy: Improve site performance and security.
Thoughts
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Crazy that we’re almost halfway thru 2024.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.