Debugging in WordPress

With WordPress itself, there is the so-called debug log, which you can use for debugging. Here you will learn how to enable the debug log and also an alternative way, using a plugin.

Without plugin with the debug.log

To activate the debug.log in WordPress, you have to change to the root directory of your WordPress installation. There you open the file wp-config.php.

Here you add now relatively far down, the following two lines:

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

After that, if an error occurs, a debug.log is stored in your wp-content folder. There you will find all errors.

With the help of a plugin

Besides the debug.log, you can install the plugin Query Monitor. This plugin places a new menu in your wp-admin-bar (the black bar at the top). There you will see all the errors that are currently on the page, in the current view. With WP_DEBUG enabled, even more information will be displayed.

Download: Query Monitor – WordPress.org

Useful links

Was this post helpful?
Top