Skip to content

Backgrounds

How-to Guides

Technical References

Enable Query Monitor

Query Monitor (QM) is a WordPress plugin that provides a developer tools panel for WordPress. It enables debugging of database queries, PHP errors, hooks and actions, block editor blocks, enqueued scripts and stylesheets, HTTP API calls, and more.
The WordPress.org listing for this plugin provides a more complete feature list and a guide for usage:
https://wordpress.org/plugins/query-monitor/

Query Monitor is available by default on all VIP production and development sites. You can add the view_query_monitor capability to any role that should have access e.g. wp cap add administrator view_query_monitor. Alternatively, you can filter wpcom_vip_qm_enable found in the query-monitor.php file.

Either method is fine to use, but avoid disabling access for VIP Support. For example, if you filtered wpcom_vip_qm_enable to only return true for your team, VIP team members would no longer be able to use Query Monitor on your site in a situation where you require support.

You can also set an authentication cookie that allows you to view Query Monitor output when you’re not logged in (or if you’re logged in as a user without the view_query_monitor capability). See the cog-wheel settings in Query Monitor’s output for details.

Last updated: May 11, 2021