How to debug WordPress errors

First of all, WordPress provides debugging as an option. It is not activated by default. In order to make it work:

// Enable WP_DEBUG mode
define(‘WP_DEBUG’, true);

There are also ways of storing it into a file or not display it. Please have a look at the detailed options here: https://codex.wordpress.org/Debugging_in_WordPress

If you would like to have a more powerful tool, that also shows the queries and other information, I recommend to use the plugin:

Debug Bar: http://wordpress.org/plugins/debug-bar/

and Debug Bar Console: http://wordpress.org/plugins/debug-bar-console/

Happy debugging!!

Advertisements