9 min read
12 Best WordPress Debugging & Testing Tools
Running a WordPress site means dealing with problems that rarely announce themselves: a slow query, a plugin throwing PHP warnings, a cron job that never fires, a template that breaks after an update. Debugging and testing tools show you what is actually happening so you fix the cause instead of guessing.
This guide covers 12 tools that work well on WordPress, from plugins like Query Monitor to PHP-level tools such as Xdebug and browser test frameworks like Playwright. It also explains WordPress core’s own debugging constants, which every other tool builds on.
Quick answer: Start with Query Monitor for database queries, hooks and PHP errors, turn on the core WP_DEBUG and WP_DEBUG_LOG constants to capture errors in a log file, and use Xdebug when you need to step through code. Add WP-CLI for scripted checks, Lighthouse for performance, PHPUnit for plugin and theme tests, and Playwright for end-to-end browser tests.
Last updated: 6 November 2026
What are WordPress debugging and testing tools?
Debugging tools help you find and understand a fault: PHP errors, slow database queries, failing HTTP requests, deprecated functions or a misbehaving scheduled task. Testing tools help you catch faults before users do, by running automated checks against your code or your pages.
Without them, a minor issue can grow into downtime, lost sales or a ranking drop. Use debugging tools on a staging copy of your site where you can, because several of them add overhead or expose technical detail you do not want on a live site.
WordPress debugging and testing tools at a glance
| Tool | Best for | Type | Cost |
|---|---|---|---|
| Query Monitor | Queries, hooks, PHP errors, HTTP calls | Plugin (200,000+ installs) | Free |
| Debug Bar | Admin-bar debugging panels | Plugin (20,000+ installs) | Free |
| WP Debugging | Switching debug constants on without editing files | Plugin (10,000+ installs) | Free |
| Xdebug | Step debugging and profiling PHP | PHP extension | Free |
| WP Crontrol | Inspecting and running cron events | Plugin (300,000+ installs) | Free |
| Log Deprecated Notices | Finding deprecated function calls | Plugin (900+ installs) | Free |
| WP-CLI | Scripted checks and maintenance | Command-line tool | Free |
| Site Health | Quick built-in diagnostics | WordPress core | Free |
| Lighthouse | Performance, accessibility and SEO audits | Browser and CLI tool | Free |
| New Relic | Production performance monitoring | PHP agent and service | Check vendor |
| WordPress PHPUnit tests | Automated PHP tests for core, plugins and themes | Test suite | Free |
| Playwright | End-to-end browser tests | Test framework | Free |
Install counts come from each plugin’s WordPress.org page as of November 2026.
WordPress core debugging constants
Before you install anything, learn the debugging constants that ship with WordPress. They go in your wp‑config.php file, and the official debugging documentation describes each one.
| Constant | What it does | Default |
|---|---|---|
| WP_DEBUG | Turns on debug mode and shows PHP errors, notices and warnings | false |
| WP_DEBUG_LOG | Writes errors to a log, by default debug.log in the content directory. Needs WP_DEBUG on. Set it to a path to log elsewhere | Off |
| WP_DEBUG_DISPLAY | Shows errors on the page. Set to false to hide them while still logging | true |
| SCRIPT_DEBUG | Loads unminified core CSS and JavaScript, for testing changes to core files | false |
| SAVEQUERIES | Saves each database query, its time and the calling function to $wpdb->queries | Off |
A common setup while debugging is WP_DEBUG true, WP_DEBUG_LOG true and WP_DEBUG_DISPLAY false, so visitors never see errors but you can read them in the log. WordPress advises against using these debug tools on live sites, and SAVEQUERIES has a performance cost, so switch them off when you are done.
How to choose the right debugging and testing tools
Match the tool to the question you are asking. If a page is slow, look at queries and profiling. If something breaks only sometimes, you need logs. If a release keeps regressing, you need automated tests.
Also check that a plugin is maintained before you rely on it. Tools that touch your database or load on every request should be updated often and tested with a recent WordPress version.
The best WordPress debugging and testing tools
1. Query Monitor: the first plugin to install

Query Monitor is a debugging plugin for developers, with more than 200,000 active installs, a 4.9 out of 5 rating and version 4.1.1. It shows database queries, hooks, PHP errors, HTTP API calls and REST API requests for the current page, and flags slow or duplicate queries. It also reports memory use and execution time.
Its main strength is that it attributes each query to the plugin, theme or function that ran it, so you can see which component is responsible. For a closer look at query tools, read our guide to the best WordPress query plugins for debugging.
2. Debug Bar: a simple admin-bar panel
Debug Bar adds a debugging menu to the admin bar with panels for queries, cache and request data, and it is on version 1.2.0 with 20,000+ active installs. Add-on plugins such as Debug Bar Console add extra panels. It is lighter than Query Monitor in what it shows, which some developers prefer for a quick look.
Like most debugging plugins, it exposes technical detail, so keep it off production sites.
3. WP Debugging: turn on debug mode without editing files
WP Debugging switches on the core debugging constants for you, so you do not need to edit the config file by hand. It is on version 2.12.6 with 10,000+ active installs, and it carries a 5 out of 5 rating from a small number of reviews. It suits people who want debug mode for a short session without touching server files.
4. Xdebug: step through your PHP
Xdebug is a PHP extension for step debugging, where you pause code at a breakpoint and inspect variables in your editor. The current stable release on the Xdebug download page is 3.5.3, from 8 June 2026. It also supports profiling and code coverage.
It needs to be installed on the server running PHP, and it slows PHP down while active, so use it in local or staging environments. Most local WordPress environments let you switch it on and off.
5. WP Crontrol: see and run scheduled tasks
WP Crontrol lets you view, edit, run and delete WordPress cron events, and see which cron schedules exist. It has 300,000+ active installs and is on version 2.0.0. If a scheduled email, backup or import is not running, this is where you look first.
6. Log Deprecated Notices: find outdated code

