WordPress Help
Official documentation, learning resources, and contributor guides collected from WordPress.org.
-
Write a custom check to perform an arbitrary assertion
Because wp doctor checks are built on top of a foundational abstraction, it’s relatively straightforward for you to write your own custom check. The basic requirement is that you create a class extending runcommand\Doctor\Checks\Check that implements a run() method. The run() must set a status and message based on whatever procedural logic As an example,…
-
Write a check for asserting the value of a given option
One of the check types included in wp doctor is Option_Value, or the ability to assert that a given option is a specific value. The check type is in use by a couple of the default diagnostic checks, and you can use the Option_Value check type in your custom doctor.yml configuration file. As an example,…
-
Write a check for verifying contents of WordPress files
One of the check types included in wp doctor is File_Contents, or the ability to check all or a selection of WordPress files for a given regex pattern. The check type is in use by a couple of the default diagnostic checks, and you can use the File_Contents check type in your custom doctor.yml configuration…
-
Write a check for asserting the value of a given constant
One of the check types included in wp doctor is Constant_Definition, or the ability to assert that a given constant is either defined, a specific value, or falsy. The check type is in use by a couple of the default diagnostic checks, and you can use the Constant_Definition check type in your custom doctor.yml configuration…
-
Force output to a specific locale
WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ always outputs English because it doesn’t support localization. But, because WordPress supports localization, you may see non-English output when performing specific commands. For instance: $ wp theme update –all…
-
External Resources
Blog posts & tutorials scribu: A Command-Line Interface for WordPress madewithlove: WP-CLI: WordPress Command Line Tools Mika Epstein: Command Line WP Treehouse Blog: Tame WordPress from the Command Line with wp-cli Matt Wiebe: Why You Should Develop Plugins With wp-cli Torque: Using WP CLI to Set Up a Test Version of Your Site WP Bullet…
-
Customize doctor diagnostic checks
Even though wp doctor comes with a number of default diagnostic checks, it’s designed with extensibility at its coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Checks are defined at runtime, read from a doctor.yml configuration file naming each check with its options. doctor.yml format Let’s…
-
Default doctor diagnostic checks
Although it’s power comes from its ability to be customized, wp doctor includes a number of default diagnostic checks considered to be recommendations for production websites. Use wp doctor list to view these default checks: name description autoload-options-size Warns when autoloaded options size exceeds threshold of 900 kb. constant-savequeries-falsy Confirms expected state of the SAVEQUERIES…
-
Common Issues
Error: Can’t connect to the database A few possibilities: a) you’re using MAMP, but WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ is not using the MAMP PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a…
-
Check status of a given plugin
One of the check types included in wp doctor is Plugin_Status, or the ability to assert that a given pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are…