Checking your logs

The most common scenario for problems is how your server is setup. This is particularly true with self setup servers as the default settings are not always ok for running WordPress - depending on what server you use.

These problems are usually logged somewhere - even if the WordPress error is vague. If you are running your own server see the following. If you are using a host you will need to check your host documentation or contact them for help.

The Wordpress Error log

To check your wordpress error log do this you must turn on debugging in your wordpress config file. Do this from a FTP Browser or hosting panel. Find a file called wp-config.php this will be in the base of your wordpress installation.

Look for this section near the button:

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);;

Where is says define(‘WP_DEBUG’, false); change to:

define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);

Now when you run the sinario that causes a error, wordpress will send debugging information to a file called debug.log that will be in [root wordpress foler]/wp-content/debug.log.

It’s possible that this line has been removed on some hosts. If it isn’t there, just insert before the line:

/* That's all, stop editing! Happy blogging. */`

Log viewer plugin

To view the debug log from your admin panel you can installed the plugin log viewer. Then you can see your log by going to tools > log viewer. But you still need to enable logging to use this plugin.

After you have set debugging to true and you have run the scenario that creates the problem, if the plugin states no file or the debug.log has not been created then there was no WordPress error to log.

If there are errors in this file, please send me a copy to debug.

Displaying errors

Instead of looking in the logs for errors you may want to see more immediate feedback, but bare in mind you don’t want to expose this information if the public can see your page. Add this to the bottom of the wp-config.php file:

error_reporting(E_ALL);
ini_set('display_errors', 1);
define( 'WP_DEBUG', true);

Logging with no display

define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

Checking your php error log

If there are no errors in your debug.log then is best to then check your php error log. You can ask your hosting provider for this. But you can also often find it in the root of your WordPress installation, it will be called error_log. It also might be at the root of your account inside a log folder.

Further information

This is a good resource for debugging wordpress:

http://codex.wordpress.org/Debugging_in_WordPress