Looking for advice on debugging sql queries. I find that plugins and themes are causing heavy queries and slowing performance. Any easy ways for doing this? Tools? Shortcuts? Thanks! Daniel


1 Answer 1


The basic technique of logging queries is that if SAVEQUERIES constant is defined to be true (it's not by default for performance reasons) then $wpdb->queries will keep the log of queries performed.

There isn't anything on top of this that WordPress natively does. There are plenty of plugins around which work either by interpreting this data, or implementing additional data collection. Latter can get pretty intricate to implement and only done in more elaborate debug plugins.

  • Thanks for the feedback. Other than Debug Bar and Query Monitor, what other plugins are available? Commented Nov 25, 2014 at 12:30
  • Any other debugging tip?
    – Sayaman
    Commented Feb 12, 2022 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.