• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Books
    • Content Strategy for WordPress (2015)
    • WordPress for Web Developers (2013)
    • Beginning WordPress 3 (2010)
  • Blog
    • Content Modeling for WordPress
    • WordPress Hidden Gems
    • Web Design
  • Work
    • Presentations and Interviews
    • on GitHub →
    • MLIS Class Projects (2019-2022)
    • Portfolio (2002-2019)
    • WordPress Plugins

Stephanie Leary

Writer, Front End Developer, former WordPress consultant

  • About
    • Press Kit
    • Presentations and Interviews
  • Contact Me

WordPress Hidden Gems: Debug Mode

September 30, 2010 Stephanie Leary 3 Comments

If you accidentally introduce a syntax or fatal error in one of your template files, you’ll probably see the dreaded white screen of death when you visit your home page. In some cases, even the admin screens will go blank. The best way to figure out what happened is to check your PHP error log. Look for the last error shown and try to correct it. However, if you can’t find your error log (or you don’t have one), you can turn on debugging by adding define('WP_DEBUG', true); to your wp-config.php file.

The problem with this method, though, is that everyone who visits the site will see your errors. Joost de Valk offers this alternative, which lets you enter debug mode by adding a query string to any URL.

if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
  define('WP_DEBUG', true);

Then you can just add ?debug=debug to your URL (e.g. http://mysite.com/category/news/?debug=debug) to see the errors.

The white screen of death usually comes up when you update a theme or plugin. If your theme has gone horribly wrong and you just want to switch back to another one, but you can’t access the admin screens to change it, don’t panic. Simply delete or rename your active theme’s directory. When WordPress can’t find it, it will revert to the default theme. You can also deactivate an error-causing plugin by deleting or renaming its directory. WordPress will automatically deactivate it.

Find all the WordPress Hidden Gems in [link id=”2675″]Beginning WordPress 3[/link].

WordPress

This is an excerpt from Content Strategy for WordPress.My latest books are Content Strategy for WordPress (2015) and WordPress for Web Developers (2013). Sign up to be notified when I have a new book for you.

Reader Interactions

Comments

  1. Andrea_R says

    September 30, 2010 at 9:52 am

    really?? How come I did not know this? :D this is awesome!

    Reply
  2. Mark Marshall says

    September 30, 2010 at 12:03 pm

    A good reminder. I have used the rename theme troubleshooting step in the past, but those brain cells went away. Thanks for the tip again.

    Reply
  3. sychedelix says

    October 10, 2010 at 7:26 pm

    Ohh!it’s interesting stuff :P

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

My Books

I’m a front end developer at Equinox OLI, working on open source library software. I was previously a freelance WordPress developer in higher education. You can get in touch here or on LinkedIn.

Copyright © 2025 Stephanie Leary · Contact