Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting · Guide

How to Use Query Monitor to Find Slow Queries and Errors

Short answer

To use Query Monitor, install and activate the plugin, then click the numbers in the admin bar to open its panels. The Database Queries panel sorts queries by time and groups them by plugin, theme, or core function, so the slowest queries and the code behind them are easy to spot.

Key takeaways

  • Query Monitor is a free plugin that shows database queries, PHP errors, hooks, HTTP requests, and scripts for each page load.
  • The Database Queries panel flags slow, duplicate, and erroneous queries and filters them by type, component, and calling function.
  • The Queries by Component view totals query time per plugin, theme, and core function.
  • Only Administrators on single sites and Super Admins on multisite installs can see Query Monitor output by default.
  • Deactivate Query Monitor when you finish debugging, since it adds work to every page load.

What does Query Monitor show you?

Query Monitor is a free developer tools panel that shows database queries, PHP errors, hooks, HTTP requests, and scripts for each page load.

Its own site says it focuses on grouping database queries by the plugin, theme, or function that ran them, so you can see who caused each cost.

Version 4.1.1 was released on 27 October 2026, and version 4.0.7 on 20 June 2026 confirmed support for WordPress 7.0, according to the changelog on WordPress.org.

The plugin page on WordPress.org lists panels for database queries, PHP errors, hooks and actions, blocks, rewrite rules, scripts and stylesheets, HTTP API calls, capability checks, environment data, conditionals, and transients.

  • Database Queries: every query, its time, and the component behind it
  • PHP Errors: errors, warnings, and notices with call stacks
  • HTTP API Calls: outside requests with response codes and times
  • Scripts: enqueued scripts and stylesheets with dependencies
  • Hooks and Actions: which hooks fired on the page

How do you install and open Query Monitor?

Install it from Plugins > Add New, activate it, then click the new numbers in the admin bar to open its panels.

  1. Go to Plugins > Add New in your WordPress dashboard.
  2. Search for “Query Monitor” and click Install Now.
  3. Click Activate after the install finishes.
  4. Visit any page on your site while logged in as an administrator.
  5. Click the numbers in the admin bar to open the panels at the bottom of the page.

Query Monitor needs PHP 7.4 or higher, and it supports WordPress versions up to three years old, according to the plugin page.

By default only Administrators on single sites and Super Admins on multisite installs can see its output, and you can set an authentication cookie to view it while logged out, as the plugin page explains.

How do you read the numbers in the admin bar?

The admin bar shows page generation time, peak memory use, database query time, and query count for the page you just loaded.

The plugin page says the toolbar menu shows an overview of the current page, with full detail in the panels below it.

Start with the totals, then open the panels for detail. A high query count with a low total time points at many small queries, while one large time points at a single slow query.

Load the same page twice and compare the two sets of numbers. The first load can include cold caches, so the second load gives a steadier number to work from.

Write the four numbers down before you change anything. Without a baseline, you cannot tell whether a fix helped or made things worse.

How do you find slow database queries?

Open the Database Queries panel, sort by time, and look for the queries with the largest times and the slow, duplicate, or error notices.

The plugin page says the panel flags slow, duplicate, or erroneous queries and lets you filter by query type, component, and calling function.

Duplicate queries run the same SQL more than once on one page. A few duplicates are normal, but dozens of identical queries from one plugin point at a loop or a missing cache.

Click a query to see its full SQL and its call stack. The stack shows the exact function and file that ran it, which is what you hand to a developer.

How do you find which plugin causes the slow queries?

Switch to the Queries by Component view, which totals time and query count per plugin, theme, and core function.

The plugin page says Query Monitor shows aggregate database queries grouped by the plugins, themes, or functions responsible for them.

If one plugin owns most of the time, read our guide on how to find slow plugins in WordPress before you deactivate anything.

ComponentWhat to look forNext step
One plugin with most timeA large share of total query timeDeactivate it on staging and recheck
WordPress coreHigh time with no plugin standing outCheck the theme and the database size
Active themeMany queries from theme functionsAsk the theme author or switch themes

How do you find PHP errors with Query Monitor?

Open the PHP Errors panel to see each error with the component that caused it and the call stack behind it.

The plugin page says PHP errors appear with their component and call stack, and a visible warning shows in the admin toolbar.

