How to debug WordPress site?

Time needed: 10 minutes.

Debugging issues associated with WordPress site is an art. The one who knows it well can solve it faster others may find it tricky and keep bumping their head. Below are few easy steps if you want to try your hands

  1. Using “Health Check & Troubleshooting” plugin

    When it comes to debugging, this is my first choice. Especially when there is any conflict due to third party theme or plugin, nailing that down is easier with this plugin. Health check plugin allows you to deactivate all the plugins and switch to default theme. Then you can activate plugins one by one to check which plugin is the culprit or is it the theme. The best thing is this debugging mode is only for your user, thus non logged in users can still see the site as usual. This option is well suited when you have no other option that debugging directly on production. Get the Heal Check & Troubleshooting plugin from here.

  2. Using “Query Monitor” plugin

    This is for advanced users who are developers. It enables debugging of database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API calls, and more. Query Monitor focuses heavily on presenting its information in a useful manner, for example by showing aggregate database queries grouped by the plugins, themes, or functions that are responsible for them. Get the Query Monitor plugin from here.

  3. By enabling WP_DEBUG constant

    WP_DEBUG is a constant which can be toggled through wp-config.php file. Turning it ON would output all the errors, warnings, notices to the screen on front end. The logs can also be logged to a file instead of throwing them on the screen on front end. To toggle the logging ON or OFF there is another constant named WP_DEBUG_LOG which also goes in wp-config.php file.
    For more details on debugging using this method please check this.

If all this is too overwhelming to you… then don’t worry. Get in touch and I would be happy to help you debug your WordPress site.

Leave a Reply