Warning: 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.






Hey Joost,
That's a great idea - definitely going to check that out.
Could work very well in tandem with Theme Tester by Donncha
Hmm that's a bloody good idea, will add that to the post :)
Post updated :)
Awesome concept! Can't wait to use this!
Fantastic ^^ I think a lot of Wordpress users will find this very usefull!
Awesome theme! Helped me out at our site with a few things. Keep up the work!
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.
Yeah good idea, will do on single posts / pages :)
Thank you very much! this a very useful thing!
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
GREAT idea! Thank you very much for this.
You did it! thanks ;)
That's a fantastic idea! Thanks!
Awesomeness!!! Thanks for sharing!!
Thanks for sharing I know this will come in useful!
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!
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
This is definitely going on my "Look-See" list ... thanks for releasing it!
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..
How do I use this theme? Where do I add it? Thanks for the hard work.
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).
Nice work man ! Awesome idea for a theme .
it is great,thanks
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!)
Great idea, doing that soon!
AWESOME. Thanks!
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.
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/