[wp-hackers] wordpress optimizations

denis at semiologic.com denis at semiologic.com
Sat Apr 16 21:15:31 GMT 2005


Quoting Peak Discharge <chmoka at gmail.com>:

> I see you turn debug mode on using by adding ?debug=1 at the end of the blog
> address. I tried that but that didn't display what expected at the bottom.
> Using Strayhorn with Blix theme

you'll want to add the following somewhere in your config.php file:

if ( $debug )
	define ('SAVEQUERIES', true);

and the following in your footer:

if ( defined("SAVEQUERIES") && SAVEQUERIES == true )
{
	foreach( $wpdb->queries as $query )
	{
		list( $db_query, $time ) = $query;
		echo "<p style=\"font-size:
8pt\"><strong>$time</strong><br/><code>$db_query</code></p>";
	}
}

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the wp-hackers mailing list