TechBuzzPro

Query Monitor: How to Use It on WordPress

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Query Monitor is a free WordPress plugin that adds a debugging and performance panel to your admin bar. It shows you every database query, PHP error, hook, HTTP request, and script loaded on a page, so you can find what is slowing your site down or causing a bug. To use it, install and activate the plugin from the WordPress plugin directory, then reload any front-end or admin page while logged in as an administrator. A new “Query Monitor” item appears in the admin bar; click it to open the panel. The labels and tabs can differ slightly between plugin versions, but the core workflow is the same.

What You'll Need

  • A WordPress site where you can install plugins (administrator access).
  • A user account with the administrator role, because Query Monitor only shows its output to users who can manage options.
  • A browser with JavaScript enabled (the panel uses JavaScript to switch tabs).
  • Optional: a staging site or local copy, since debugging plugins are best tested away from live traffic.

Step-by-Step

  1. Install the plugin. In your WordPress dashboard, go to Plugins > Add New, search for “Query Monitor”, and click Install Now on the plugin by John Blackbourn. Then click Activate.
  2. Reload a page. Visit any page on your site while logged in. The admin bar at the top should now include a “Query Monitor” link. If you do not see the admin bar, go to Users > Your Profile and make sure “Show Toolbar when viewing site” is checked.
  3. Open the panel. Click the “Query Monitor” link in the admin bar. A panel opens with tabs such as Queries, Hooks, HTTP API Calls, Scripts & Styles, and Errors. The exact tab names can vary by version.
  4. Check the overview. The first screen summarises page generation time, peak memory, total query count, and total query time. These numbers give you a baseline: a typical page might run 20–60 queries, but the count depends heavily on your theme and plugins.
  5. Inspect slow queries. Click the Queries tab. Queries are listed with their execution time and the function or plugin that called them. Sort by time (the plugin usually highlights the slowest query) and look for queries taking more than a few milliseconds, or the same query repeated many times.
  6. Find the source of a slow query. Each query row shows a “Caller” or backtrace link. Click it to see which plugin, theme, or core function ran that query. This is the key step: it tells you whether to contact a plugin author, adjust a setting, or remove the feature.
  7. Review errors and warnings. Open the Errors tab (or the PHP errors section). Query Monitor collects PHP notices, warnings, and deprecation messages. Fix or report the ones coming from plugins you use; ignore core notices that only appear with debugging enabled.
  8. Check hooks and HTTP requests. The Hooks tab lists actions and filters running on the page, which helps when a plugin behaves unexpectedly. The HTTP API Calls tab shows outgoing requests (for example, to payment gateways or update servers) and how long they took.
  9. Audit scripts and styles. The Scripts & Styles tab lists every CSS and JavaScript file loaded, with its size and dependencies. Use it to spot plugins loading assets on pages where they are not needed.
  10. Test changes one at a time. Deactivate a suspect plugin or switch to a default theme briefly, reload the page, and compare the Query Monitor numbers. Reactivate immediately after testing so your site stays as intended.
  11. Turn it off when finished. Deactivate Query Monitor on your live site when you are done debugging. It is designed for development and adds overhead, and it should not be left running on a production site unnecessarily.

Common Mistakes

  • Expecting it to work for logged-out visitors. Query Monitor only shows its panel to administrators. If you log out, the panel disappears — that is normal, not a bug.
  • Leaving it active on a live site. The plugin is safe, but it adds queries and memory use. Deactivate it after debugging.
  • Blaming the theme for every slow query. The caller column often points to a plugin, not the theme. Check the backtrace before making changes.
  • Ignoring duplicate queries. The same query running dozens of times is a common performance problem. Query Monitor groups duplicates so you can spot them.
  • Confusing query count with page speed. A page with many fast queries can still load quickly; a page with one slow query can feel sluggish. Look at total query time, not just the count.

Tips

  • Use Query Monitor on a staging copy first, especially if you plan to deactivate plugins to test.
  • Compare the same page before and after a change. Note the query count and total time so you can measure improvement.
  • The panel can be opened on admin screens too, which helps when a settings page is slow.
  • If the admin bar is hidden by your theme, you can still access Query Monitor output through the admin toolbar on the dashboard, or temporarily switch to a default theme.
  • Query Monitor also shows the current user’s capabilities and the template file used to render the page — useful when debugging conditional logic.

Troubleshooting

  • No Query Monitor link in the admin bar: Confirm you are logged in as an administrator, the plugin is active, and the admin bar is enabled in your profile. Some themes hide the admin bar on the front end; check the dashboard instead.
  • Panel opens but tabs are empty: Reload the page. If the problem persists, deactivate other plugins one at a time to find a conflict, starting with caching or security plugins that may block admin scripts.
  • Site slows down noticeably: Query Monitor adds overhead. Deactivate it when not debugging, and avoid running it alongside other heavy debugging plugins.
  • Errors tab shows many notices: These often come from plugins developed against older PHP versions. Update plugins first; if notices remain, report them to the plugin author rather than editing core files.
  • You cannot install plugins: Some hosts disable plugin installation. Ask your host or use a local development environment instead.

Frequently Asked Questions

Does Query Monitor slow down my site?

It adds some overhead because it collects and displays data. That is why it is meant for debugging and should be deactivated on a live site when you are not using it.

Can visitors see the Query Monitor panel?

No. The panel is only visible to users with the administrator role (more precisely, users who can manage options). Logged-out visitors never see it.

Will Query Monitor work with caching plugins?

It can, but page caching may hide the queries that happen on cached pages. Exclude your own admin requests from caching, or test with caching temporarily disabled on a staging site.

Does it work on multisite?

Yes, Query Monitor supports WordPress multisite. Install and activate it on the network or on individual sites as needed, and remember only administrators see the panel.

Can I use Query Monitor to find which plugin is slow?

Yes. The Queries tab shows a caller/backtrace for each query, and the Hooks and HTTP API tabs show which plugin triggered each action. That is the main reason people use it.

Is Query Monitor free?

Yes, it is a free plugin available from the official WordPress plugin directory.