The panel also lists uses of deprecated functions and code that triggers “Doing it Wrong” notices, which WordPress raises when code runs in a way core does not support.

PHP 7 changed how most errors are reported, with most errors now thrown as Error exceptions, according to the PHP migration guide.

WordPress can also write errors to wp-content/debug.log when WP_DEBUG_LOG is on, as the debugging handbook explains.

To keep a written record as well, set WP_DEBUG_LOG to true in wp-config.php so errors land in wp-content/debug.log.

For step debugging, the WordPress debugging handbook points to Xdebug, which lets you pause code and inspect variables.

How do you check slow HTTP requests and hooks?

Open the HTTP API Calls panel to see each outside request with its response code, the component that made it, and the time it took.

The plugin page says the panel shows HTTP API requests with response code, component, and time, plus alerts for failed or erroneous requests.

A slow outside request often comes from a feed, an update check, or a third-party API. If the same request is slow on every page, the problem sits outside WordPress.

The scripts panel lists enqueued scripts and stylesheets with their dependencies and alerts for broken dependencies, according to the plugin page.

The environment panel shows PHP, database, WordPress, and server facts for the current request. The transients panel lists transients that were updated during the load, which helps when a cached value keeps changing.

How do you use Query Monitor with Ajax and REST API calls?

Query Monitor also covers Ajax and REST API requests, which do not load a normal page, so their debugging data travels in response headers instead.

The plugin page says the response from any jQuery Ajax request contains debugging information in its headers, and PHP errors also appear in the browser developer console.

An authenticated REST API request returns an overview of performance information and PHP errors in its headers, as long as the user has permission to view Query Monitor output, according to the same page.

Open your browser developer tools, run the Ajax action or API call, and read the response headers to see the query count, time, and any PHP errors for that request.

How long should you keep Query Monitor active?

Use it while you debug, then deactivate it, since it adds work to every page load and stores extra data in memory.

The plugin page says the impact on page generation time is small, but pages with hundreds of queries use more memory because of the stack trace data.

It does not persistently store the data it collects and does not send data to any third party, according to the privacy statement on the plugin page.

Allow about 15 minutes to install it and check one slow page. A full pass over several page types can take an hour, since each page needs its own load.

Check a fix by reloading the same page and comparing the new totals with the numbers you wrote down first.

If the admin dashboard itself is the slow part, read how to speed up the WordPress admin and measure the same screens again after each change.

What mistakes should you avoid?

The most common mistake is leaving Query Monitor active on a busy live site and reading one page load as if it were a full history.

  • Do not share screenshots that show query text with user data or keys in them.
  • Do not judge a plugin from one page. Check the same panel on two or three page types first.
  • Do not use it as a log. It shows the current page load only, so refresh the page to see fresh data.
  • Do not leave it active for weeks. Deactivate it once you have the answer.

If the admin itself is slow, start with how to fix a slow admin dashboard and use Query Monitor on the worst admin screen.

Frequently asked questions

Is Query Monitor free?

Yes. Query Monitor is free and open source software, and its own site states that directly. You can install it from the WordPress plugin directory without paying anything, and there is no paid version that adds extra panels.

Can visitors see Query Monitor on my site?

No. By default only Administrators on single-site installs and Super Admins on multisite installs can see its output. Other visitors see the normal page. You can also set an authentication cookie to view it while logged out, as the plugin page explains.

Does Query Monitor slow down my site?

Its own documentation says the impact on page generation time is small, but pages with hundreds of queries use more memory because of the stack trace data. Use it while you debug and deactivate it when you finish, rather than leaving it active for weeks.

Does Query Monitor keep a history of past page loads?

No. It shows data for the current page load only, and the data resets when you navigate away or refresh. If you need history across many requests over time, use a server log or an application monitoring service instead.

What should I do when one plugin owns most of the query time?

First confirm the result on two or three page types, then deactivate that plugin on a staging copy and reload the same pages. If the totals fall sharply, you have found the cause. Then update, replace, or ask the plugin author about the slow queries.

Sources

  1. Query Monitor WordPress.org
  2. The developer tools panel for WordPress and WooCommerce Query Monitor
  3. Debugging in WordPress WordPress Developer Resources
  4. Backward incompatible changes PHP.net

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test