Debugging

Before you try to debug anything, start by checking if you have caching turned on for your blog. If so, you may be seeing bugs that are cached but no longer exist. Turn caches off to make sure you see what’s going on in real time.

Enable Debugging

Brute force debugging for everyone (not recommended on production servers)

To see complete error messages as well as a debug log with loads of information on the bottom of each page, set

For some specific cases, it’s also possible to use the value 2 but this is not recommended for 99.9% of the situations because it will seriously break the proper display of some pages by inserting debug information inline everywhere.

Turning on debugging only for you and only when you need it (recommended method)

If you want to be able to turn on/off the debuglog selectively at will, leave the default setting of $debug = 'pwd' but define a password in $debug_pwd like this:

$debug = 'pwd';
$debug_pwd = 'mysecret';

Once this is done, you can go to any page and append the following to the URL to turn on the debuglog: ?debug=mysecret

To turn off, just load a page with ?debug=

Enable the AJAX debuglog

You can also display a debuglog for AJAX calls. It will float in a CSS window about the page and will be populated in real time (for example, when loading a comment form).

Enable logging of XMLRPC

This will log to the file /xmlsrv/xmlrpc.log then and will be helpful when debugging what’s going on or why a particular request fails.

Display errors, even when not in debug mode

There is a variable that forces displaying error even if the debug mode is not enabled. This option is intented to help users quoting meaningful error messages in the forums.

$display_errors_on_production = true;

Important: this variable is set in true by default but we encourage you to override this option by changing it into false, following best practices about security. Detailed information could be found here: Exposing Errors To Visitors.

Configuration overrides

Sometimes it’s useful to override some configuration settings on a specific test machine without affecting the normal configuration files that are synchronized with the production server.