WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Query Monitor

View debugging and performance information on database queries, hooks, conditionals, HTTP requests, redirects and more.

Query Monitor is a debugging plugin for anyone developing with WordPress. It has some advanced features not available in other debugging plugins, including automatic AJAX debugging and the ability to narrow down things by plugin or theme.

For complete information, please see the Query Monitor home page or Query Monitor's GitHub repo.

Here's an overview of what's shown:

Database Queries

  • Shows all database queries performed on the current page
  • Shows affected rows and time for all queries
  • Show notifications for slow queries and queries with errors
  • Filter queries by query type (SELECT, UPDATE, DELETE, etc)
  • Filter queries by component (WordPress core, Plugin X, Plugin Y, theme)
  • Filter queries by calling function
  • View aggregate query information grouped by component, calling function, and type
  • Super advanced: Supports multiple instances of wpdb on one page

Filtering queries by component or calling function makes it easy to see which plugins, themes, or functions on your site are making the most (or the slowest) database queries.

Hooks

  • Shows all hooks fired on the current page, along with hooked actions and their priorities
  • Filter hooks by part of their name
  • Filter actions by component (WordPress core, Plugin X, Plugin Y, theme)

Theme

  • Shows the template filename for the current page
  • Shows the available body classes for the current page
  • Shows the active parent and child theme name

PHP Errors

  • PHP errors (warnings, notices, stricts, and deprecated) are presented nicely along with their component and call stack
  • Shows an easily visible warning in the admin toolbar

Request

  • Shows matched rewrite rules and associated query strings
  • Shows query vars for the current request, and highlights custom query vars
  • Shows the queried object details (collapsed by default)

HTTP Requests

  • Shows all HTTP requests performed on the current page (as long as they use WordPress' HTTP API)
  • Shows the response code, call stack, transport, timeout, and time taken
  • Highlights erroneous responses, such as failed requests and anything without a 200 response code

Redirects

  • Whenever a redirect occurs, Query Monitor adds an X-QM-Redirect HTTP header containing the call stack, so you can use your favourite HTTP inspector to easily trace where a redirect has come from

AJAX

The response from any jQuery AJAX request on the page will contain various debugging information in its header that gets output to the developer console. No hooking required.

AJAX debugging is in its early stages. Currently it only includes PHP errors, but this will be built upon in future versions.

Admin Screen

Hands up who can remember the correct names for the filters and actions for custom admin screen columns?

  • Shows the correct names for custom column filters and actions on all admin screens that have a listing table
  • Shows the state of get_current_screen() and a few variables

Environment Information

  • Shows various PHP information such as memory limit and error reporting levels
  • Highlights the fact when any of these are overridden at runtime
  • Shows various MySQL information, including caching and performance related configuration
  • Highlights the fact when any performance related configurations are not optimal
  • Shows various details about WordPress and the web server
  • Shows version numbers for all the things

Everything Else

  • Shows any transients that were set, along with their timeout, component, and call stack
  • Shows all WordPress conditionals on the current page, highlighted nicely
  • Shows an overview including page generation time and memory limit as absolute values and as % of their respective limits

Authentication

By default, Query Monitor's output is only shown to Administrators on single-site installs, and Super Admins on Multisite installs.

In addition to this, you can set an authentication cookie which allows you to view Query Monitor output when you're not logged in (or if you're logged in as a non-administrator). See the bottom of Query Monitor's output for details.

Requires: 3.5 or higher
Compatible up to: 3.9.2
Last Updated: 2014-7-3
Downloads: 19,809

Ratings

5 stars
5 out of 5 stars

Support

0 of 3 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,1,1 100,3,3 100,1,1 100,1,1 100,1,1 100,1,1
100,4,4 100,1,1 100,2,2 100,1,1 100,1,1
100,2,2 100,4,4 100,2,2
100,3,3 50,2,1
100,3,3 100,6,6