PHPackages                             wp-cli/doctor-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wp-cli/doctor-command

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

wp-cli/doctor-command
=====================

Diagnose problems within WordPress by running a series of checks for symptoms.

v2.3.0(2mo ago)162264.5k↑121.4%24[1 issues](https://github.com/wp-cli/doctor-command/issues)[1 PRs](https://github.com/wp-cli/doctor-command/pulls)2MITGherkinCI passing

Since Nov 15Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/wp-cli/doctor-command)[ Packagist](https://packagist.org/packages/wp-cli/doctor-command)[ Docs](https://runcommand.io/wp/doctor/)[ RSS](/packages/wp-cli-doctor-command/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (16)Versions (12)Used By (2)

wp-cli/doctor-command
=====================

[](#wp-clidoctor-command)

Diagnose problems within WordPress by running a series of checks for symptoms.

[![Testing](https://github.com/wp-cli/doctor-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/doctor-command/actions/workflows/testing.yml)

Quick links: [Overview](#overview) | [Using](#using) | [Installing](#installing) | [Contributing](#contributing)

Overview
--------

[](#overview)

`wp doctor` lets you easily run a series of configurable checks to diagnose what's ailing with WordPress.

Without `wp doctor`, your team has to rely on their memory to manually debug problems. With `wp doctor`, your team saves hours identifying the health of your WordPress installs by codifying diagnosis procedures as a series of checks to run with WP-CLI. `wp doctor` [comes with dozens of checks out of the box](https://make.wordpress.org/cli/handbook/guides/doctor/doctor-default-checks/), and [supports customized `doctor.yml` files](https://make.wordpress.org/cli/handbook/guides/doctor/doctor-customize-config/) to define the checks that are most important to you.

Each check includes a name, status (either "success", "warning", or "error"), and a human-readable message. For example, `cron-count` is a check to ensure WP Cron hasn't exploded with jobs:

```
$ wp doctor check cron-count
+------------+---------+--------------------------------------------------------------------+
| name       | status  | message                                                            |
+------------+---------+--------------------------------------------------------------------+
| cron-count | success | Total number of cron jobs is within normal operating expectations. |
+------------+---------+--------------------------------------------------------------------+

```

Want to pipe the results into another system? Use `--format=json` or `--format=csv` to render checks in a machine-readable format.

`wp doctor` is designed for extensibility. Create a custom `doctor.yml` file to define additional checks you deem necessary for your system:

```
plugin-w3-total-cache:
  check: Plugin_Status
  options:
    name: w3-total-cache
    status: uninstalled

```

Then, run the custom `doctor.yml` file using the `--config=` parameter:

```
$ wp doctor check --fields=name,status --all --config=doctor.yml
+-----------------------+--------+
| name                  | status |
+-----------------------+--------+
| plugin-w3-total-cache | error  |
+-----------------------+--------+

```

Running all checks together, `wp doctor` is the fastest way to get a high-level overview to the health of your WordPress installs.

Using
-----

[](#using)

This package implements the following commands:

### wp doctor

[](#wp-doctor)

Diagnose what ails WordPress.

```
wp doctor

```

**EXAMPLES**

```
# Verify WordPress core is up to date.
$ wp doctor check core-update
+-------------+---------+-----------------------------------------------------------+
| name        | status  | message                                                   |
+-------------+---------+-----------------------------------------------------------+
| core-update | warning | A new major version of WordPress is available for update. |
+-------------+---------+-----------------------------------------------------------+

# List checks to run.
$ wp doctor list
+----------------------------+--------------------------------------------------------------------------------+
| name                       | description                                                                    |
+----------------------------+--------------------------------------------------------------------------------+
| autoload-options-size      | Warns when autoloaded options size exceeds threshold of 900 kb.                |
| constant-savequeries-falsy | Confirms expected state of the SAVEQUERIES constant.                           |
| constant-wp-debug-falsy    | Confirms expected state of the WP_DEBUG constant.                              |
| core-update                | Errors when new WordPress minor release is available; warns for major release. |

```

### wp doctor check

[](#wp-doctor-check)

Run a series of checks against WordPress to diagnose issues.

```
wp doctor check [...] [--all] [--spotlight] [--config=] [--fields=] [--=] [--format=]

```

A check is a routine run against some scope of WordPress that reports a 'status' and a 'message'. The status can be 'success', 'warning', or 'error'. The message is a human-readable explanation of the status. If any of the checks fail, then the command will exit with the code `1`.

**OPTIONS**

```
[...]
	Names of one or more checks to run.

[--all]
	Run all registered checks.

[--spotlight]
	Focus on warnings and errors; ignore any successful checks.

[--config=]
	Use checks registered in a specific configuration file.

[--fields=]
	Limit the output to specific fields.

[--=]
	Filter results by key=value pairs.

[--format=]
	Render results in a particular format.
	---
	default: table
	options:
	  - table
	  - json
	  - csv
	  - yaml
	  - count
	---

```

**AVAILABLE FIELDS**

These fields will be displayed by default for each check:

- name
- status
- message

**EXAMPLES**

```
# Verify WordPress core is up to date.
$ wp doctor check core-update
+-------------+---------+-----------------------------------------------------------+
| name        | status  | message                                                   |
+-------------+---------+-----------------------------------------------------------+
| core-update | warning | A new major version of WordPress is available for update. |
+-------------+---------+-----------------------------------------------------------+

# Verify the site is public as expected.
$ wp doctor check option-blog-public
+--------------------+--------+--------------------------------------------+
| name               | status | message                                    |
+--------------------+--------+--------------------------------------------+
| option-blog-public | error  | Site is private but expected to be public. |
+--------------------+--------+--------------------------------------------+

```

### wp doctor list

[](#wp-doctor-list)

List all available checks to run.

```
wp doctor list [--config=] [--fields=] [--format=]

```

**OPTIONS**

```
[--config=]
	Use checks registered in a specific configuration file.

[--fields=]
	Limit the output to specific fields.

[--format=]
	Render output in a specific format.
	---
	default: table
	options:
	  - table
	  - json
	  - csv
	  - count
	---

```

**AVAILABLE FIELDS**

These fields will be displayed by default for each check:

- name
- description

**EXAMPLES**

```
# List checks to run.
$ wp doctor list
+----------------------------+--------------------------------------------------------------------------------+
| name                       | description                                                                    |
+----------------------------+--------------------------------------------------------------------------------+
| autoload-options-size      | Warns when autoloaded options size exceeds threshold of 900 kb.                |
| constant-savequeries-falsy | Confirms expected state of the SAVEQUERIES constant.                           |
| constant-wp-debug-falsy    | Confirms expected state of the WP_DEBUG constant.                              |
| core-update                | Errors when new WordPress minor release is available; warns for major release. |

```

Installing
----------

[](#installing)

Installing this package requires WP-CLI v2.12 or greater. Update to the latest stable release with `wp cli update`.

Once you've done so, you can install the latest stable version of this package with:

```
wp package install wp-cli/doctor-command:@stable
```

To install the latest development version of this package, use the following command instead:

```
wp package install wp-cli/doctor-command:dev-main
```

Contributing
------------

[](#contributing)

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

### Reporting a bug

[](#reporting-a-bug)

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should [search existing issues](https://github.com/wp-cli/doctor-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/doctor-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).

### Creating a pull request

[](#creating-a-pull-request)

Want to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/doctor-command/issues/new) to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.

### License

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity50

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~486 days

Recently: every ~326 days

Total

8

Last Release

63d ago

Major Versions

v0.1.0 → v2.0.02018-10-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dde7f578e5530884238e7173f768ae3a890b6d66eb99262a82f2c494a1b67d4?d=identicon)[schlessera](/maintainers/schlessera)

---

Top Contributors

[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (189 commits)")[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (77 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (42 commits)")[![Sidsector9](https://avatars.githubusercontent.com/u/17757960?v=4)](https://github.com/Sidsector9 "Sidsector9 (33 commits)")[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (22 commits)")[![davegaeddert](https://avatars.githubusercontent.com/u/649496?v=4)](https://github.com/davegaeddert "davegaeddert (13 commits)")[![wojsmol](https://avatars.githubusercontent.com/u/4176111?v=4)](https://github.com/wojsmol "wojsmol (12 commits)")[![ehoanshelt](https://avatars.githubusercontent.com/u/2808532?v=4)](https://github.com/ehoanshelt "ehoanshelt (6 commits)")[![kiranpotphode](https://avatars.githubusercontent.com/u/7710204?v=4)](https://github.com/kiranpotphode "kiranpotphode (6 commits)")[![figureone](https://avatars.githubusercontent.com/u/125274?v=4)](https://github.com/figureone "figureone (3 commits)")[![miya0001](https://avatars.githubusercontent.com/u/309946?v=4)](https://github.com/miya0001 "miya0001 (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![xknown](https://avatars.githubusercontent.com/u/1081870?v=4)](https://github.com/xknown "xknown (1 commits)")[![deshabhishek007](https://avatars.githubusercontent.com/u/428211?v=4)](https://github.com/deshabhishek007 "deshabhishek007 (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![joeldcanfield](https://avatars.githubusercontent.com/u/53883478?v=4)](https://github.com/joeldcanfield "joeldcanfield (1 commits)")

---

Tags

checkclihacktoberfesthealthwordpresswp-cliwp-cli-package

### Embed Badge

![Health badge](/badges/wp-cli-doctor-command/health.svg)

```
[![Health](https://phpackages.com/badges/wp-cli-doctor-command/health.svg)](https://phpackages.com/packages/wp-cli-doctor-command)
```

###  Alternatives

[wp-cli/wp-cli-bundle

WP-CLI bundle package with default commands.

896.3M131](/packages/wp-cli-wp-cli-bundle)[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[wp-cli/i18n-command

Provides internationalization tools for WordPress projects.

11610.4M52](/packages/wp-cli-i18n-command)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[wp-cli/db-command

Performs basic database operations using credentials stored in wp-config.php.

768.0M30](/packages/wp-cli-db-command)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
