From 2e9d68684cd4c9db12406f137ae6087f534be952 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:49:42 +0000 Subject: [PATCH 1/6] Initial plan From f414fc3bc59e52ccc13558af18c80e8f823a1c53 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:55:45 +0000 Subject: [PATCH 2/6] Add alias support to command documentation generation Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- bin/command.php | 18 ++++++++++++++++++ bin/templates/subcmd-list.mustache | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bin/command.php b/bin/command.php index 99409ee44..e39fe2939 100644 --- a/bin/command.php +++ b/bin/command.php @@ -698,6 +698,24 @@ private static function gen_cmd_pages( $cmd, $parent = [], $verbose = false ) { WP_CLI::log( 'Generated commands/' . $binding['path'] . '/' ); } + // Generate alias page if command has an alias. + if ( ! empty( $cmd['alias'] ) ) { + $alias_parent = $parent; + $alias_parent[ count( $alias_parent ) - 1 ] = $cmd['alias']; + $alias_binding = $binding; + $alias_binding['synopsis'] = implode( ' ', $alias_parent ); + $alias_binding['path'] = implode( '/', $alias_parent ); + $alias_binding['description'] .= sprintf( "\n\nThis is an alias for `wp %s`.", $binding['synopsis'] ); + $alias_path = dirname( __DIR__ ) . '/commands/' . $alias_binding['path']; + if ( ! is_dir( dirname( $alias_path ) ) ) { + mkdir( dirname( $alias_path ) ); + } + file_put_contents( "$alias_path.md", self::render( 'subcmd-list.mustache', $alias_binding ) ); + if ( $verbose ) { + WP_CLI::log( 'Generated commands/' . $alias_binding['path'] . '/ (alias)' ); + } + } + if ( ! isset( $cmd['subcommands'] ) ) { return; } diff --git a/bin/templates/subcmd-list.mustache b/bin/templates/subcmd-list.mustache index 561fd5ff9..b8afc7003 100644 --- a/bin/templates/subcmd-list.mustache +++ b/bin/templates/subcmd-list.mustache @@ -1,5 +1,7 @@ # wp {{synopsis}} -{{description}} +{{description}}{{#alias}} + +**Alias:** `{{alias}}`{{/alias}} {{{docs}}} From c9990130d06982df7db062ff83e2be21a6c77996 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:01:34 +0000 Subject: [PATCH 3/6] Improve directory creation for alias pages with recursive mode Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- bin/command.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/command.php b/bin/command.php index e39fe2939..dcd1f6eb6 100644 --- a/bin/command.php +++ b/bin/command.php @@ -707,8 +707,9 @@ private static function gen_cmd_pages( $cmd, $parent = [], $verbose = false ) { $alias_binding['path'] = implode( '/', $alias_parent ); $alias_binding['description'] .= sprintf( "\n\nThis is an alias for `wp %s`.", $binding['synopsis'] ); $alias_path = dirname( __DIR__ ) . '/commands/' . $alias_binding['path']; - if ( ! is_dir( dirname( $alias_path ) ) ) { - mkdir( dirname( $alias_path ) ); + $alias_dir = dirname( $alias_path ); + if ( ! is_dir( $alias_dir ) ) { + mkdir( $alias_dir, 0755, true ); } file_put_contents( "$alias_path.md", self::render( 'subcmd-list.mustache', $alias_binding ) ); if ( $verbose ) { From d60ef4cb228ed368963269144700d118eb3f3553 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 17 Dec 2025 17:38:41 +0100 Subject: [PATCH 4/6] Lint fixes --- bin/command.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/command.php b/bin/command.php index dcd1f6eb6..9040ab355 100644 --- a/bin/command.php +++ b/bin/command.php @@ -700,14 +700,14 @@ private static function gen_cmd_pages( $cmd, $parent = [], $verbose = false ) { // Generate alias page if command has an alias. if ( ! empty( $cmd['alias'] ) ) { - $alias_parent = $parent; + $alias_parent = $parent; $alias_parent[ count( $alias_parent ) - 1 ] = $cmd['alias']; - $alias_binding = $binding; - $alias_binding['synopsis'] = implode( ' ', $alias_parent ); - $alias_binding['path'] = implode( '/', $alias_parent ); - $alias_binding['description'] .= sprintf( "\n\nThis is an alias for `wp %s`.", $binding['synopsis'] ); - $alias_path = dirname( __DIR__ ) . '/commands/' . $alias_binding['path']; - $alias_dir = dirname( $alias_path ); + $alias_binding = $binding; + $alias_binding['synopsis'] = implode( ' ', $alias_parent ); + $alias_binding['path'] = implode( '/', $alias_parent ); + $alias_binding['description'] .= sprintf( "\n\nThis is an alias for `wp %s`.", $binding['synopsis'] ); + $alias_path = dirname( __DIR__ ) . '/commands/' . $alias_binding['path']; + $alias_dir = dirname( $alias_path ); if ( ! is_dir( $alias_dir ) ) { mkdir( $alias_dir, 0755, true ); } From 3abd0f6d942f2d7b41724a24383f4b5d8c742ae9 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 17 Dec 2025 21:34:44 +0100 Subject: [PATCH 5/6] Fix handbook manifest --- bin/handbook-manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/handbook-manifest.json b/bin/handbook-manifest.json index ecfa21e9f..c614118c0 100644 --- a/bin/handbook-manifest.json +++ b/bin/handbook-manifest.json @@ -8,8 +8,8 @@ "behat-steps": { "title": "Behat Steps", "slug": "behat-steps", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/behat-steps.md", - "parent": null + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/references\/behat-steps.md", + "parent": "references" }, "bug-reports": { "title": "Bug Reports", @@ -368,8 +368,8 @@ "internal-api": { "title": "Internal API", "slug": "internal-api", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api.md", - "parent": null + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/references\/internal-api.md", + "parent": "references" }, "philosophy": { "title": "Philosophy", From 276115e328fc76431ea26743d2f40fd76af7716a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 17 Dec 2025 21:44:28 +0100 Subject: [PATCH 6/6] Update docs for aliases --- bin/Handbook_Command.php | 4 ++ bin/commands-manifest.json | 112 +++++++++++++++++++++++++++++ commands/comment/meta/set.md | 49 +++++++++++++ commands/comment/meta/update.md | 2 + commands/core/install-network.md | 59 +++++++++++++++ commands/core/multisite-convert.md | 2 + commands/core/update.md | 2 + commands/core/upgrade.md | 78 ++++++++++++++++++++ commands/db/cli.md | 2 + commands/db/connect.md | 57 +++++++++++++++ commands/db/dump.md | 112 +++++++++++++++++++++++++++++ commands/db/export.md | 2 + commands/network/meta/set.md | 49 +++++++++++++ commands/network/meta/update.md | 2 + commands/option/set.md | 87 ++++++++++++++++++++++ commands/option/update.md | 2 + commands/plugin/update.md | 2 + commands/plugin/upgrade.md | 112 +++++++++++++++++++++++++++++ commands/post/meta/set.md | 49 +++++++++++++ commands/post/meta/update.md | 2 + commands/scaffold/_s.md | 66 +++++++++++++++++ commands/scaffold/cpt.md | 61 ++++++++++++++++ commands/scaffold/post-type.md | 2 + commands/scaffold/tax.md | 60 ++++++++++++++++ commands/scaffold/taxonomy.md | 2 + commands/scaffold/underscores.md | 2 + commands/site/meta/set.md | 49 +++++++++++++ commands/site/meta/update.md | 2 + commands/site/option/set.md | 52 ++++++++++++++ commands/site/option/update.md | 2 + commands/term/meta/set.md | 49 +++++++++++++ commands/term/meta/update.md | 2 + commands/theme/delete.md | 2 + commands/theme/uninstall.md | 48 +++++++++++++ commands/theme/update.md | 2 + commands/theme/upgrade.md | 111 ++++++++++++++++++++++++++++ commands/user/meta/set.md | 55 ++++++++++++++ commands/user/meta/update.md | 2 + 38 files changed, 1355 insertions(+) create mode 100644 commands/comment/meta/set.md create mode 100644 commands/core/install-network.md create mode 100644 commands/core/upgrade.md create mode 100644 commands/db/connect.md create mode 100644 commands/db/dump.md create mode 100644 commands/network/meta/set.md create mode 100644 commands/option/set.md create mode 100644 commands/plugin/upgrade.md create mode 100644 commands/post/meta/set.md create mode 100644 commands/scaffold/_s.md create mode 100644 commands/scaffold/cpt.md create mode 100644 commands/scaffold/tax.md create mode 100644 commands/site/meta/set.md create mode 100644 commands/site/option/set.md create mode 100644 commands/term/meta/set.md create mode 100644 commands/theme/uninstall.md create mode 100644 commands/theme/upgrade.md create mode 100644 commands/user/meta/set.md diff --git a/bin/Handbook_Command.php b/bin/Handbook_Command.php index b92f68e02..48d8145c3 100644 --- a/bin/Handbook_Command.php +++ b/bin/Handbook_Command.php @@ -711,6 +711,10 @@ private static function gen_cmd_pages( $cmd, $parent = [], $verbose = false ) { $alias_binding['description'] .= sprintf( "\n\nThis is an alias for `wp %s`.", $binding['synopsis'] ); $alias_path = dirname( __DIR__ ) . '/commands/' . $alias_binding['path']; $alias_dir = dirname( $alias_path ); + + // Don't mention alias for the alias. + unset( $alias_binding['alias'] ); + if ( ! is_dir( $alias_dir ) ) { mkdir( $alias_dir, 0755, true ); } diff --git a/bin/commands-manifest.json b/bin/commands-manifest.json index 55df419e1..03d4b77a9 100644 --- a/bin/commands-manifest.json +++ b/bin/commands-manifest.json @@ -1039,6 +1039,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/db\/columns.md", "repo_url": "https:\/\/github.com\/wp-cli\/db-command" }, + "db\/connect": { + "title": "db connect", + "slug": "connect", + "cmd_path": "db\/connect", + "parent": "db", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/db\/connect.md" + }, "db\/create": { "title": "db create", "slug": "create", @@ -1055,6 +1062,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/db\/drop.md", "repo_url": "https:\/\/github.com\/wp-cli\/db-command" }, + "db\/dump": { + "title": "db dump", + "slug": "dump", + "cmd_path": "db\/dump", + "parent": "db", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/db\/dump.md" + }, "db\/export": { "title": "db export", "slug": "export", @@ -1407,6 +1421,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/option\/set-autoload.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "option\/set": { + "title": "option set", + "slug": "set", + "cmd_path": "option\/set", + "parent": "option", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/option\/set.md" + }, "option\/update": { "title": "option update", "slug": "update", @@ -1583,6 +1604,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/plugin\/update.md", "repo_url": "https:\/\/github.com\/wp-cli\/extension-command" }, + "plugin\/upgrade": { + "title": "plugin upgrade", + "slug": "upgrade", + "cmd_path": "plugin\/upgrade", + "parent": "plugin", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/plugin\/upgrade.md" + }, "plugin\/verify-checksums": { "title": "plugin verify-checksums", "slug": "verify-checksums", @@ -1791,6 +1819,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/role\/reset.md", "repo_url": "https:\/\/github.com\/wp-cli\/role-command" }, + "scaffold\/_s": { + "title": "scaffold _s", + "slug": "_s", + "cmd_path": "scaffold\/_s", + "parent": "scaffold", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/_s.md" + }, "scaffold\/block": { "title": "scaffold block", "slug": "block", @@ -1807,6 +1842,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/child-theme.md", "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-command" }, + "scaffold\/cpt": { + "title": "scaffold cpt", + "slug": "cpt", + "cmd_path": "scaffold\/cpt", + "parent": "scaffold", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/cpt.md" + }, "scaffold\/plugin-tests": { "title": "scaffold plugin-tests", "slug": "plugin-tests", @@ -1831,6 +1873,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/post-type.md", "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-command" }, + "scaffold\/tax": { + "title": "scaffold tax", + "slug": "tax", + "cmd_path": "scaffold\/tax", + "parent": "scaffold", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/tax.md" + }, "scaffold\/taxonomy": { "title": "scaffold taxonomy", "slug": "taxonomy", @@ -2231,6 +2280,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/theme\/status.md", "repo_url": "https:\/\/github.com\/wp-cli\/extension-command" }, + "theme\/uninstall": { + "title": "theme uninstall", + "slug": "uninstall", + "cmd_path": "theme\/uninstall", + "parent": "theme", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/theme\/uninstall.md" + }, "theme\/update": { "title": "theme update", "slug": "update", @@ -2239,6 +2295,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/theme\/update.md", "repo_url": "https:\/\/github.com\/wp-cli\/extension-command" }, + "theme\/upgrade": { + "title": "theme upgrade", + "slug": "upgrade", + "cmd_path": "theme\/upgrade", + "parent": "theme", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/theme\/upgrade.md" + }, "transient\/delete": { "title": "transient delete", "slug": "delete", @@ -2823,6 +2886,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/comment\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "comment\/meta\/set": { + "title": "comment meta set", + "slug": "set", + "cmd_path": "comment\/meta\/set", + "parent": "comment\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/comment\/meta\/set.md" + }, "comment\/meta\/update": { "title": "comment meta update", "slug": "update", @@ -3175,6 +3245,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/network\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "network\/meta\/set": { + "title": "network meta set", + "slug": "set", + "cmd_path": "network\/meta\/set", + "parent": "network\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/network\/meta\/set.md" + }, "network\/meta\/update": { "title": "network meta update", "slug": "update", @@ -3263,6 +3340,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/post\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "post\/meta\/set": { + "title": "post meta set", + "slug": "set", + "cmd_path": "post\/meta\/set", + "parent": "post\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/post\/meta\/set.md" + }, "post\/meta\/update": { "title": "post meta update", "slug": "update", @@ -3351,6 +3435,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "site\/meta\/set": { + "title": "site meta set", + "slug": "set", + "cmd_path": "site\/meta\/set", + "parent": "site\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/meta\/set.md" + }, "site\/meta\/update": { "title": "site meta update", "slug": "update", @@ -3407,6 +3498,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/option\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "site\/option\/set": { + "title": "site option set", + "slug": "set", + "cmd_path": "site\/option\/set", + "parent": "site\/option", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/option\/set.md" + }, "site\/option\/update": { "title": "site option update", "slug": "update", @@ -3463,6 +3561,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/term\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "term\/meta\/set": { + "title": "term meta set", + "slug": "set", + "cmd_path": "term\/meta\/set", + "parent": "term\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/term\/meta\/set.md" + }, "term\/meta\/update": { "title": "term meta update", "slug": "update", @@ -3631,6 +3736,13 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/meta\/pluck.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "user\/meta\/set": { + "title": "user meta set", + "slug": "set", + "cmd_path": "user\/meta\/set", + "parent": "user\/meta", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/meta\/set.md" + }, "user\/meta\/update": { "title": "user meta update", "slug": "update", diff --git a/commands/comment/meta/set.md b/commands/comment/meta/set.md new file mode 100644 index 000000000..3a827ae94 --- /dev/null +++ b/commands/comment/meta/set.md @@ -0,0 +1,49 @@ +# wp comment meta set + +Update a meta field. + +This is an alias for `wp comment meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/comment/meta/update.md b/commands/comment/meta/update.md index 3e20ee6de..a114f53b5 100644 --- a/commands/comment/meta/update.md +++ b/commands/comment/meta/update.md @@ -2,6 +2,8 @@ Update a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/core/install-network.md b/commands/core/install-network.md new file mode 100644 index 000000000..c2962d039 --- /dev/null +++ b/commands/core/install-network.md @@ -0,0 +1,59 @@ +# wp core install-network + +Transforms an existing single-site installation into a multisite installation. + +This is an alias for `wp core multisite-convert`. + +Creates the multisite database tables, and adds the multisite constants to wp-config.php. + +For those using WordPress with Apache, remember to update the `.htaccess` file with the appropriate multisite rewrite rules. + +[Review the multisite documentation](https://wordpress.org/support/article/create-a-network/) for more details about how multisite works. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[\--title=<network-title>] +: The title of the new network. + +[\--base=<url-path>] +: Base path after the domain name that each site url will start with. +\--- +default: / +\--- + +[\--subdomains] +: If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'. + +[\--skip-config] +: Don't add multisite constants to wp-config.php. + +### EXAMPLES + + $ wp core multisite-convert + Set up multisite database tables. + Added multisite constants to wp-config.php. + Success: Network installed. Don't forget to set up rewrite rules. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/core/multisite-convert.md b/commands/core/multisite-convert.md index 980377a50..a8a56c778 100644 --- a/commands/core/multisite-convert.md +++ b/commands/core/multisite-convert.md @@ -2,6 +2,8 @@ Transforms an existing single-site installation into a multisite installation. +**Alias:** `install-network` + Creates the multisite database tables, and adds the multisite constants to wp-config.php. For those using WordPress with Apache, remember to update the `.htaccess` file with the appropriate multisite rewrite rules. diff --git a/commands/core/update.md b/commands/core/update.md index 3b06040b9..deb8594b0 100644 --- a/commands/core/update.md +++ b/commands/core/update.md @@ -2,6 +2,8 @@ Updates WordPress to a newer version. +**Alias:** `upgrade` + 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. diff --git a/commands/core/upgrade.md b/commands/core/upgrade.md new file mode 100644 index 000000000..473b286f0 --- /dev/null +++ b/commands/core/upgrade.md @@ -0,0 +1,78 @@ +# wp core upgrade + +Updates WordPress to a newer version. + +This is an alias for `wp core update`. + +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 + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[<zip>] +: Path to zip file to use, instead of downloading from wordpress.org. + +[\--minor] +: 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. Alternatively accepts 'nightly'. + +[\--force] +: Update even when installed WP version is greater than the requested version. + +[\--locale=<locale>] +: Select which language you want to download. + +[\--insecure] +: Retry download without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack. + +### EXAMPLES + + # Update WordPress + $ wp core update + Updating to version 4.5.2 (en_US)... + Downloading update from https://downloads.wordpress.org/release/wordpress-4.5.2-no-content.zip... + Unpacking the update... + Cleaning up files... + No files found that need cleaning up + Success: WordPress updated successfully. + + # Update WordPress using zip file. + $ wp core update ../latest.zip + Starting update... + Unpacking the update... + Success: WordPress updated successfully. + + # Update WordPress to 3.1 forcefully + $ wp core update --version=3.1 --force + Updating to version 3.1 (en_US)... + Downloading update from https://wordpress.org/wordpress-3.1.zip... + Unpacking the update... + Warning: Checksums not available for WordPress 3.1/en_US. Please cleanup files manually. + Success: WordPress updated successfully. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/db/cli.md b/commands/db/cli.md index 4e6e2a114..a223c6d9a 100644 --- a/commands/db/cli.md +++ b/commands/db/cli.md @@ -4,6 +4,8 @@ Opens a MySQL console using credentials from wp-config.php This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. +**Alias:** `connect` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/db/connect.md b/commands/db/connect.md new file mode 100644 index 000000000..936e8980e --- /dev/null +++ b/commands/db/connect.md @@ -0,0 +1,57 @@ +# wp db connect + +Opens a MySQL console using credentials from wp-config.php + +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + +This is an alias for `wp db cli`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[\--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. + +[\--dbuser=<value>] +: Username to pass to mysql. Defaults to DB_USER. + +[\--dbpass=<value>] +: Password to pass to mysql. Defaults to DB_PASSWORD. + +[\--<field>=<value>] +: Extra arguments to pass to mysql. [Refer to mysql docs](https://dev.mysql.com/doc/en/mysql-command-options.html). + +[\--defaults] +: Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration. + +### EXAMPLES + + # Open MySQL console + $ wp db cli + mysql> + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/db/dump.md b/commands/db/dump.md new file mode 100644 index 000000000..d651d4bfa --- /dev/null +++ b/commands/db/dump.md @@ -0,0 +1,112 @@ +# wp db dump + +Exports the database to a file or to STDOUT. + +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + +This is an alias for `wp db export`. + +Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. Accepts any valid `mysqldump` flags. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[<file>] +: The name of the SQL file to export. If '-', then outputs to STDOUT. If omitted, it will be '{dbname}-{Y-m-d}-{random-hash}.sql'. + +[\--dbuser=<value>] +: Username to pass to mysqldump. Defaults to DB_USER. + +[\--dbpass=<value>] +: Password to pass to mysqldump. Defaults to DB_PASSWORD. + +[\--<field>=<value>] +: Extra arguments to pass to mysqldump. [Refer to mysqldump docs](https://dev.mysql.com/doc/en/mysqldump.html#mysqldump-option-summary). + +[\--tables=<tables>] +: The comma separated list of specific tables to export. Excluding this parameter will export all tables in the database. + +[\--exclude_tables=<tables>] +: The comma separated list of specific tables that should be skipped from exporting. Excluding this parameter will export all tables in the database. + +[\--include-tablespaces] +: Skips adding the default --no-tablespaces option to mysqldump. + +[\--porcelain] +: Output filename for the exported database. + +[\--add-drop-table] +: Include a `DROP TABLE IF EXISTS` statement before each `CREATE TABLE` statement. + +[\--defaults] +: Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration. + +### EXAMPLES + + # Export database with drop query included + $ wp db export --add-drop-table + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export certain tables + $ wp db export --tables=wp_options,wp_users + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export all tables matching a wildcard + $ wp db export --tables=$(wp db tables 'wp_user*' --format=csv) + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export all tables matching prefix + $ wp db export --tables=$(wp db tables --all-tables-with-prefix --format=csv) + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export certain posts without create table statements + $ wp db export --no-create-info=true --tables=wp_posts --where="ID in (100,101,102)" + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export relating meta for certain posts without create table statements + $ wp db export --no-create-info=true --tables=wp_postmeta --where="post_id in (100,101,102)" + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Skip certain tables from the exported database + $ wp db export --exclude_tables=wp_options,wp_users + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Skip all tables matching a wildcard from the exported database + $ wp db export --exclude_tables=$(wp db tables 'wp_user*' --format=csv) + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Skip all tables matching prefix from the exported database + $ wp db export --exclude_tables=$(wp db tables --all-tables-with-prefix --format=csv) + Success: Exported to 'wordpress_dbase-db72bb5.sql'. + + # Export database to STDOUT. + $ wp db export - + -- MySQL dump 10.13 Distrib 5.7.19, for osx10.12 (x86_64) + -- + -- Host: localhost Database: wpdev + -- ------------------------------------------------------ + -- Server version 5.7.19 + ... + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/db/export.md b/commands/db/export.md index d125a2ea3..5ab0e4abf 100644 --- a/commands/db/export.md +++ b/commands/db/export.md @@ -4,6 +4,8 @@ Exports the database to a file or to STDOUT. This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. +**Alias:** `dump` + Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. Accepts any valid `mysqldump` flags. ### OPTIONS diff --git a/commands/network/meta/set.md b/commands/network/meta/set.md new file mode 100644 index 000000000..71d4fe0f5 --- /dev/null +++ b/commands/network/meta/set.md @@ -0,0 +1,49 @@ +# wp network meta set + +Update a meta field. + +This is an alias for `wp network meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/network/meta/update.md b/commands/network/meta/update.md index dd98f8350..8a0c93c70 100644 --- a/commands/network/meta/update.md +++ b/commands/network/meta/update.md @@ -2,6 +2,8 @@ Update a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/option/set.md b/commands/option/set.md new file mode 100644 index 000000000..6e19bd992 --- /dev/null +++ b/commands/option/set.md @@ -0,0 +1,87 @@ +# wp option set + +Updates an option value. + +This is an alias for `wp option update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<key> +: The name of the option to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--autoload=<autoload>] +: Requires WP 4.2. Should this option be automatically loaded. +\--- +options: + - 'on' + - 'off' + - 'yes' + - 'no' +\--- + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Update an option by reading from a file. + $ wp option update my_option < value.txt + Success: Updated 'my_option' option. + + # Update one option on multiple sites using xargs. + $ wp site list --field=url | xargs -n1 -I {} sh -c 'wp --url={} option update my_option my_value' + Success: Updated 'my_option' option. + Success: Updated 'my_option' option. + + # Update site blog name. + $ wp option update blogname "Random blog name" + Success: Updated 'blogname' option. + + # Update site blog description. + $ wp option update blogdescription "Some random blog description" + Success: Updated 'blogdescription' option. + + # Update admin email address. + $ wp option update admin_email someone@example.com + Success: Updated 'admin_email' option. + + # Set the default role. + $ wp option update default_role author + Success: Updated 'default_role' option. + + # Set the timezone string. + $ wp option update timezone_string "America/New_York" + Success: Updated 'timezone_string' option. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/option/update.md b/commands/option/update.md index 6422aa923..63e5382ec 100644 --- a/commands/option/update.md +++ b/commands/option/update.md @@ -2,6 +2,8 @@ Updates an option value. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/plugin/update.md b/commands/plugin/update.md index 1dab6855e..e29858b8f 100644 --- a/commands/plugin/update.md +++ b/commands/plugin/update.md @@ -2,6 +2,8 @@ Updates one or more plugins. +**Alias:** `upgrade` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/plugin/upgrade.md b/commands/plugin/upgrade.md new file mode 100644 index 000000000..bd9edbf8e --- /dev/null +++ b/commands/plugin/upgrade.md @@ -0,0 +1,112 @@ +# wp plugin upgrade + +Updates one or more plugins. + +This is an alias for `wp plugin update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[<plugin>...] +: One or more plugins to update. + +[\--all] +: If set, all plugins that have updates will be updated. + +[\--exclude=<name>] +: Comma separated list of plugin names that should be excluded from updating. + +[\--minor] +: Only perform updates for minor releases (e.g. from 1.3 to 1.4 instead of 2.0) + +[\--patch] +: Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4) + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - summary +\--- + +[\--version=<version>] +: If set, the plugin will be updated to the specified version. + +[\--dry-run] +: Preview which plugins would be updated. + +[\--insecure] +: Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack. + +### EXAMPLES + + $ wp plugin update bbpress --version=dev + Installing bbPress (Development Version) + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.zip... + Unpacking the package... + Installing the plugin... + Removing the old version of the plugin... + Plugin updated successfully. + Success: Updated 1 of 2 plugins. + + $ wp plugin update --all + Enabling Maintenance mode... + Downloading update from https://downloads.wordpress.org/plugin/akismet.3.1.11.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the plugin... + Plugin updated successfully. + Downloading update from https://downloads.wordpress.org/plugin/nginx-champuru.3.2.0.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the plugin... + Plugin updated successfully. + Disabling Maintenance mode... + +------------------------+-------------+-------------+---------+ + | name | old_version | new_version | status | + +------------------------+-------------+-------------+---------+ + | akismet | 3.1.3 | 3.1.11 | Updated | + | nginx-cache-controller | 3.1.1 | 3.2.0 | Updated | + +------------------------+-------------+-------------+---------+ + Success: Updated 2 of 2 plugins. + + $ wp plugin update --all --exclude=akismet + Enabling Maintenance mode... + Downloading update from https://downloads.wordpress.org/plugin/nginx-champuru.3.2.0.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the plugin... + Plugin updated successfully. + Disabling Maintenance mode... + +------------------------+-------------+-------------+---------+ + | name | old_version | new_version | status | + +------------------------+-------------+-------------+---------+ + | nginx-cache-controller | 3.1.1 | 3.2.0 | Updated | + +------------------------+-------------+-------------+---------+ + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/post/meta/set.md b/commands/post/meta/set.md new file mode 100644 index 000000000..abcde18df --- /dev/null +++ b/commands/post/meta/set.md @@ -0,0 +1,49 @@ +# wp post meta set + +Update a meta field. + +This is an alias for `wp post meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/post/meta/update.md b/commands/post/meta/update.md index 2e86a4bf4..6213f01d9 100644 --- a/commands/post/meta/update.md +++ b/commands/post/meta/update.md @@ -2,6 +2,8 @@ Update a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/scaffold/_s.md b/commands/scaffold/_s.md new file mode 100644 index 000000000..9c87a191a --- /dev/null +++ b/commands/scaffold/_s.md @@ -0,0 +1,66 @@ +# wp scaffold _s + +Generates starter code for a theme based on _s. + +This is an alias for `wp scaffold underscores`. + +See the [Underscores website](https://underscores.me/) for more details. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<slug> +: The slug for the new theme, used for prefixing functions. + +[\--activate] +: Activate the newly downloaded theme. + +[\--enable-network] +: Enable the newly downloaded theme for the entire network. + +[\--theme_name=<title>] +: What to put in the 'Theme Name:' header in 'style.css'. + +[\--author=<full-name>] +: What to put in the 'Author:' header in 'style.css'. + +[\--author_uri=<uri>] +: What to put in the 'Author URI:' header in 'style.css'. + +[\--sassify] +: Include stylesheets as SASS. + +[\--woocommerce] +: Include WooCommerce boilerplate files. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate a theme with name "Sample Theme" and author "John Doe" + $ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe" + Success: Created theme 'Sample Theme'. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/scaffold/cpt.md b/commands/scaffold/cpt.md new file mode 100644 index 000000000..6dd8bd4d2 --- /dev/null +++ b/commands/scaffold/cpt.md @@ -0,0 +1,61 @@ +# wp scaffold cpt + +Generates PHP code for registering a custom post type. + +This is an alias for `wp scaffold post-type`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<slug> +: The internal name of the post type. + +[\--label=<label>] +: The text used to translate the update messages. + +[\--textdomain=<textdomain>] +: The textdomain to use for the labels. + +[\--dashicon=<dashicon>] +: The dashicon to use in the menu. + +[\--theme] +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. + +[\--plugin=<plugin>] +: Create a file in the given plugin's directory, instead of sending to STDOUT. + +[\--raw] +: Just generate the `register_post_type()` call and nothing else. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate a 'movie' post type for the 'simple-life' theme + $ wp scaffold post-type movie --label=Movie --theme=simple-life + Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/scaffold/post-type.md b/commands/scaffold/post-type.md index 2fc57123f..d1ca9bef4 100644 --- a/commands/scaffold/post-type.md +++ b/commands/scaffold/post-type.md @@ -2,6 +2,8 @@ Generates PHP code for registering a custom post type. +**Alias:** `cpt` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/scaffold/tax.md b/commands/scaffold/tax.md new file mode 100644 index 000000000..4fdd18679 --- /dev/null +++ b/commands/scaffold/tax.md @@ -0,0 +1,60 @@ +# wp scaffold tax + +Generates PHP code for registering a custom taxonomy. + +This is an alias for `wp scaffold taxonomy`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<slug> +: The internal name of the taxonomy. + +[\--post_types=<post-types>] +: Post types to register for use with the taxonomy. + +[\--label=<label>] +: The text used to translate the update messages. + +[\--textdomain=<textdomain>] +: The textdomain to use for the labels. + +[\--theme] +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. + +[\--plugin=<plugin>] +: Create a file in the given plugin's directory, instead of sending to STDOUT. + +[\--raw] +: Just generate the `register_taxonomy()` call and nothing else. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate PHP code for registering a custom taxonomy and save in a file + $ wp scaffold taxonomy venue --post_types=event,presentation > taxonomy.php + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/scaffold/taxonomy.md b/commands/scaffold/taxonomy.md index 66458c3ed..26b2d2828 100644 --- a/commands/scaffold/taxonomy.md +++ b/commands/scaffold/taxonomy.md @@ -2,6 +2,8 @@ Generates PHP code for registering a custom taxonomy. +**Alias:** `tax` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/scaffold/underscores.md b/commands/scaffold/underscores.md index 4f72b5660..df3a80940 100644 --- a/commands/scaffold/underscores.md +++ b/commands/scaffold/underscores.md @@ -2,6 +2,8 @@ Generates starter code for a theme based on _s. +**Alias:** `_s` + See the [Underscores website](https://underscores.me/) for more details. ### OPTIONS diff --git a/commands/site/meta/set.md b/commands/site/meta/set.md new file mode 100644 index 000000000..5bdc77182 --- /dev/null +++ b/commands/site/meta/set.md @@ -0,0 +1,49 @@ +# wp site meta set + +Update a meta field. + +This is an alias for `wp site meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/site/meta/update.md b/commands/site/meta/update.md index 234338e84..5b16aacbd 100644 --- a/commands/site/meta/update.md +++ b/commands/site/meta/update.md @@ -2,6 +2,8 @@ Update a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/site/option/set.md b/commands/site/option/set.md new file mode 100644 index 000000000..41f9ed8de --- /dev/null +++ b/commands/site/option/set.md @@ -0,0 +1,52 @@ +# wp site option set + +Updates a site option. + +This is an alias for `wp site option update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<key> +: The name of the site option to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Update a site option by reading from a file + $ wp site option update my_option < value.txt + Success: Updated 'my_option' site option. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/site/option/update.md b/commands/site/option/update.md index c9fd21f3c..f140bad26 100644 --- a/commands/site/option/update.md +++ b/commands/site/option/update.md @@ -2,6 +2,8 @@ Updates a site option. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/term/meta/set.md b/commands/term/meta/set.md new file mode 100644 index 000000000..5603dbb91 --- /dev/null +++ b/commands/term/meta/set.md @@ -0,0 +1,49 @@ +# wp term meta set + +Update a meta field. + +This is an alias for `wp term meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/term/meta/update.md b/commands/term/meta/update.md index 80cb14ce9..8767c3b0d 100644 --- a/commands/term/meta/update.md +++ b/commands/term/meta/update.md @@ -2,6 +2,8 @@ Update a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/theme/delete.md b/commands/theme/delete.md index 3d3ff6322..43c0dce90 100644 --- a/commands/theme/delete.md +++ b/commands/theme/delete.md @@ -2,6 +2,8 @@ Deletes one or more themes. +**Alias:** `uninstall` + Removes the theme or themes from the filesystem. ### OPTIONS diff --git a/commands/theme/uninstall.md b/commands/theme/uninstall.md new file mode 100644 index 000000000..aeb40495a --- /dev/null +++ b/commands/theme/uninstall.md @@ -0,0 +1,48 @@ +# wp theme uninstall + +Deletes one or more themes. + +This is an alias for `wp theme delete`. + +Removes the theme or themes from the filesystem. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[<theme>...] +: One or more themes to delete. + +[\--all] +: If set, all themes will be deleted except active theme. + +[\--force] +: To delete active theme use this. + +### EXAMPLES + + $ wp theme delete twentytwelve + Deleted 'twentytwelve' theme. + Success: Deleted 1 of 1 themes. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/theme/update.md b/commands/theme/update.md index dad490633..d9d1e7aa2 100644 --- a/commands/theme/update.md +++ b/commands/theme/update.md @@ -2,6 +2,8 @@ Updates one or more themes. +**Alias:** `upgrade` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. diff --git a/commands/theme/upgrade.md b/commands/theme/upgrade.md new file mode 100644 index 000000000..111f9f049 --- /dev/null +++ b/commands/theme/upgrade.md @@ -0,0 +1,111 @@ +# wp theme upgrade + +Updates one or more themes. + +This is an alias for `wp theme update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +[<theme>...] +: One or more themes to update. + +[\--all] +: If set, all themes that have updates will be updated. + +[\--exclude=<theme-names>] +: Comma separated list of theme names that should be excluded from updating. + +[\--minor] +: Only perform updates for minor releases (e.g. from 1.3 to 1.4 instead of 2.0) + +[\--patch] +: Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4) + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - summary +\--- + +[\--version=<version>] +: If set, the theme will be updated to the specified version. + +[\--dry-run] +: Preview which themes would be updated. + +[\--insecure] +: Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack. + +### EXAMPLES + + # Update multiple themes + $ wp theme update twentyfifteen twentysixteen + Downloading update from https://downloads.wordpress.org/theme/twentyfifteen.1.5.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + Downloading update from https://downloads.wordpress.org/theme/twentysixteen.1.2.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + +---------------+-------------+-------------+---------+ + | name | old_version | new_version | status | + +---------------+-------------+-------------+---------+ + | twentyfifteen | 1.4 | 1.5 | Updated | + | twentysixteen | 1.1 | 1.2 | Updated | + +---------------+-------------+-------------+---------+ + Success: Updated 2 of 2 themes. + + # Exclude themes updates when bulk updating the themes + $ wp theme update --all --exclude=twentyfifteen + Downloading update from https://downloads.wordpress.org/theme/astra.1.0.5.1.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + Downloading update from https://downloads.wordpress.org/theme/twentyseventeen.1.2.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + +-----------------+----------+---------+----------------+ + | name | status | version | update_version | + +-----------------+----------+---------+----------------+ + | astra | inactive | 1.0.1 | 1.0.5.1 | + | twentyseventeen | inactive | 1.1 | 1.2 | + +-----------------+----------+---------+----------------+ + Success: Updated 2 of 2 themes. + + # Update all themes + $ wp theme update --all + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/user/meta/set.md b/commands/user/meta/set.md new file mode 100644 index 000000000..9f7ef42c2 --- /dev/null +++ b/commands/user/meta/set.md @@ -0,0 +1,55 @@ +# wp user meta set + +Updates a meta field. + +This is an alias for `wp user meta update`. + +### OPTIONS + +See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used. + +<user> +: The user login, user email, or user ID of the user to update metadata for. + +<key> +: The metadata key. + +<value> +: The new metadata value. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Update user meta + $ wp user meta update 123 bio "Mary is an awesome WordPress developer." + Success: Updated custom field 'bio'. + +### GLOBAL PARAMETERS + +These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress. + +| **Argument** | **Description** | +|:----------------|:-----------------------------| +| `--path=` | Path to the WordPress files. | +| `--url=` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. | +| `--ssh=[:][@][:][]` | Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "docker-compose-run", "vagrant"). | +| `--http=` | Perform operation against a remote WordPress installation over HTTP. | +| `--user=` | Set the WordPress user. | +| `--skip-plugins[=]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. | +| `--skip-themes[=]` | Skip loading all themes, or a comma-separated list of themes. | +| `--skip-packages` | Skip loading all installed packages. | +| `--require=` | Load PHP file before running the command (may be used more than once). | +| `--exec=` | Execute PHP code before running the command (may be used more than once). | +| `--context=` | Load WordPress in a given context. | +| `--[no-]color` | Whether to colorize the output. | +| `--debug[=]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. | +| `--prompt[=]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. | +| `--quiet` | Suppress informational messages. | diff --git a/commands/user/meta/update.md b/commands/user/meta/update.md index d374ec2e0..f4a7ff434 100644 --- a/commands/user/meta/update.md +++ b/commands/user/meta/update.md @@ -2,6 +2,8 @@ Updates a meta field. +**Alias:** `set` + ### OPTIONS See the [argument syntax](https://make.wordpress.org/cli/handbook/references/argument-syntax/) reference for a detailed explanation of the syntax conventions used.