diff --git a/commands/cache/add/index.md b/commands/cache/add/index.md index 0a14d1e0..72617b6a 100644 --- a/commands/cache/add/index.md +++ b/commands/cache/add/index.md @@ -25,6 +25,9 @@ be added. [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- [<expiration>] : Define how long to keep the value, in seconds. `0` means as long as possible. diff --git a/commands/cache/decr/index.md b/commands/cache/decr/index.md index ec434188..d98fe096 100644 --- a/commands/cache/decr/index.md +++ b/commands/cache/decr/index.md @@ -20,10 +20,16 @@ Errors if the value can't be decremented. : Cache key. [<offset>] -: The amount by which to decrement the item's value. Default is 1. +: The amount by which to decrement the item's value. +\--- +default: 1 +\--- [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- ### EXAMPLES diff --git a/commands/cache/delete/index.md b/commands/cache/delete/index.md index b17cfded..1a562f2d 100644 --- a/commands/cache/delete/index.md +++ b/commands/cache/delete/index.md @@ -21,6 +21,9 @@ Errors if the value can't be deleted. [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- ### EXAMPLES diff --git a/commands/cache/get/index.md b/commands/cache/get/index.md index aeaf66c3..6512625c 100644 --- a/commands/cache/get/index.md +++ b/commands/cache/get/index.md @@ -21,6 +21,9 @@ Errors if the value doesn't exist. [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +___ ### EXAMPLES diff --git a/commands/cache/incr/index.md b/commands/cache/incr/index.md index d686b843..3b0c37c0 100644 --- a/commands/cache/incr/index.md +++ b/commands/cache/incr/index.md @@ -20,10 +20,16 @@ Errors if the value can't be incremented. : Cache key. [<offset>] -: The amount by which to increment the item's value. Default is 1. +: The amount by which to increment the item's value. +\--- +default: 1 +\--- [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- ### EXAMPLES diff --git a/commands/cache/replace/index.md b/commands/cache/replace/index.md index 2e8f901e..1f4362a6 100644 --- a/commands/cache/replace/index.md +++ b/commands/cache/replace/index.md @@ -24,6 +24,9 @@ Errors if the value can't be replaced. [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- [<expiration>] : Define how long to keep the value, in seconds. `0` means as long as possible. diff --git a/commands/cache/set/index.md b/commands/cache/set/index.md index 161466bb..45778f34 100644 --- a/commands/cache/set/index.md +++ b/commands/cache/set/index.md @@ -24,6 +24,9 @@ Errors if the value can't be set. [<group>] : Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- [<expiration>] : Define how long to keep the value, in seconds. `0` means as long as possible. diff --git a/commands/core/config/index.md b/commands/core/config/index.md index e740ac7f..910214f9 100644 --- a/commands/core/config/index.md +++ b/commands/core/config/index.md @@ -62,6 +62,9 @@ default: [\--skip-check] : If set, the database connection is not checked. +[\--force] +: Overwrites existing files, if present. + ### EXAMPLES # Standard wp-config.php file diff --git a/commands/core/update/index.md b/commands/core/update/index.md index d55b9548..32cae750 100644 --- a/commands/core/update/index.md +++ b/commands/core/update/index.md @@ -14,6 +14,10 @@ display_global_parameters: true Defaults to updating WordPress to the latest version. +If you see "Error: Another update is currently in progress.", you may +need to run `wp option delete core_updater.lock` after verifying another +update isn't actually running. + ### OPTIONS [<zip>] @@ -23,7 +27,7 @@ Defaults to updating WordPress to the latest version. : Only perform updates for minor releases (e.g. update from WP 4.3 to 4.3.3 instead of 4.4.2). [\--version=<version>] -: Update to a specific version, instead of to the latest version. +: Update to a specific version, instead of to the latest version. Alternatively accepts 'nightly'. [\--force] : Update even when installed WP version is greater than the requested version. diff --git a/commands/db/cli/index.md b/commands/db/cli/index.md index 2620131f..d9d0e69b 100644 --- a/commands/db/cli/index.md +++ b/commands/db/cli/index.md @@ -12,6 +12,17 @@ display_global_parameters: true
+### OPTIONS + +[\--database=<database>] +: Use a specific database. Defaults to DB_NAME. + +[\--default-character-set=<character-set>] +: Use a specific character set. Defaults to DB_CHARSET when defined. + +[\--<field>=<value>] +: Extra arguments to pass to the MySQL executable. + ### EXAMPLES # Open MySQL console diff --git a/commands/db/tables/index.md b/commands/db/tables/index.md index 30deb893..a41bbd0c 100644 --- a/commands/db/tables/index.md +++ b/commands/db/tables/index.md @@ -42,6 +42,18 @@ options: ### EXAMPLES + # List tables for a single site, without shared tables like 'wp_users' + $ wp db tables --scope=blog --url=sub.example.com + wp_3_posts + wp_3_comments + wp_3_options + wp_3_postmeta + wp_3_terms + wp_3_term_taxonomy + wp_3_term_relationships + wp_3_termmeta + wp_3_commentmeta + # Export only tables for a single site $ wp db export --tables=$(wp db tables --url=sub.example.com --format=csv) Success: Exported to wordpress_dbase.sql diff --git a/commands/plugin/install/index.md b/commands/plugin/install/index.md index 1af62345..0289351c 100644 --- a/commands/plugin/install/index.md +++ b/commands/plugin/install/index.md @@ -69,6 +69,15 @@ for confirmation. Plugin installed successfully. Success: Installed 1 of 1 plugins. + # Update from a remote zip file + $ wp plugin install https://github.com/envato/wp-envato-market/archive/master.zip --force + Downloading install package from https://github.com/envato/wp-envato-market/archive/master.zip + Unpacking the package... + Installing the plugin... + Renamed Github-based project from 'wp-envato-market-master' to 'wp-envato-market'. + Plugin updated successfully + Success: Installed 1 of 1 plugins. + # Forcefully re-install all installed plugins $ wp plugin install $(wp plugin list --field=name) --force Installing Akismet (3.1.11) diff --git a/commands/scaffold/plugin/index.md b/commands/scaffold/plugin/index.md index 2a4b215e..50396fbf 100644 --- a/commands/scaffold/plugin/index.md +++ b/commands/scaffold/plugin/index.md @@ -64,7 +64,7 @@ default: travis options: - travis - circle - - gitlab + - gitlab \--- [\--activate] diff --git a/commands/search-replace/index.md b/commands/search-replace/index.md index 978f29da..bbd922ef 100644 --- a/commands/search-replace/index.md +++ b/commands/search-replace/index.md @@ -62,7 +62,7 @@ You might want to change this depending on your database configuration [\--skip-columns=<columns>] : Do not perform the replacement on specific columns. Use commas to -specify multiple columns. 'guid' is skipped by default. +specify multiple columns. [\--include-columns=<columns>] : Perform the replacement on specific columns. Use commas to @@ -80,8 +80,11 @@ pass --no-recurse-objects to disable. : Prints rows to the console as they're updated. [\--regex] -: Runs the search using a regular expression. Warning: search-replace -will take about 15-20x longer when using --regex. +: Runs the search using a regular expression (without delimiters). +Warning: search-replace will take about 15-20x longer when using --regex. + +[\--regex-flags=<regex-flags>] +: Pass PCRE modifiers to regex search-replace (e.g. 'i' for case-insensitivity). ### EXAMPLES @@ -91,6 +94,9 @@ will take about 15-20x longer when using --regex. # Run search/replace operation but dont save in database $ wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms --dry-run + # Run case-insensitive regex search/replace operation (slow) + $ wp search-replace '\[foo id="([0-9]+)"' '[bar id="\1"' --regex --regex-flags='i' + # Turn your production multisite database into a local dev database $ wp search-replace --url=example.com example.com example.dev 'wp_*options' wp_blogs diff --git a/commands/server/index.md b/commands/server/index.md index 3c32c1c1..7044be3f 100644 --- a/commands/server/index.md +++ b/commands/server/index.md @@ -30,7 +30,8 @@ default: 8080 \--- [\--docroot=<path>] -: The path to use as the document root. +: The path to use as the document root. If the path global parameter is +set, the default value is it. [\--config=<file>] : Configure the server with a specific .ini file. diff --git a/commands/site/index.md b/commands/site/index.md index 52ef792f..f96bd6a5 100644 --- a/commands/site/index.md +++ b/commands/site/index.md @@ -70,7 +70,7 @@ display_global_parameters: true option - Manage site options. + Manage site options in a multisite install. spam diff --git a/commands/site/list/index.md b/commands/site/list/index.md index 784dfebd..043a8f1c 100644 --- a/commands/site/list/index.md +++ b/commands/site/list/index.md @@ -21,6 +21,9 @@ display_global_parameters: true : Filter by one or more fields (see "Available Fields" section). However, 'url' isn't an available filter, because it's created from domain + path. +[\--site__in=<value>] +: Only list the sites with these blog_id values (comma-separated). + [\--field=<field>] : Prints the value of a single field for each site. diff --git a/commands/site/option/index.md b/commands/site/option/index.md index 5eb8b427..c70aa539 100644 --- a/commands/site/option/index.md +++ b/commands/site/option/index.md @@ -6,7 +6,7 @@ display_global_parameters: true [Commands](/commands/) » [site](/commands/site/) » option -`wp site option` - Manage site options. +`wp site option` - Manage site options in a multisite install. Quick links: Github issues diff --git a/commands/site/option/list/index.md b/commands/site/option/list/index.md index 095376b9..128f38ff 100644 --- a/commands/site/option/list/index.md +++ b/commands/site/option/list/index.md @@ -17,6 +17,9 @@ display_global_parameters: true [\--search=<pattern>] : Use wildcards ( * and ? ) to match option name. +[\--site_id=<id>] +: Limit options to those of a particular site id. + [\--field=<field>] : Prints the value of a single field. diff --git a/commands/theme/mod/get/index.md b/commands/theme/mod/get/index.md index 767b82eb..ff5af07b 100644 --- a/commands/theme/mod/get/index.md +++ b/commands/theme/mod/get/index.md @@ -17,6 +17,9 @@ display_global_parameters: true [<mod>...] : One or more mods to get. +[\--field=<field>] +: Returns the value of a single field. + [\--all] : List all theme mods @@ -33,7 +36,7 @@ options: ### EXAMPLES - # Get all theme mods + # Get all theme mods. $ wp theme mod get --all +------------------+---------+ | key | value | @@ -43,11 +46,15 @@ options: | main_text_color | #8224e3 | +------------------+---------+ - # Get single theme mod in JSON format + # Get single theme mod in JSON format. $ wp theme mod get background_color --format=json [{"key":"background_color","value":"dd3333"}] - # Get multiple theme mods + # Get value of a single theme mod. + $ wp theme mod get background_color --field=value + dd3333 + + # Get multiple theme mods. $ wp theme mod get background_color header_textcolor +------------------+--------+ | key | value | diff --git a/commands/user/delete/index.md b/commands/user/delete/index.md index 9e499f77..05ee4053 100644 --- a/commands/user/delete/index.md +++ b/commands/user/delete/index.md @@ -37,7 +37,7 @@ make sure to reassign their posts prior to deleting the user. Success: Removed user 123 from http://example.com # Delete all contributors and reassign their posts to user 2 - $ wp user delete $(wp user list --role=contributor --format=ids) --reassign=2 + $ wp user delete $(wp user list --role=contributor --field=ID) --reassign=2 Success: Removed user 813 from http://example.com Success: Removed user 578 from http://example.com diff --git a/index.md b/index.md index 09d06171..68516782 100644 --- a/index.md +++ b/index.md @@ -7,7 +7,7 @@ title: Command line interface for WordPress For announcements, follow [@wpcli on Twitter](https://twitter.com/wpcli) or [sign up for our email newsletter](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). [Check out the roadmap](https://wp-cli.org/docs/roadmap/) for an overview of what's planned for upcoming releases. -[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.svg?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") Quick links: [Using](#using) | [Installing](#installing) | [Support](#support) | [Extending](#extending) | [Contributing](#contributing) | [Credits](#credits) @@ -77,7 +77,7 @@ WP-CLI root dir: /home/wp-cli/.wp-cli WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/ WP-CLI global config: /home/wp-cli/.wp-cli/config.yml WP-CLI project config: -WP-CLI version: 1.0.0 +WP-CLI version: 1.1.0 ``` ### Updating