Log Deprecated Notices logs deprecated functions, arguments and files used by your plugins and themes, along with a hint about the replacement. It is useful before a major WordPress update. Note that version 0.4.1 was last updated in June 2021 and has about 900 active installs, so treat it as a lightweight helper and cross-check with WP_DEBUG output on a current WordPress version.
7. WP-CLI: debug from the command line
WP-CLI is the command-line interface for WordPress. You can run database queries, update plugins, flush caches, list cron events and run custom commands without opening the admin. Its wp shell and wp eval commands let you test PHP against a loaded WordPress, which makes it a fast debugging aid on servers where you have SSH access.
8. Site Health: built-in diagnostics
WordPress includes a Site Health screen under Tools. It checks PHP and database versions, plugin and theme updates, HTTPS, background updates and the REST API, and it lists server details you can paste into a support ticket. It is the right first stop for site owners who do not write code.
If you need to test a problem with plugins disabled for only your own session, the Health Check and Troubleshooting plugin has a troubleshooting mode. It has 200,000+ installs, though its latest release dates from July 2024, so confirm it works on your WordPress version.
9. Lighthouse: audit speed, accessibility and SEO
Lighthouse is an open-source tool from Google that audits a page for performance, accessibility, SEO and more. You can run it from Chrome DevTools, on the command line (npm install -g lighthouse), as a Node module in CI, or through PageSpeed Insights. Lighthouse is a general web tool, not a WordPress plugin, but it is the usual way to measure the front-end effect of a theme or plugin change.
10. New Relic: monitor production performance
New Relic’s PHP agent instruments your PHP code and gives you transaction traces, database query traces, error traces and dashboards. It is built for production monitoring on servers you control, so it suits businesses that need to see slow transactions over time. New Relic’s documentation lists supported frameworks and libraries in a compatibility page, so check that your PHP and WordPress setup is covered and review current pricing with the vendor.
11. WordPress PHPUnit tests: catch regressions in code

WordPress core is tested with PHPUnit, and plugins and themes can use the same approach to run automated PHP tests. The core handbook describes running the suite with Docker through npm run test:php, or with Composer and vendor/bin/phpunit. It needs PHP 7.4 or later, MySQL or MariaDB, and a separate test database.
Automated tests are the best defence against a fix in one place breaking another. They take effort to write, but they pay off on any code you release to many sites.
12. Playwright: end-to-end browser tests
Playwright drives a real browser to click through your site, and WordPress ships a helper package, @wordpress/e2e-test-utils-playwright, built for this. It adds admin, editor, pageUtils and requestUtils fixtures for working with the admin screens, the block editor and the REST API. The package is still marked as in development, so version updates can include breaking changes.
Use it to test the flows that matter most, such as login, checkout, form submission and post publishing, so you find broken journeys before your visitors do.
A practical debugging workflow
Start on a staging copy. Turn on WP_DEBUG and WP_DEBUG_LOG, keep WP_DEBUG_DISPLAY off, and reproduce the problem. Read the log, then open Query Monitor on the affected page to see queries, hooks and HTTP calls.
If the cause is still unclear, set a breakpoint with Xdebug. Once you fix it, add a PHPUnit or Playwright test so the same bug cannot return unnoticed. For performance work, compare Lighthouse scores before and after, and read our comparison of WP Rocket and LiteSpeed Cache if caching is part of the answer.
Frequently asked questions
How do I turn on debugging in WordPress?
Set the WP_DEBUG constant to true in your wp‑config.php file. Add WP_DEBUG_LOG as true to write errors to wp-content/debug.log, and WP_DEBUG_DISPLAY as false to hide them from visitors.
Where is the WordPress debug log?
By default it is a file called debug.log in the wp-content directory. If you set WP_DEBUG_LOG to a file path, WordPress writes the log there instead.
What is the best plugin for debugging WordPress?
Query Monitor is the most widely used, with 200,000+ active installs on WordPress.org. It covers queries, hooks, PHP errors, HTTP calls and REST requests in one panel.
Can I leave debug mode on a live site?
No. WordPress documentation advises against using WP_DEBUG and related tools on live sites, because errors can expose server details and some settings, like SAVEQUERIES, slow the site down. Debug on staging, or log without displaying errors for a short time.
Do I need Xdebug if I already use Query Monitor?
They solve different problems. Query Monitor shows what a page request did, while Xdebug lets you pause PHP and inspect it line by line. Most developers use both.
Interesting reads:
7 Best WordPress Query Plugins for Debugging and Building Queries
NitroPack Review: Is It Still the Best All-in-One WordPress Speed Plugin?
Related reading
