-
·
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…
-
·
Force output to a specific locale
WP-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 מעבר למצב תחזוקה… מוריד עדכונים מ-https://downloads.wordpress.org/theme/hueman.3.3.25.zip… Using cached file ‘/home/xxx/.wp-cli/cache/theme/hueman-3.3.25.zip’… פתיחת עדכון… התקנת גרסה חדשה… הסרת הגרסה הקודמת של התבנית… התבנית עודכנה בהצלחה. ביטול מצב…
-
·
Doctor Guides
Here are some helpful guides for using wp doctor: Default doctor diagnostic checks Customize doctor diagnostic checks Write a custom check to perform an arbitrary assertion Write a check for verifying contents of WordPress files Write a check for asserting the value of a given option Write a check for asserting the value of a…
-
·
Contributing
Welcome and thanks! We appreciate you taking the initiative to contribute to WP-CLI. It’s because of you, and the community around you, that WP-CLI is such a great 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…
-
·
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…
-
·
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 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,…
-
·
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 plugin should be active, installed, or uninstalled. Although the check type isn’t use by any of the default diagnostic checks, you can use the Plugin_Status check type in your custom doctor.yml configuration file. As an example,…
-
·
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,…
-
·
Common Issues
Error: Can’t connect to the database A few possibilities: a) you’re using MAMP, but WP-CLI is not using the MAMP PHP binary. You can check which PHP WP-CLI is using by running wp –info. If you need to specify an alternate PHP binary, see using a custom PHP binary. b) it’s a WordPress multisite install.…