WP Debug Toolkit 1.1.0 is LIVE. Get $300 discount on the lifetime deal now
Use Discount Code WPDTLTD

Every wp dbtk command, its options, and a quick example. Run any command with --help for inline WP-CLI documentation.

wp dbtk api

Discover, search, inspect, and call WordPress REST API endpoints.

wp dbtk api list

List REST routes from the schema store.

Syntax:

wp dbtk api list [--namespace=<namespace>] [--method=<method>] [--source=<source>] [--format=<format>]
OptionDescription
--namespace=<namespace>Filter by REST namespace, e.g. wc/v3 or wp/v2
--method=<method>Filter by HTTP method: GET, POST, PUT, DELETE
--source=<source>Filter by plugin slug, e.g. woocommerce or wpdebugtoolkit
--format=<format>Output format: table (default) or json

Shows WPDT endpoints by default. Run wp dbtk api discover first to include all site routes.

Example:

wp dbtk api list --namespace=wc/v3 --method=GET

wp dbtk api discover

Scan all registered REST routes and save them to the schema store.

Syntax:

wp dbtk api discover

No options. Scans active plugins, themes, and WordPress core. Results are available immediately to list, search, and show.

Example:

wp dbtk api discover
# Success: Discovered 187 routes across 12 sources.

wp dbtk api call

Call any REST endpoint via internal dispatch. No HTTP round-trip — goes through the WordPress REST server directly.

Syntax:

wp dbtk api call <method> <route> [--params=<json>] [--profile[=<mode>]] [--format=<format>]
Argument / OptionDescription
<method>HTTP method: GET, POST, PUT, DELETE
<route>REST route path, e.g. /wp/v2/posts or /wc/v3/products/42
--params=<json>JSON object of request parameters
--profileEnable full profiling (timing, memory, queries, PHP errors)
--profile=fullSame as --profile
--profile=queriesTiming, memory, and query analysis only
--profile=summaryTiming, memory, and total query count only
--format=<format>Output format: json (only option currently)

Authentication uses the current WP-CLI user. Pass --user=<id> to the wp command to authenticate as a specific user.

Examples:

wp dbtk api call GET /wp/v2/posts --params='{"per_page":5}'
wp dbtk api call POST /wpdebugtoolkit/v1/query-logger/record --params='{"duration":60}'
wp dbtk api call GET /wc/v3/products --profile
wp dbtk api call GET /wc/v3/products --profile=queries

wp dbtk api show

Show full detail for a specific REST route: methods, parameters, auth, and description.

Syntax:

wp dbtk api show <route> [--format=<format>]
Argument / OptionDescription
<route>REST route path, e.g. /wc/v3/products
--format=<format>Output format: table (default) or json

Example:

wp dbtk api show /wc/v3/products
wp dbtk api show /wpdebugtoolkit/v1/settings --format=json

wp dbtk api search

Search routes by keyword across route paths, descriptions, and parameter names.

Syntax:

wp dbtk api search <keyword> [--format=<format>]
Argument / OptionDescription
<keyword>Search term
--format=<format>Output format: table (default) or json

Example:

wp dbtk api search "product"
wp dbtk api search "debug" --format=json

wp dbtk api edit

Annotate an endpoint with a custom description.

Syntax:

wp dbtk api edit <route> --description=<description>
Argument / OptionDescription
<route>REST route path to annotate
--description=<description>Description text to save (required)

Example:

wp dbtk api edit /wc/v3/products --description="List WooCommerce products"

wp dbtk debug

Manage WordPress debug settings (WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY).

wp dbtk debug on

Enable WordPress debugging.

Syntax:

wp dbtk debug on [--display]
OptionDescription
--displayAlso enable WP_DEBUG_DISPLAY (shows errors on screen)

Sets WP_DEBUG = true and WP_DEBUG_LOG = true in wp-config.php.

Example:

wp dbtk debug on
wp dbtk debug on --display

wp dbtk debug off

