WordPress Debug Theme

Yoast Debug ThemeWarning: major geekery ahead! Sometimes you need to see what's wrong with a WordPress install, and you need to see it fast. I've had a set of hacks around for a while to do that, but finally started combining it into a WordPress Debug Theme. This theme is quite simple for now, as it only does a few things, but does them quite effectively.

The first thing it does, on the homepage of the blog you've activated it on, is show the most important constants for that blog (see this screenshot). It shows you the important URL's, editor and memory settings etc.

On subpages it will show you something else: the page type, all the query vars that are set and the SQL query for that page. I've found that just doing a print_r or var_dump of $wp_query is hard to read, this theme tries to be a bit smarter about that, see these examples.

This theme also works in the preview, so that might be enough in a lot of cases. It also works great together with Donncha's Theme Tester, as Alex Leonard mentioned in the comments. Be warned that you might want to remove this theme from live sites though!

So all you have to do to use this is download it, upload it to your server and activate it.

If you're a developer this theme might come in handy sometimes, I'd love to know if you use it and what you'd add, maybe we can turn this into something super useful together.

28 Responses to “WordPress Debug Theme”

  1. Hey Joost,

    That's a great idea - definitely going to check that out.

    Could work very well in tandem with Theme Tester by Donncha

  2. Awesome concept! Can't wait to use this!

  3. Fantastic ^^ I think a lot of WordPress users will find this very usefull!

  4. Awesome theme! Helped me out at our site with a few things. Keep up the work!

  5. I would include at least the titles of the posts so that it's easier to find out what you're looking at.

    Neat ideea, by the way.

  6. Thank you very much! this a very useful thing!

  7. What a cool idea. I have installed on one of my test sites. There is lots of info that I do not understand yet, but it will be fun to explore and learn.

    Thank you for taking the time to build and release this.

    mark

  8. GREAT idea! Thank you very much for this.

  9. That's a fantastic idea! Thanks!

  10. Awesomeness!!! Thanks for sharing!!

  11. Thanks for sharing I know this will come in useful!

  12. Will try this out on a few sites of mine that are acting slow and tired, thank you for taking the time to create this and help make wordpress ROCK! Cheers!

  13. Nice work dude! Very good idea for a theme. Will keep this in mind as soon as stuff start going off the rails if you know what i mean. d:

    M

  14. This is definitely going on my "Look-See" list ... thanks for releasing it!

  15. hehe I'll enjoy messing around with this. Could be a cool idea to incorporate this into a normal theme, so site admins can at the click of a link, find out any problems with their site..

  16. How do I use this theme? Where do I add it? Thanks for the hard work.

  17. It would be really great if you could dump the globals for $current_user, $current_blog, and $current_site also. (the last 2 are WPMU).

  18. Nice work man ! Awesome idea for a theme .

  19. In WP 2.9 we're gaining the ability to register a theme directory. With that in mind, it would be smart to turn this into a *plugin*, thus:

    1) A customized version of the Theme Tester plugin that includes your debug theme.
    2) Activating the plugin registers the Debug theme's directory and activates it for the admin only.

    This is just a cleaner and easier way to use the combination of the two, and a natural extension of your idea. One thing to update, one thing to activate, not fuss no muss.

    (Especially as I can't think of *any* circumstance where an admin would want the Debug Theme activated for regular visitors!)

  20. This sounds like a great tool. But I actually was expecting something else - more like a theme debugger plugin. I have had a lot of clients that want to use some theme or other as a starting point and I have to hunt down all the missing hooks and missing statements.

    Just throwing an idea out there, for a plugin that would test a theme, allowing you click through each page and tell you what template is being used, then maybe lists all the standard hooks and lets you know what is missing and where. Maybe in the footer or something it would list all the template files in the theme and suggest improvements (missing 404.php, missing search.php, for example) Very similar to what this looks like, but testing the theme.

    Now THAT would be cool.

  21. Hi again. I don't mean to spam your comments, but anyone interested in your debug theme might also be interested in my "Log Deprecated Calls" plugin: http://striderweb.com/nerdaphernalia/features/wp-log-deprecated-calls/

Comments closed, if you feel you have something to say:
drop me a line.

21 Trackbacks to “WordPress Debug Theme”

  1. links for 2009-10-14 | Digital Rehab - Thu, October 15th, 2009 at 01:41
  2. Resource: WP Debug Theme | Wordpress Lesezeichen - Fri, October 16th, 2009 at 10:26
  3. Weekly Digest for October 17th | The WebZappr - Sat, October 17th, 2009 at 11:15
  4. WordPress Themes 20-10-2009 | Guia WordPress - Tue, October 20th, 2009 at 14:15
  5. Sket på nettet den 22.10.09 - Thu, October 22nd, 2009 at 09:44
  6. 40 Free High-Quality WordPress Themes | Buddy's Blog - Thu, November 12th, 2009 at 19:02
  7. 40款免费的高质量WordPress主题 » 泥泞小路 - Fri, November 13th, 2009 at 14:59
  8. De nouveaux thèmes originaux Wordpress - Sun, November 15th, 2009 at 10:27
  9. 40 Free High-Quality WordPress Themes « Social-Press - Tue, November 17th, 2009 at 23:06
  10. WordPress Debug Theme | hellokinsella - Sun, November 22nd, 2009 at 20:26
  11. Fresh Web Development Goodies Bag « my mcLife - Wed, November 25th, 2009 at 04:17
  12. Fresh Web Development Goodies Bag | Graphic Design Pro - Wed, November 25th, 2009 at 05:50
  13. Fresh Web Development Goodies Bag | SeanBurdick - Wed, November 25th, 2009 at 13:10
  14. WordPress Theme Releases for 10/20 | Wordpress - Fri, December 4th, 2009 at 10:06