Disable WordPress debugging.

Syntax:

wp dbtk debug off

Sets WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY all to false.

Example:

wp dbtk debug off

wp dbtk debug status

Show current debug settings.

Syntax:

wp dbtk debug status [--format=<format>]
OptionDescription
--format=<format>Output format: table (default) or json

Shows WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY, SAVEQUERIES, enhanced logging status, and log path.

Example:

wp dbtk debug status
wp dbtk debug status --format=json

wp dbtk log

Manage the WordPress debug log (debug.log).

wp dbtk log clear

Clear the debug.log file.

Syntax:

wp dbtk log clear [--yes]
OptionDescription
--yesSkip confirmation prompt

Example:

wp dbtk log clear
wp dbtk log clear --yes

wp dbtk log stats

Show debug log file statistics.

Syntax:

wp dbtk log stats [--format=<format>]
OptionDescription
--format=<format>Output format: table (default) or json

Shows path, existence, file size, and last modified time.

Example:

wp dbtk log stats

wp dbtk query-log

Manage database query logging.

wp dbtk query-log on

Enable query logging. Enables SAVEQUERIES and the enhanced query logger.

Syntax:

wp dbtk query-log on

Example:

wp dbtk query-log on

wp dbtk query-log off

Disable query logging.

Syntax:

wp dbtk query-log off

Example:

wp dbtk query-log off

wp dbtk query-log clear

Clear query log files.

Syntax:

wp dbtk query-log clear [--all] [--yes]
OptionDescription
--allClear all rotated query log files, not just the current one
--yesSkip confirmation prompt

Example:

wp dbtk query-log clear
wp dbtk query-log clear --all --yes

wp dbtk query-log stats

Show query logging statistics.

Syntax:

wp dbtk query-log stats [--format=<format>]
OptionDescription
--format=<format>Output format: table (default) or json

Shows enabled status, slow query threshold, log path, log size, and total entries.

Example:

wp dbtk query-log stats
wp dbtk query-log stats --format=json

wp dbtk viewer

Manage the standalone log viewer.

wp dbtk viewer setup

Install the standalone log viewer into the web root.

Syntax:

wp dbtk viewer setup --password=<password>
OptionDescription
--password=<password>Password for viewer authentication (required, minimum 8 characters)

Requires an active license with the Viewer or Query Monitor module. The viewer is installed at https://yoursite.com/wpdebugtoolkit/ by default.

Example:

wp dbtk viewer setup --password=MySecurePass123

wp dbtk viewer remove

Remove the standalone log viewer.

Syntax:

wp dbtk viewer remove [--yes]
OptionDescription
--yesSkip confirmation prompt

Example:

wp dbtk viewer remove
wp dbtk viewer remove --yes

wp dbtk viewer status

Show viewer installation status.

Syntax:

wp dbtk viewer status [--format=<format>]
OptionDescription
--format=<format>Output format: table (default) or json

Shows whether the viewer is installed, the URL directory, password protection status, and full URL.

Example:

wp dbtk viewer status

wp dbtk license

Manage the WP Debug Toolkit Pro license.

wp dbtk license activate

Activate a license key.

Syntax:

wp dbtk license activate <key>
ArgumentDescription
<key>The license key to activate

Example:

wp dbtk license activate XXXX-XXXX-XXXX-XXXX
# Success: License activated. Tier: Pro. Modules: viewer, query, email.

wp dbtk license deactivate

Deactivate the current license.

Syntax:

wp dbtk license deactivate

Example:

wp dbtk license deactivate

wp dbtk license status

Show current license status.

Syntax:

wp dbtk license status [--format=<format>]
OptionDescription
--format=<format>Output format: table (default) or json

Shows status, tier, plan name, expiry date, and licensed modules.

Example:

wp dbtk license status
wp dbtk license status --format=json
On this page
Try WP Debug Toolkit
The best error log viewer with amazing developer tools to help you troubleshoot your WordPress site securely and efficiently. Something something more.