diff --git a/bin/commands-manifest.json b/bin/commands-manifest.json index 1229902a..7b5a6eb0 100644 --- a/bin/commands-manifest.json +++ b/bin/commands-manifest.json @@ -1663,38 +1663,6 @@ "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\/package-github": { - "title": "scaffold package-github", - "slug": "package-github", - "cmd_path": "scaffold\/package-github", - "parent": "scaffold", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/package-github.md", - "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-package-command" - }, - "scaffold\/package-readme": { - "title": "scaffold package-readme", - "slug": "package-readme", - "cmd_path": "scaffold\/package-readme", - "parent": "scaffold", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/package-readme.md", - "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-package-command" - }, - "scaffold\/package-tests": { - "title": "scaffold package-tests", - "slug": "package-tests", - "cmd_path": "scaffold\/package-tests", - "parent": "scaffold", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/package-tests.md", - "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-package-command" - }, - "scaffold\/package": { - "title": "scaffold package", - "slug": "package", - "cmd_path": "scaffold\/package", - "parent": "scaffold", - "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/scaffold\/package.md", - "repo_url": "https:\/\/github.com\/wp-cli\/scaffold-package-command" - }, "scaffold\/plugin-tests": { "title": "scaffold plugin-tests", "slug": "plugin-tests", @@ -1799,6 +1767,14 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/empty.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "site\/generate": { + "title": "site generate", + "slug": "generate", + "cmd_path": "site\/generate", + "parent": "site", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/site\/generate.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, "site\/list": { "title": "site list", "slug": "list", @@ -2207,6 +2183,14 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/delete.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "user\/exists": { + "title": "user exists", + "slug": "exists", + "cmd_path": "user\/exists", + "parent": "user", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/exists.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, "user\/generate": { "title": "user generate", "slug": "generate", @@ -2295,6 +2279,14 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/set-role.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "user\/signup": { + "title": "user signup", + "slug": "signup", + "cmd_path": "user\/signup", + "parent": "user", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/signup.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, "user\/spam": { "title": "user spam", "slug": "spam", @@ -3327,6 +3319,38 @@ "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/session\/list.md", "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" }, + "user\/signup\/activate": { + "title": "user signup activate", + "slug": "activate", + "cmd_path": "user\/signup\/activate", + "parent": "user\/signup", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/signup\/activate.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, + "user\/signup\/delete": { + "title": "user signup delete", + "slug": "delete", + "cmd_path": "user\/signup\/delete", + "parent": "user\/signup", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/signup\/delete.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, + "user\/signup\/get": { + "title": "user signup get", + "slug": "get", + "cmd_path": "user\/signup\/get", + "parent": "user\/signup", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/signup\/get.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, + "user\/signup\/list": { + "title": "user signup list", + "slug": "list", + "cmd_path": "user\/signup\/list", + "parent": "user\/signup", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/user\/signup\/list.md", + "repo_url": "https:\/\/github.com\/wp-cli\/entity-command" + }, "user\/term\/add": { "title": "user term add", "slug": "add", diff --git a/bin/handbook-manifest.json b/bin/handbook-manifest.json index 39823c4d..b4c97f5d 100644 --- a/bin/handbook-manifest.json +++ b/bin/handbook-manifest.json @@ -1,512 +1,512 @@ { - "bug-reports": { - "title": "Bug Reports", - "slug": "bug-reports", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/bug-reports.md", - "parent": null - }, - "code-review": { - "title": "Code Review", - "slug": "code-review", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/code-review.md", - "parent": null - }, - "commands-cookbook": { - "title": "Commands Cookbook", - "slug": "commands-cookbook", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/commands-cookbook.md", - "parent": null - }, - "committers-credo": { - "title": "Committers Credo", - "slug": "committers-credo", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/committers-credo.md", - "parent": null - }, - "common-issues": { - "title": "Common Issues", - "slug": "common-issues", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/common-issues.md", - "parent": null - }, - "config": { - "title": "Config", - "slug": "config", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/config.md", - "parent": null - }, - "contributing": { - "title": "Contributing", - "slug": "contributing", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/contributing.md", - "parent": null - }, - "contributor-day": { - "title": "WordCamp Contributor Day", - "slug": "contributor-day", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/contributor-day.md", - "parent": null - }, - "doctor-check-constant-value": { - "title": "Write a check for asserting the value of a given constant", - "slug": "doctor-check-constant-value", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-check-constant-value.md", - "parent": null - }, - "doctor-check-file-contents": { - "title": "Write a check for verifying contents of WordPress files", - "slug": "doctor-check-file-contents", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-check-file-contents.md", - "parent": null - }, - "doctor-check-option-value": { - "title": "Write a check for asserting the value of a given option", - "slug": "doctor-check-option-value", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-check-option-value.md", - "parent": null - }, - "doctor-check-plugin-status": { - "title": "Check status of a given plugin", - "slug": "doctor-check-plugin-status", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-check-plugin-status.md", - "parent": null - }, - "doctor-customize-config": { - "title": "Customize doctor diagnostic checks", - "slug": "doctor-customize-config", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-customize-config.md", - "parent": null - }, - "doctor-default-checks": { - "title": "Default doctor diagnostic checks", - "slug": "doctor-default-checks", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-default-checks.md", - "parent": null - }, - "doctor-write-custom-check": { - "title": "Write a custom check to perform an arbitrary assertion", - "slug": "doctor-write-custom-check", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor-write-custom-check.md", - "parent": null - }, - "doctor": { - "title": "Doctor Guides", - "slug": "doctor", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/doctor.md", - "parent": null - }, - "documentation-standards": { - "title": "Documentation Standards", - "slug": "documentation-standards", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/documentation-standards.md", - "parent": null - }, - "external-resources": { - "title": "External Resources", - "slug": "external-resources", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/external-resources.md", - "parent": null - }, - "force-output-specific-locale": { - "title": "Force output to a specific locale", - "slug": "force-output-specific-locale", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/force-output-specific-locale.md", - "parent": null - }, - "governance": { - "title": "Governance", - "slug": "governance", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/governance.md", - "parent": null - }, - "hack-day": { - "title": "WP-CLI Hack Day", - "slug": "hack-day", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/hack-day.md", - "parent": null - }, - "hosting-companies": { - "title": "Hosting Companies", - "slug": "hosting-companies", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/hosting-companies.md", - "parent": null - }, - "how-to-create-custom-plugins": { - "title": "", - "slug": "how-to-create-custom-plugins", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/how-to-create-custom-plugins.md", - "parent": null - }, - "how-to-install": { - "title": "How to install WordPress", - "slug": "how-to-install", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/how-to-install.md", - "parent": null - }, - "how-to-maintenance-mode": { - "title": "How to put the site in maintenance mode", - "slug": "how-to-maintenance-mode", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/how-to-maintenance-mode.md", - "parent": null - }, - "how-to-start-webserver": { - "title": "How to start the webserver", - "slug": "how-to-start-webserver", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/how-to-start-webserver.md", - "parent": null - }, - "how-to": { - "title": "How to WP-CLI", - "slug": "how-to", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/how-to.md", - "parent": null - }, - "identify-plugin-theme-conflict": { - "title": "Identify a Plugin or Theme Conflict", - "slug": "identify-plugin-theme-conflict", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/identify-plugin-theme-conflict.md", - "parent": null - }, - "implementation-details": { - "title": "Implementation Details", - "slug": "implementation-details", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/implementation-details.md", - "parent": null - }, - "index": { - "title": "Handbook", - "slug": "handbook", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/index.md", - "parent": null - }, - "installing": { - "title": "Installing", - "slug": "installing", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/installing.md", - "parent": null - }, - "internal-api": { - "title": "Internal API", - "slug": "internal-api", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api.md", - "parent": null - }, - "philosophy": { - "title": "Philosophy", - "slug": "philosophy", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/philosophy.md", - "parent": null - }, - "plugin-unit-tests": { - "title": "Plugin Integration Tests", - "slug": "plugin-unit-tests", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/plugin-unit-tests.md", - "parent": null - }, - "pull-requests": { - "title": "Pull Requests", - "slug": "pull-requests", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/pull-requests.md", - "parent": null - }, - "quick-start": { - "title": "Quick Start", - "slug": "quick-start", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/quick-start.md", - "parent": null - }, - "release-checklist": { - "title": "Release Checklist", - "slug": "release-checklist", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/release-checklist.md", - "parent": null - }, - "repository-management": { - "title": "Repository Management", - "slug": "repository-management", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/repository-management.md", - "parent": null - }, - "roadmap": { - "title": "Roadmap", - "slug": "roadmap", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/roadmap.md", - "parent": null - }, - "running-commands-remotely": { - "title": "Running Commands Remotely", - "slug": "running-commands-remotely", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/running-commands-remotely.md", - "parent": null - }, - "sharing-wp-cli-packages": { - "title": "Sharing WP-CLI Packages", - "slug": "sharing-wp-cli-packages", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/sharing-wp-cli-packages.md", - "parent": null - }, - "shell-friends": { - "title": "Shell Friends", - "slug": "shell-friends", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/shell-friends.md", - "parent": null - }, - "tools": { - "title": "Tools", - "slug": "tools", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/tools.md", - "parent": null - }, - "troubleshooting": { - "title": "Troubleshooting Guide", - "slug": "troubleshooting", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/troubleshooting.md", - "parent": null - }, - "wp-cli-add-command": { - "title": "WP_CLI::add_command()", - "slug": "wp-cli-add-command", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-add-command.md", - "parent": "internal-api" - }, - "wp-cli-add-hook": { - "title": "WP_CLI::add_hook()", - "slug": "wp-cli-add-hook", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-add-hook.md", - "parent": "internal-api" - }, - "wp-cli-add-wp-hook": { - "title": "WP_CLI::add_wp_hook()", - "slug": "wp-cli-add-wp-hook", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-add-wp-hook.md", - "parent": "internal-api" - }, - "wp-cli-colorize": { - "title": "WP_CLI::colorize()", - "slug": "wp-cli-colorize", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-colorize.md", - "parent": "internal-api" - }, - "wp-cli-confirm": { - "title": "WP_CLI::confirm()", - "slug": "wp-cli-confirm", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-confirm.md", - "parent": "internal-api" - }, - "wp-cli-debug": { - "title": "WP_CLI::debug()", - "slug": "wp-cli-debug", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-debug.md", - "parent": "internal-api" - }, - "wp-cli-do-hook": { - "title": "WP_CLI::do_hook()", - "slug": "wp-cli-do-hook", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-do-hook.md", - "parent": "internal-api" - }, - "wp-cli-error-multi-line": { - "title": "WP_CLI::error_multi_line()", - "slug": "wp-cli-error-multi-line", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-error-multi-line.md", - "parent": "internal-api" - }, - "wp-cli-error": { - "title": "WP_CLI::error()", - "slug": "wp-cli-error", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-error.md", - "parent": "internal-api" - }, - "wp-cli-get-config": { - "title": "WP_CLI::get_config()", - "slug": "wp-cli-get-config", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-get-config.md", - "parent": "internal-api" - }, - "wp-cli-get-php-binary": { - "title": "WP_CLI::get_php_binary()", - "slug": "wp-cli-get-php-binary", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-get-php-binary.md", - "parent": "internal-api" - }, - "wp-cli-halt": { - "title": "WP_CLI::halt()", - "slug": "wp-cli-halt", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-halt.md", - "parent": "internal-api" - }, - "wp-cli-has-config": { - "title": "WP_CLI::has_config()", - "slug": "wp-cli-has-config", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-has-config.md", - "parent": "internal-api" - }, - "wp-cli-launch-self": { - "title": "WP_CLI::launch_self()", - "slug": "wp-cli-launch-self", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-launch-self.md", - "parent": "internal-api" - }, - "wp-cli-launch": { - "title": "WP_CLI::launch()", - "slug": "wp-cli-launch", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-launch.md", - "parent": "internal-api" - }, - "wp-cli-line": { - "title": "WP_CLI::line()", - "slug": "wp-cli-line", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-line.md", - "parent": "internal-api" - }, - "wp-cli-log": { - "title": "WP_CLI::log()", - "slug": "wp-cli-log", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-log.md", - "parent": "internal-api" - }, - "wp-cli-read-value": { - "title": "WP_CLI::read_value()", - "slug": "wp-cli-read-value", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-read-value.md", - "parent": "internal-api" - }, - "wp-cli-run-command": { - "title": "WP_CLI::run_command()", - "slug": "wp-cli-run-command", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-run-command.md", - "parent": "internal-api" - }, - "wp-cli-runcommand": { - "title": "WP_CLI::runcommand()", - "slug": "wp-cli-runcommand", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-runcommand.md", - "parent": "internal-api" - }, - "wp-cli-success": { - "title": "WP_CLI::success()", - "slug": "wp-cli-success", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-success.md", - "parent": "internal-api" - }, - "wp-cli-utils-basename": { - "title": "WP_CLI\\Utils\\basename()", - "slug": "wp-cli-utils-basename", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-basename.md", - "parent": "internal-api" - }, - "wp-cli-utils-esc-like": { - "title": "WP_CLI\\Utils\\esc_like()", - "slug": "wp-cli-utils-esc-like", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-esc-like.md", - "parent": "internal-api" - }, - "wp-cli-utils-format-items": { - "title": "WP_CLI\\Utils\\format_items()", - "slug": "wp-cli-utils-format-items", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-format-items.md", - "parent": "internal-api" - }, - "wp-cli-utils-get-flag-value": { - "title": "WP_CLI\\Utils\\get_flag_value()", - "slug": "wp-cli-utils-get-flag-value", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-get-flag-value.md", - "parent": "internal-api" - }, - "wp-cli-utils-get-home-dir": { - "title": "WP_CLI\\Utils\\get_home_dir()", - "slug": "wp-cli-utils-get-home-dir", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-get-home-dir.md", - "parent": "internal-api" - }, - "wp-cli-utils-get-named-sem-ver": { - "title": "WP_CLI\\Utils\\get_named_sem_ver()", - "slug": "wp-cli-utils-get-named-sem-ver", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-get-named-sem-ver.md", - "parent": "internal-api" - }, - "wp-cli-utils-get-php-binary": { - "title": "WP_CLI\\Utils\\get_php_binary()", - "slug": "wp-cli-utils-get-php-binary", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-get-php-binary.md", - "parent": "internal-api" - }, - "wp-cli-utils-get-temp-dir": { - "title": "WP_CLI\\Utils\\get_temp_dir()", - "slug": "wp-cli-utils-get-temp-dir", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-get-temp-dir.md", - "parent": "internal-api" - }, - "wp-cli-utils-http-request": { - "title": "WP_CLI\\Utils\\http_request()", - "slug": "wp-cli-utils-http-request", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-http-request.md", - "parent": "internal-api" - }, - "wp-cli-utils-ispiped": { - "title": "WP_CLI\\Utils\\isPiped()", - "slug": "wp-cli-utils-ispiped", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-ispiped.md", - "parent": "internal-api" - }, - "wp-cli-utils-launch-editor-for-input": { - "title": "WP_CLI\\Utils\\launch_editor_for_input()", - "slug": "wp-cli-utils-launch-editor-for-input", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-launch-editor-for-input.md", - "parent": "internal-api" - }, - "wp-cli-utils-make-progress-bar": { - "title": "WP_CLI\\Utils\\make_progress_bar()", - "slug": "wp-cli-utils-make-progress-bar", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-make-progress-bar.md", - "parent": "internal-api" - }, - "wp-cli-utils-normalize-path": { - "title": "WP_CLI\\Utils\\normalize_path()", - "slug": "wp-cli-utils-normalize-path", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-normalize-path.md", - "parent": "internal-api" - }, - "wp-cli-utils-parse-ssh-url": { - "title": "WP_CLI\\Utils\\parse_ssh_url()", - "slug": "wp-cli-utils-parse-ssh-url", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-parse-ssh-url.md", - "parent": "internal-api" - }, - "wp-cli-utils-parse-str-to-argv": { - "title": "WP_CLI\\Utils\\parse_str_to_argv()", - "slug": "wp-cli-utils-parse-str-to-argv", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-parse-str-to-argv.md", - "parent": "internal-api" - }, - "wp-cli-utils-proc-open-compat": { - "title": "WP_CLI\\Utils\\proc_open_compat()", - "slug": "wp-cli-utils-proc-open-compat", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-proc-open-compat.md", - "parent": "internal-api" - }, - "wp-cli-utils-report-batch-operation-results": { - "title": "WP_CLI\\Utils\\report_batch_operation_results()", - "slug": "wp-cli-utils-report-batch-operation-results", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-report-batch-operation-results.md", - "parent": "internal-api" - }, - "wp-cli-utils-trailingslashit": { - "title": "WP_CLI\\Utils\\trailingslashit()", - "slug": "wp-cli-utils-trailingslashit", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-trailingslashit.md", - "parent": "internal-api" - }, - "wp-cli-utils-write-csv": { - "title": "WP_CLI\\Utils\\write_csv()", - "slug": "wp-cli-utils-write-csv", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-utils-write-csv.md", - "parent": "internal-api" - }, - "wp-cli-warning": { - "title": "WP_CLI::warning()", - "slug": "wp-cli-warning", - "markdown_source": "https://github.com/wp-cli/handbook/blob/main/internal-api/wp-cli-warning.md", - "parent": "internal-api" - } -} + "bug-reports": { + "title": "Bug Reports", + "slug": "bug-reports", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/bug-reports.md", + "parent": null + }, + "code-review": { + "title": "Code Review", + "slug": "code-review", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/code-review.md", + "parent": null + }, + "commands-cookbook": { + "title": "Commands Cookbook", + "slug": "commands-cookbook", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands-cookbook.md", + "parent": null + }, + "committers-credo": { + "title": "Committers Credo", + "slug": "committers-credo", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/committers-credo.md", + "parent": null + }, + "common-issues": { + "title": "Common Issues", + "slug": "common-issues", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/common-issues.md", + "parent": null + }, + "config": { + "title": "Config", + "slug": "config", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/config.md", + "parent": null + }, + "contributing": { + "title": "Contributing", + "slug": "contributing", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/contributing.md", + "parent": null + }, + "contributor-day": { + "title": "WordCamp Contributor Day", + "slug": "contributor-day", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/contributor-day.md", + "parent": null + }, + "doctor-check-constant-value": { + "title": "Write a check for asserting the value of a given constant", + "slug": "doctor-check-constant-value", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-check-constant-value.md", + "parent": null + }, + "doctor-check-file-contents": { + "title": "Write a check for verifying contents of WordPress files", + "slug": "doctor-check-file-contents", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-check-file-contents.md", + "parent": null + }, + "doctor-check-option-value": { + "title": "Write a check for asserting the value of a given option", + "slug": "doctor-check-option-value", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-check-option-value.md", + "parent": null + }, + "doctor-check-plugin-status": { + "title": "Check status of a given plugin", + "slug": "doctor-check-plugin-status", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-check-plugin-status.md", + "parent": null + }, + "doctor-customize-config": { + "title": "Customize doctor diagnostic checks", + "slug": "doctor-customize-config", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-customize-config.md", + "parent": null + }, + "doctor-default-checks": { + "title": "Default doctor diagnostic checks", + "slug": "doctor-default-checks", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-default-checks.md", + "parent": null + }, + "doctor-write-custom-check": { + "title": "Write a custom check to perform an arbitrary assertion", + "slug": "doctor-write-custom-check", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor-write-custom-check.md", + "parent": null + }, + "doctor": { + "title": "Doctor Guides", + "slug": "doctor", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/doctor.md", + "parent": null + }, + "documentation-standards": { + "title": "Documentation Standards", + "slug": "documentation-standards", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/documentation-standards.md", + "parent": null + }, + "external-resources": { + "title": "External Resources", + "slug": "external-resources", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/external-resources.md", + "parent": null + }, + "force-output-specific-locale": { + "title": "Force output to a specific locale", + "slug": "force-output-specific-locale", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/force-output-specific-locale.md", + "parent": null + }, + "governance": { + "title": "Governance", + "slug": "governance", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/governance.md", + "parent": null + }, + "hack-day": { + "title": "WP-CLI Hack Day", + "slug": "hack-day", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/hack-day.md", + "parent": null + }, + "hosting-companies": { + "title": "Hosting Companies", + "slug": "hosting-companies", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/hosting-companies.md", + "parent": null + }, + "how-to-create-custom-plugins": { + "title": "", + "slug": "how-to-create-custom-plugins", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/how-to-create-custom-plugins.md", + "parent": null + }, + "how-to-install": { + "title": "How to install WordPress", + "slug": "how-to-install", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/how-to-install.md", + "parent": null + }, + "how-to-maintenance-mode": { + "title": "How to put the site in maintenance mode", + "slug": "how-to-maintenance-mode", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/how-to-maintenance-mode.md", + "parent": null + }, + "how-to-start-webserver": { + "title": "How to start the webserver", + "slug": "how-to-start-webserver", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/how-to-start-webserver.md", + "parent": null + }, + "how-to": { + "title": "How to WP-CLI", + "slug": "how-to", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/how-to.md", + "parent": null + }, + "identify-plugin-theme-conflict": { + "title": "Identify a Plugin or Theme Conflict", + "slug": "identify-plugin-theme-conflict", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/identify-plugin-theme-conflict.md", + "parent": null + }, + "implementation-details": { + "title": "Implementation Details", + "slug": "implementation-details", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/implementation-details.md", + "parent": null + }, + "index": { + "title": "Handbook", + "slug": "handbook", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/index.md", + "parent": null + }, + "installing": { + "title": "Installing", + "slug": "installing", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/installing.md", + "parent": null + }, + "internal-api": { + "title": "Internal API", + "slug": "internal-api", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api.md", + "parent": null + }, + "philosophy": { + "title": "Philosophy", + "slug": "philosophy", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/philosophy.md", + "parent": null + }, + "plugin-unit-tests": { + "title": "Plugin Integration Tests", + "slug": "plugin-unit-tests", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/plugin-unit-tests.md", + "parent": null + }, + "pull-requests": { + "title": "Pull Requests", + "slug": "pull-requests", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/pull-requests.md", + "parent": null + }, + "quick-start": { + "title": "Quick Start", + "slug": "quick-start", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/quick-start.md", + "parent": null + }, + "release-checklist": { + "title": "Release Checklist", + "slug": "release-checklist", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/release-checklist.md", + "parent": null + }, + "repository-management": { + "title": "Repository Management", + "slug": "repository-management", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/repository-management.md", + "parent": null + }, + "roadmap": { + "title": "Roadmap", + "slug": "roadmap", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/roadmap.md", + "parent": null + }, + "running-commands-remotely": { + "title": "Running Commands Remotely", + "slug": "running-commands-remotely", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/running-commands-remotely.md", + "parent": null + }, + "sharing-wp-cli-packages": { + "title": "Sharing WP-CLI Packages", + "slug": "sharing-wp-cli-packages", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/sharing-wp-cli-packages.md", + "parent": null + }, + "shell-friends": { + "title": "Shell Friends", + "slug": "shell-friends", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/shell-friends.md", + "parent": null + }, + "tools": { + "title": "Tools", + "slug": "tools", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/tools.md", + "parent": null + }, + "troubleshooting": { + "title": "Troubleshooting Guide", + "slug": "troubleshooting", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/troubleshooting.md", + "parent": null + }, + "wp-cli-add-command": { + "title": "WP_CLI::add_command()", + "slug": "wp-cli-add-command", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-add-command.md", + "parent": "internal-api" + }, + "wp-cli-add-hook": { + "title": "WP_CLI::add_hook()", + "slug": "wp-cli-add-hook", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-add-hook.md", + "parent": "internal-api" + }, + "wp-cli-add-wp-hook": { + "title": "WP_CLI::add_wp_hook()", + "slug": "wp-cli-add-wp-hook", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-add-wp-hook.md", + "parent": "internal-api" + }, + "wp-cli-colorize": { + "title": "WP_CLI::colorize()", + "slug": "wp-cli-colorize", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-colorize.md", + "parent": "internal-api" + }, + "wp-cli-confirm": { + "title": "WP_CLI::confirm()", + "slug": "wp-cli-confirm", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-confirm.md", + "parent": "internal-api" + }, + "wp-cli-debug": { + "title": "WP_CLI::debug()", + "slug": "wp-cli-debug", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-debug.md", + "parent": "internal-api" + }, + "wp-cli-do-hook": { + "title": "WP_CLI::do_hook()", + "slug": "wp-cli-do-hook", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-do-hook.md", + "parent": "internal-api" + }, + "wp-cli-error-multi-line": { + "title": "WP_CLI::error_multi_line()", + "slug": "wp-cli-error-multi-line", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-error-multi-line.md", + "parent": "internal-api" + }, + "wp-cli-error": { + "title": "WP_CLI::error()", + "slug": "wp-cli-error", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-error.md", + "parent": "internal-api" + }, + "wp-cli-get-config": { + "title": "WP_CLI::get_config()", + "slug": "wp-cli-get-config", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-get-config.md", + "parent": "internal-api" + }, + "wp-cli-get-php-binary": { + "title": "WP_CLI::get_php_binary()", + "slug": "wp-cli-get-php-binary", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-get-php-binary.md", + "parent": "internal-api" + }, + "wp-cli-halt": { + "title": "WP_CLI::halt()", + "slug": "wp-cli-halt", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-halt.md", + "parent": "internal-api" + }, + "wp-cli-has-config": { + "title": "WP_CLI::has_config()", + "slug": "wp-cli-has-config", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-has-config.md", + "parent": "internal-api" + }, + "wp-cli-launch-self": { + "title": "WP_CLI::launch_self()", + "slug": "wp-cli-launch-self", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-launch-self.md", + "parent": "internal-api" + }, + "wp-cli-launch": { + "title": "WP_CLI::launch()", + "slug": "wp-cli-launch", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-launch.md", + "parent": "internal-api" + }, + "wp-cli-line": { + "title": "WP_CLI::line()", + "slug": "wp-cli-line", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-line.md", + "parent": "internal-api" + }, + "wp-cli-log": { + "title": "WP_CLI::log()", + "slug": "wp-cli-log", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-log.md", + "parent": "internal-api" + }, + "wp-cli-read-value": { + "title": "WP_CLI::read_value()", + "slug": "wp-cli-read-value", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-read-value.md", + "parent": "internal-api" + }, + "wp-cli-run-command": { + "title": "WP_CLI::run_command()", + "slug": "wp-cli-run-command", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-run-command.md", + "parent": "internal-api" + }, + "wp-cli-runcommand": { + "title": "WP_CLI::runcommand()", + "slug": "wp-cli-runcommand", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-runcommand.md", + "parent": "internal-api" + }, + "wp-cli-success": { + "title": "WP_CLI::success()", + "slug": "wp-cli-success", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-success.md", + "parent": "internal-api" + }, + "wp-cli-utils-basename": { + "title": "WP_CLI\\Utils\\basename()", + "slug": "wp-cli-utils-basename", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-basename.md", + "parent": "internal-api" + }, + "wp-cli-utils-esc-like": { + "title": "WP_CLI\\Utils\\esc_like()", + "slug": "wp-cli-utils-esc-like", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-esc-like.md", + "parent": "internal-api" + }, + "wp-cli-utils-format-items": { + "title": "WP_CLI\\Utils\\format_items()", + "slug": "wp-cli-utils-format-items", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-format-items.md", + "parent": "internal-api" + }, + "wp-cli-utils-get-flag-value": { + "title": "WP_CLI\\Utils\\get_flag_value()", + "slug": "wp-cli-utils-get-flag-value", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-get-flag-value.md", + "parent": "internal-api" + }, + "wp-cli-utils-get-home-dir": { + "title": "WP_CLI\\Utils\\get_home_dir()", + "slug": "wp-cli-utils-get-home-dir", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-get-home-dir.md", + "parent": "internal-api" + }, + "wp-cli-utils-get-named-sem-ver": { + "title": "WP_CLI\\Utils\\get_named_sem_ver()", + "slug": "wp-cli-utils-get-named-sem-ver", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-get-named-sem-ver.md", + "parent": "internal-api" + }, + "wp-cli-utils-get-php-binary": { + "title": "WP_CLI\\Utils\\get_php_binary()", + "slug": "wp-cli-utils-get-php-binary", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-get-php-binary.md", + "parent": "internal-api" + }, + "wp-cli-utils-get-temp-dir": { + "title": "WP_CLI\\Utils\\get_temp_dir()", + "slug": "wp-cli-utils-get-temp-dir", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-get-temp-dir.md", + "parent": "internal-api" + }, + "wp-cli-utils-http-request": { + "title": "WP_CLI\\Utils\\http_request()", + "slug": "wp-cli-utils-http-request", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-http-request.md", + "parent": "internal-api" + }, + "wp-cli-utils-ispiped": { + "title": "WP_CLI\\Utils\\isPiped()", + "slug": "wp-cli-utils-ispiped", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-ispiped.md", + "parent": "internal-api" + }, + "wp-cli-utils-launch-editor-for-input": { + "title": "WP_CLI\\Utils\\launch_editor_for_input()", + "slug": "wp-cli-utils-launch-editor-for-input", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-launch-editor-for-input.md", + "parent": "internal-api" + }, + "wp-cli-utils-make-progress-bar": { + "title": "WP_CLI\\Utils\\make_progress_bar()", + "slug": "wp-cli-utils-make-progress-bar", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-make-progress-bar.md", + "parent": "internal-api" + }, + "wp-cli-utils-normalize-path": { + "title": "WP_CLI\\Utils\\normalize_path()", + "slug": "wp-cli-utils-normalize-path", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-normalize-path.md", + "parent": "internal-api" + }, + "wp-cli-utils-parse-ssh-url": { + "title": "WP_CLI\\Utils\\parse_ssh_url()", + "slug": "wp-cli-utils-parse-ssh-url", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-parse-ssh-url.md", + "parent": "internal-api" + }, + "wp-cli-utils-parse-str-to-argv": { + "title": "WP_CLI\\Utils\\parse_str_to_argv()", + "slug": "wp-cli-utils-parse-str-to-argv", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-parse-str-to-argv.md", + "parent": "internal-api" + }, + "wp-cli-utils-proc-open-compat": { + "title": "WP_CLI\\Utils\\proc_open_compat()", + "slug": "wp-cli-utils-proc-open-compat", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-proc-open-compat.md", + "parent": "internal-api" + }, + "wp-cli-utils-report-batch-operation-results": { + "title": "WP_CLI\\Utils\\report_batch_operation_results()", + "slug": "wp-cli-utils-report-batch-operation-results", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-report-batch-operation-results.md", + "parent": "internal-api" + }, + "wp-cli-utils-trailingslashit": { + "title": "WP_CLI\\Utils\\trailingslashit()", + "slug": "wp-cli-utils-trailingslashit", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-trailingslashit.md", + "parent": "internal-api" + }, + "wp-cli-utils-write-csv": { + "title": "WP_CLI\\Utils\\write_csv()", + "slug": "wp-cli-utils-write-csv", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-utils-write-csv.md", + "parent": "internal-api" + }, + "wp-cli-warning": { + "title": "WP_CLI::warning()", + "slug": "wp-cli-warning", + "markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/internal-api\/wp-cli-warning.md", + "parent": "internal-api" + } +} \ No newline at end of file diff --git a/commands/cli.md b/commands/cli.md index e13fed2f..05053e16 100644 --- a/commands/cli.md +++ b/commands/cli.md @@ -2,6 +2,8 @@ Reviews current WP-CLI info, checks for updates, or views defined aliases. +Unless overridden, these commands run on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Display the version currently installed. diff --git a/commands/cli/alias.md b/commands/cli/alias.md index 385a21c3..e597f278 100644 --- a/commands/cli/alias.md +++ b/commands/cli/alias.md @@ -2,6 +2,8 @@ Retrieves, sets and updates aliases for WordPress Installations. +Unless overridden, these commands run on the `before_wp_load` hook, just before the WP load process begins. + Aliases are shorthand references to WordPress installs. For instance, `@dev` could refer to a development install and `@prod` could refer to a production install. This command gives you and option to add, update and delete, the registered aliases you have available. ### EXAMPLES diff --git a/commands/cli/alias/add.md b/commands/cli/alias/add.md index 7ebb62c7..1cf68623 100644 --- a/commands/cli/alias/add.md +++ b/commands/cli/alias/add.md @@ -2,6 +2,8 @@ Creates an alias. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <key> diff --git a/commands/cli/alias/delete.md b/commands/cli/alias/delete.md index fec70236..463b0211 100644 --- a/commands/cli/alias/delete.md +++ b/commands/cli/alias/delete.md @@ -2,6 +2,8 @@ Deletes an alias. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <key> diff --git a/commands/cli/alias/get.md b/commands/cli/alias/get.md index f496e3cc..87bcb2b3 100644 --- a/commands/cli/alias/get.md +++ b/commands/cli/alias/get.md @@ -2,6 +2,8 @@ Gets the value for an alias. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <key> diff --git a/commands/cli/alias/is-group.md b/commands/cli/alias/is-group.md index 826939c0..c24d743f 100644 --- a/commands/cli/alias/is-group.md +++ b/commands/cli/alias/is-group.md @@ -2,6 +2,8 @@ Check whether an alias is a group. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <key> diff --git a/commands/cli/alias/list.md b/commands/cli/alias/list.md index b3462fef..c3120081 100644 --- a/commands/cli/alias/list.md +++ b/commands/cli/alias/list.md @@ -2,6 +2,8 @@ Lists available WP-CLI aliases. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [\--format=<format>] diff --git a/commands/cli/alias/update.md b/commands/cli/alias/update.md index c72145c5..9aefb7e9 100644 --- a/commands/cli/alias/update.md +++ b/commands/cli/alias/update.md @@ -2,6 +2,8 @@ Updates an alias. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <key> diff --git a/commands/cli/cache.md b/commands/cli/cache.md index c2c6fd3e..cd605e69 100644 --- a/commands/cli/cache.md +++ b/commands/cli/cache.md @@ -2,6 +2,8 @@ Manages the internal WP-CLI cache,. +Unless overridden, these commands run on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Remove all cached files. diff --git a/commands/cli/cache/clear.md b/commands/cli/cache/clear.md index cb46355a..32f952e7 100644 --- a/commands/cli/cache/clear.md +++ b/commands/cli/cache/clear.md @@ -2,6 +2,8 @@ Clears the internal cache. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES $ wp cli cache clear diff --git a/commands/cli/cache/prune.md b/commands/cli/cache/prune.md index 81eca834..5b9744a8 100644 --- a/commands/cli/cache/prune.md +++ b/commands/cli/cache/prune.md @@ -2,6 +2,8 @@ Prunes the internal cache. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Removes all cached files except for the newest version of each one. ### EXAMPLES diff --git a/commands/cli/check-update.md b/commands/cli/check-update.md index f28bb846..305be948 100644 --- a/commands/cli/check-update.md +++ b/commands/cli/check-update.md @@ -2,7 +2,9 @@ Checks to see if there is a newer version of WP-CLI available. -Queries the Github releases API. Returns available versions if there are updates available, or success message if using the latest release. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + +Queries the GitHub releases API. Returns available versions if there are updates available, or success message if using the latest release. ### OPTIONS diff --git a/commands/cli/cmd-dump.md b/commands/cli/cmd-dump.md index c940c0d2..0ef28816 100644 --- a/commands/cli/cmd-dump.md +++ b/commands/cli/cmd-dump.md @@ -2,6 +2,8 @@ Dumps the list of installed commands, as JSON. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Dump the list of installed commands. diff --git a/commands/cli/completions.md b/commands/cli/completions.md index ef4b4886..e9159c74 100644 --- a/commands/cli/completions.md +++ b/commands/cli/completions.md @@ -2,6 +2,8 @@ Generates tab completion strings. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS \--line=<line> diff --git a/commands/cli/has-command.md b/commands/cli/has-command.md index ea1876c4..875f120d 100644 --- a/commands/cli/has-command.md +++ b/commands/cli/has-command.md @@ -20,6 +20,14 @@ This commands checks if a command is registered with WP-CLI. If the command is f $ echo $? 1 + # Install a WP-CLI package if not already installed + $ if ! $(wp cli has-command doctor); then wp package install wp-cli/doctor-command; fi + Installing package wp-cli/doctor-command (dev-main || dev-master || dev-trunk) + Updating /home/person/.wp-cli/packages/composer.json to require the package... + Using Composer to install the package... + --- + Success: Package installed. + ### 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. diff --git a/commands/cli/info.md b/commands/cli/info.md index d4f92f92..2aeb85b9 100644 --- a/commands/cli/info.md +++ b/commands/cli/info.md @@ -2,6 +2,8 @@ Prints various details about the WP-CLI environment. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Helpful for diagnostic purposes, this command shares: * OS information. @@ -14,7 +16,7 @@ Helpful for diagnostic purposes, this command shares: * WP-CLI project config: where the project config YAML file is located. * WP-CLI version: currently installed version. -See [config docs](https://wp-cli.org/config/) for more details on global and project config YAML files. +See [config docs](https://make.wordpress.org/cli/handbook/references/config/) for more details on global and project config YAML files. ### OPTIONS diff --git a/commands/cli/param-dump.md b/commands/cli/param-dump.md index 1f35cc5f..ea857e24 100644 --- a/commands/cli/param-dump.md +++ b/commands/cli/param-dump.md @@ -2,6 +2,8 @@ Dumps the list of global parameters, as JSON or in var_export format. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [\--with-values] diff --git a/commands/cli/update.md b/commands/cli/update.md index 0f0db8f2..1bc31201 100644 --- a/commands/cli/update.md +++ b/commands/cli/update.md @@ -2,6 +2,8 @@ Updates WP-CLI to the latest release. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Default behavior is to check the releases API for the newest stable version, and prompt if one is available. Use `--stable` to install or reinstall the latest stable version. diff --git a/commands/cli/version.md b/commands/cli/version.md index f05ae723..3cc39bc9 100644 --- a/commands/cli/version.md +++ b/commands/cli/version.md @@ -2,6 +2,8 @@ Prints WP-CLI version. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Display CLI version. diff --git a/commands/comment.md b/commands/comment.md index 50f46d41..8b169998 100644 --- a/commands/comment.md +++ b/commands/comment.md @@ -16,9 +16,9 @@ Creates, updates, deletes, and moderates comments. $ wp comment delete 1337 --force Success: Deleted comment 1337. - # Delete all spam comments. + # Trash all spam comments. $ wp comment delete $(wp comment list --status=spam --format=ids) - Success: Deleted comment 264. - Success: Deleted comment 262. + Success: Trashed comment 264. + Success: Trashed comment 262. diff --git a/commands/config.md b/commands/config.md index c0c90511..10bcfafe 100644 --- a/commands/config.md +++ b/commands/config.md @@ -2,6 +2,56 @@ Generates and reads the wp-config.php file. +### EXAMPLES + # Create standard wp-config.php file. + $ wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO + Success: Generated 'wp-config.php' file. + + # List constants and variables defined in wp-config.php file. + $ wp config list + +------------------+------------------------------------------------------------------+----------+ + | key | value | type | + +------------------+------------------------------------------------------------------+----------+ + | table_prefix | wp_ | variable | + | DB_NAME | wp_cli_test | constant | + | DB_USER | root | constant | + | DB_PASSWORD | root | constant | + | AUTH_KEY | r6+@shP1yO&$)1gdu.hl[/j;7Zrvmt~o;#WxSsa0mlQOi24j2cR,7i+QM/#7S:o^ | constant | + | SECURE_AUTH_KEY | iO-z!_m--YH$Tx2tf/&V,YW*13Z_HiRLqi)d?$o-tMdY+82pK$`T.NYW~iTLW;xp | constant | + +------------------+------------------------------------------------------------------+----------+ + + # Get wp-config.php file path. + $ wp config path + /home/person/htdocs/project/wp-config.php + + # Get the table_prefix as defined in wp-config.php file. + $ wp config get table_prefix + wp_ + + # Set the WP_DEBUG constant to true. + $ wp config set WP_DEBUG true --raw + Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with the raw value 'true'. + + # Delete the COOKIE_DOMAIN constant from the wp-config.php file. + $ wp config delete COOKIE_DOMAIN + Success: Deleted the constant 'COOKIE_DOMAIN' from the 'wp-config.php' file. + + # Launch system editor to edit wp-config.php file. + $ wp config edit + + # Check whether the DB_PASSWORD constant exists in the wp-config.php file. + $ wp config has DB_PASSWORD + $ echo $? + 0 + + # Assert if MULTISITE is true. + $ wp config is-true MULTISITE + $ echo $? + 0 + + # Get new salts for your wp-config.php file. + $ wp config shuffle-salts + Success: Shuffled the salt keys. diff --git a/commands/config/delete.md b/commands/config/delete.md index 2804ed04..27cc020f 100644 --- a/commands/config/delete.md +++ b/commands/config/delete.md @@ -2,6 +2,8 @@ Deletes a specific constant or variable from the wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <name> @@ -24,6 +26,7 @@ options: # Delete the COOKIE_DOMAIN constant from the wp-config.php file. $ wp config delete COOKIE_DOMAIN + Success: Deleted the constant 'COOKIE_DOMAIN' from the 'wp-config.php' file. ### GLOBAL PARAMETERS diff --git a/commands/config/edit.md b/commands/config/edit.md index 5db735e0..cf5a0c8d 100644 --- a/commands/config/edit.md +++ b/commands/config/edit.md @@ -2,6 +2,8 @@ Launches system editor to edit the wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [\--config-file=<path>] diff --git a/commands/config/get.md b/commands/config/get.md index 8a430d8a..0a3ee6d5 100644 --- a/commands/config/get.md +++ b/commands/config/get.md @@ -2,6 +2,8 @@ Gets the value of a specific constant or variable defined in wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <name> diff --git a/commands/config/has.md b/commands/config/has.md index 11513f01..fed64136 100644 --- a/commands/config/has.md +++ b/commands/config/has.md @@ -2,6 +2,8 @@ Checks whether a specific constant or variable exists in the wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <name> diff --git a/commands/config/is-true.md b/commands/config/is-true.md index 01dfc33a..3fda2e23 100644 --- a/commands/config/is-true.md +++ b/commands/config/is-true.md @@ -2,6 +2,8 @@ Determines whether value of a specific defined constant or variable is truthy. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + This determination is made by evaluating the retrieved value via boolval(). ### OPTIONS diff --git a/commands/config/list.md b/commands/config/list.md index 30759284..a5caccdf 100644 --- a/commands/config/list.md +++ b/commands/config/list.md @@ -2,6 +2,8 @@ Lists variables, constants, and file includes defined in wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [<filter>...] diff --git a/commands/config/path.md b/commands/config/path.md index 6eeeb22e..58265bce 100644 --- a/commands/config/path.md +++ b/commands/config/path.md @@ -2,6 +2,8 @@ Gets the path to wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Get wp-config.php file path diff --git a/commands/config/set.md b/commands/config/set.md index eabfe501..17a6f35c 100644 --- a/commands/config/set.md +++ b/commands/config/set.md @@ -2,6 +2,8 @@ Sets the value of a specific constant or variable defined in wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <name> @@ -48,6 +50,7 @@ options: # Set the WP_DEBUG constant to true. $ wp config set WP_DEBUG true --raw + Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with the raw value 'true'. ### GLOBAL PARAMETERS diff --git a/commands/config/shuffle-salts.md b/commands/config/shuffle-salts.md index 499fd063..72c8bd1e 100644 --- a/commands/config/shuffle-salts.md +++ b/commands/config/shuffle-salts.md @@ -2,6 +2,8 @@ Refreshes the salts defined in the wp-config.php file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [<keys>...] @@ -24,6 +26,7 @@ Refreshes the salts defined in the wp-config.php file. # Add a cache key salt to the wp-config.php file $ wp config shuffle-salts WP_CACHE_KEY_SALT --force + Success: Shuffled the salt keys. ### GLOBAL PARAMETERS diff --git a/commands/core/download.md b/commands/core/download.md index e935287e..1a2ce5fe 100644 --- a/commands/core/download.md +++ b/commands/core/download.md @@ -2,6 +2,8 @@ Downloads core WordPress files. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Downloads and extracts WordPress core files to the specified path. Uses current directory when no path is specified. Downloaded build is verified to have the correct md5 and then cached to the local filesystem. Subsequent uses of command will use the local cache if it still exists. ### OPTIONS diff --git a/commands/core/is-installed.md b/commands/core/is-installed.md index 1cc61325..f22aed5e 100644 --- a/commands/core/is-installed.md +++ b/commands/core/is-installed.md @@ -4,19 +4,21 @@ Checks if WordPress is installed. Determines whether WordPress is installed by checking if the standard database tables are installed. Doesn't produce output; uses exit codes to communicate whether WordPress is installed. +### OPTIONS + [\--network] : Check if this is a multisite installation. ### EXAMPLES - # Bash script for checking if WordPress is not installed + # Bash script for checking if WordPress is not installed. if ! wp core is-installed 2>/dev/null; then # WP is not installed. Let's try installing it. wp core install fi - # Bash script for checking if WordPress is installed, with fallback + # Bash script for checking if WordPress is installed, with fallback. if wp core is-installed 2>/dev/null; then # WP is installed. Let's do some things we should only do in a confirmed WP environment. diff --git a/commands/core/update-db.md b/commands/core/update-db.md index b28d6b69..7f695bee 100644 --- a/commands/core/update-db.md +++ b/commands/core/update-db.md @@ -2,6 +2,8 @@ Runs the WordPress database update procedure. +### OPTIONS + [\--network] : Update databases for all sites on a network @@ -10,14 +12,14 @@ Runs the WordPress database update procedure. ### EXAMPLES - # Update the WordPress database + # Update the WordPress database. $ wp core update-db Success: WordPress database upgraded successfully from db version 36686 to 35700. - # Update databases for all sites on a network + # Update databases for all sites on a network. $ wp core update-db --network WordPress database upgraded successfully from db version 35700 to 29630 on example.com/ - Success: WordPress database upgraded on 123/123 sites + Success: WordPress database upgraded on 123/123 sites. ### GLOBAL PARAMETERS diff --git a/commands/core/update.md b/commands/core/update.md index f2249def..4ee85c65 100644 --- a/commands/core/update.md +++ b/commands/core/update.md @@ -37,15 +37,10 @@ If you see "Error: Another update is currently in progress.", you may need to ru No files found that need cleaning up Success: WordPress updated successfully. - # Update WordPress to latest version of 3.8 release - $ wp core update --version=3.8 ../latest.zip - Updating to version 3.8 ()... + # Update WordPress using zip file. + $ wp core update ../latest.zip + Starting update... Unpacking the update... - Cleaning up files... - File removed: wp-admin/js/tags-box.js - ... - File removed: wp-admin/js/updates.min. - 377 files cleaned up Success: WordPress updated successfully. # Update WordPress to 3.1 forcefully diff --git a/commands/core/verify-checksums.md b/commands/core/verify-checksums.md index 915fa4c7..7908a87f 100644 --- a/commands/core/verify-checksums.md +++ b/commands/core/verify-checksums.md @@ -2,6 +2,8 @@ Verifies WordPress files against WordPress.org's checksums. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Downloads md5 checksums for the current version from WordPress.org, and compares those checksums against the currently installed files. For security, avoids loading WordPress when verifying checksums. diff --git a/commands/core/version.md b/commands/core/version.md index 91384875..a49f1e4f 100644 --- a/commands/core/version.md +++ b/commands/core/version.md @@ -2,6 +2,8 @@ Displays the WordPress version. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [\--extra] diff --git a/commands/cron/event.md b/commands/cron/event.md index 315f1883..bee7a6c9 100644 --- a/commands/cron/event.md +++ b/commands/cron/event.md @@ -10,11 +10,13 @@ Schedules, runs, and deletes WP-Cron events. # Run all cron events due right now $ wp cron event run --due-now + Executed the cron event 'cron_test_1' in 0.01s. + Executed the cron event 'cron_test_2' in 0.006s. Success: Executed a total of 2 cron events. # Delete all scheduled cron events for the given hook $ wp cron event delete cron_test - Success: Deleted 2 instances of the cron event 'cron_test'. + Success: Deleted a total of 2 cron events. # List scheduled cron events in JSON $ wp cron event list --fields=hook,next_run --format=json diff --git a/commands/cron/event/delete.md b/commands/cron/event/delete.md index cbdc6e96..c578e27c 100644 --- a/commands/cron/event/delete.md +++ b/commands/cron/event/delete.md @@ -4,14 +4,23 @@ Deletes all scheduled cron events for the given hook. ### OPTIONS -<hook> -: The hook name. +[<hook>...] +: One or more hooks to delete. + +[\--due-now] +: Delete all hooks due right now. + +[\--exclude=<hooks>] +: Comma-separated list of hooks to exclude. + +[\--all] +: Delete all hooks. ### EXAMPLES # Delete all scheduled cron events for the given hook $ wp cron event delete cron_test - Success: Deleted 2 instances of the cron event 'cron_test'. + Success: Deleted a total of 2 cron events. ### GLOBAL PARAMETERS diff --git a/commands/cron/event/run.md b/commands/cron/event/run.md index 55322178..08b6318d 100644 --- a/commands/cron/event/run.md +++ b/commands/cron/event/run.md @@ -20,6 +20,8 @@ Runs the next scheduled cron event for the given hook. # Run all cron events due right now $ wp cron event run --due-now + Executed the cron event 'cron_test_1' in 0.01s. + Executed the cron event 'cron_test_2' in 0.006s. Success: Executed a total of 2 cron events. ### GLOBAL PARAMETERS diff --git a/commands/cron/event/unschedule.md b/commands/cron/event/unschedule.md index 0644314a..5bfffa15 100644 --- a/commands/cron/event/unschedule.md +++ b/commands/cron/event/unschedule.md @@ -11,7 +11,7 @@ Unschedules all cron events for a given hook. # Unschedule a cron event on given hook. $ wp cron event unschedule cron_test - Success: Unscheduled 2 events with hook 'cron_test'. + Success: Unscheduled 2 events for hook 'cron_test'. ### GLOBAL PARAMETERS diff --git a/commands/db.md b/commands/db.md index 9d11b8ad..7c99c4cf 100644 --- a/commands/db.md +++ b/commands/db.md @@ -2,6 +2,8 @@ Performs basic database operations using credentials stored in wp-config.php. +Unless overridden, these commands run on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + ### EXAMPLES # Create a new database. diff --git a/commands/db/check.md b/commands/db/check.md index aed93d73..ad6793ad 100644 --- a/commands/db/check.md +++ b/commands/db/check.md @@ -2,6 +2,8 @@ Checks the current status of the database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `mysqlcheck` utility with `--check` using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. [See docs](http://dev.mysql.com/doc/refman/5.7/en/check-table.html) for more details on the `CHECK TABLE` statement. diff --git a/commands/db/cli.md b/commands/db/cli.md index 811ebe78..0082f61e 100644 --- a/commands/db/cli.md +++ b/commands/db/cli.md @@ -2,6 +2,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. + ### OPTIONS [\--database=<database>] diff --git a/commands/db/create.md b/commands/db/create.md index 769b74d5..d040360f 100644 --- a/commands/db/create.md +++ b/commands/db/create.md @@ -2,6 +2,8 @@ Creates a new database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `CREATE_DATABASE` SQL statement using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. ### OPTIONS diff --git a/commands/db/drop.md b/commands/db/drop.md index a1dc1d36..e58f6176 100644 --- a/commands/db/drop.md +++ b/commands/db/drop.md @@ -2,6 +2,8 @@ Deletes the existing database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `DROP_DATABASE` SQL statement using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. ### OPTIONS diff --git a/commands/db/export.md b/commands/db/export.md index 16b70fc2..cf681931 100644 --- a/commands/db/export.md +++ b/commands/db/export.md @@ -2,6 +2,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. + 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/db/import.md b/commands/db/import.md index 634fc86d..8658fa1e 100644 --- a/commands/db/import.md +++ b/commands/db/import.md @@ -2,6 +2,8 @@ Imports a database from a file or from STDIN. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs SQL queries using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. This does not create database by itself and only performs whatever tasks are defined in the SQL. ### OPTIONS diff --git a/commands/db/optimize.md b/commands/db/optimize.md index 9cc8de87..8f619c2f 100644 --- a/commands/db/optimize.md +++ b/commands/db/optimize.md @@ -2,6 +2,8 @@ Optimizes the database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `mysqlcheck` utility with `--optimize=true` using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. [See docs](http://dev.mysql.com/doc/refman/5.7/en/optimize-table.html) for more details on the `OPTIMIZE TABLE` statement. diff --git a/commands/db/query.md b/commands/db/query.md index 6da0a455..67ea0c14 100644 --- a/commands/db/query.md +++ b/commands/db/query.md @@ -2,6 +2,8 @@ Executes a SQL query against the database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Executes an arbitrary SQL query using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. @@ -60,6 +62,27 @@ Use the `--skip-column-names` MySQL argument to exclude the headers from a SELEC | 2 | home | http://wordpress-develop.dev | yes | +---+------+------------------------------+-----+ +### MULTISITE USAGE + +Please note that the global `--url` parameter will have no effect on this command. In order to query for data in a site other than your primary site, you will need to manually modify the table names to use the prefix that includes the site's ID. + +For example, to get the `home` option for your second site, modify the example above like so: + + $ wp db query 'SELECT option_value FROM wp_2_options WHERE option_name="home"' --skip-column-names + +----------------------+ + | https://example2.com | + +----------------------+ + +To confirm the ID for the site you want to query, you can use the `wp site list` command: + + # wp site list --fields=blog_id,url + +---------+-----------------------+ + | blog_id | url | + +---------+-----------------------+ + | 1 | https://example1.com/ | + | 2 | https://example2.com/ | + +---------+-----------------------+ + ### 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. diff --git a/commands/db/repair.md b/commands/db/repair.md index 93d628dc..e10dcc01 100644 --- a/commands/db/repair.md +++ b/commands/db/repair.md @@ -2,6 +2,8 @@ Repairs the database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `mysqlcheck` utility with `--repair=true` using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. [See docs](http://dev.mysql.com/doc/refman/5.7/en/repair-table.html) for more details on the `REPAIR TABLE` statement. diff --git a/commands/db/reset.md b/commands/db/reset.md index 551d2cdf..77660a1f 100644 --- a/commands/db/reset.md +++ b/commands/db/reset.md @@ -2,6 +2,8 @@ Removes all tables from the database. +This command runs on the `after_wp_config_load` hook, after wp-config.php has been loaded into scope. + Runs `DROP_DATABASE` and `CREATE_DATABASE` SQL statements using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php. ### OPTIONS diff --git a/commands/db/search.md b/commands/db/search.md index 64c49075..2441b9bb 100644 --- a/commands/db/search.md +++ b/commands/db/search.md @@ -65,6 +65,12 @@ default: 40 [\--match_color=<color_code>] : Percent color code to use for the match (unless both before and after context are 0, when no color code is used). For a list of available percent color codes, see below. Default '%3%k' (black on a mustard background). +[\--fields=<fields>] +: Get a specific subset of the fields. + +[\--format=<format>] +: Render output in a particular format. + The percent color codes available are: | Code | Color @@ -133,6 +139,21 @@ They can be concatenated. For instance, the default match color of black on a mu # SQL search and delete records from database table 'wp_options' where 'option_name' match 'foo' wp db query "DELETE from wp_options where option_id in ($(wp db query "SELECT GROUP_CONCAT(option_id SEPARATOR ',') from wp_options where option_name like '%foo%';" --silent --skip-column-names))" + # Search for a string and print the result as a table + $ wp db search https://localhost:8889 --format=table --fields=table,column,match + +------------+--------------+-----------------------------+ + | table | column | match | + +------------+--------------+-----------------------------+ + | wp_options | option_value | https://localhost:8889 | + | wp_options | option_value | https://localhost:8889 | + | wp_posts | guid | https://localhost:8889/?p=1 | + | wp_users | user_url | https://localhost:8889 | + +------------+--------------+-----------------------------+ + + # Search for a string and get only the IDs (only works for a single table) + $ wp db search https://localhost:8889 wp_options --format=ids + 1 2 + ### 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. diff --git a/commands/dist-archive.md b/commands/dist-archive.md index 7d5eeca4..9061eeb8 100644 --- a/commands/dist-archive.md +++ b/commands/dist-archive.md @@ -2,6 +2,8 @@ Create a distribution archive based on a project's .distignore file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + For a plugin in a directory 'wp-content/plugins/hello-world', this command creates a distribution archive 'wp-content/plugins/hello-world.zip'. You can specify files or directories you'd like to exclude from the archive with a .distignore file in your project repository: diff --git a/commands/embed.md b/commands/embed.md index 56e076a5..5e378132 100644 --- a/commands/embed.md +++ b/commands/embed.md @@ -2,6 +2,33 @@ Inspects oEmbed providers, clears embed cache, and more. +### EXAMPLES + # Get embed HTML for a given URL. + $ wp embed fetch https://www.youtube.com/watch?v=dQw4w9WgXcQ + <iframe width="525" height="295" src="https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed" ... + + # Find cache post ID for a given URL. + $ wp embed cache find https://www.youtube.com/watch?v=dQw4w9WgXcQ --width=500 + 123 + + # List format,endpoint fields of available providers. + $ wp embed provider list + +------------------------------+-----------------------------------------+ + | format | endpoint | + +------------------------------+-----------------------------------------+ + | #https?://youtu\.be/.*#i | https://www.youtube.com/oembed | + | #https?://flic\.kr/.*#i | https://www.flickr.com/services/oembed/ | + | #https?://wordpress\.tv/.*#i | https://wordpress.tv/oembed/ | + + # List id,regex,priority fields of available handlers. + $ wp embed handler list --fields=priority,id + +----------+-------------------+ + | priority | id | + +----------+-------------------+ + | 10 | youtube_embed_url | + | 9999 | audio | + | 9999 | video | + +----------+-------------------+ diff --git a/commands/embed/cache.md b/commands/embed/cache.md index 7008a6ec..8d2a1967 100644 --- a/commands/embed/cache.md +++ b/commands/embed/cache.md @@ -2,6 +2,18 @@ Finds, triggers, and deletes oEmbed caches. +### EXAMPLES + # Find cache post ID for a given URL. + $ wp embed cache find https://www.youtube.com/watch?v=dQw4w9WgXcQ --width=500 + 123 + + # Clear cache for a post. + $ wp embed cache clear 123 + Success: Cleared oEmbed cache. + + # Triggers cache for a post. + $ wp embed cache trigger 456 + Success: Caching triggered! diff --git a/commands/embed/handler.md b/commands/embed/handler.md index c339a14e..1876a8e1 100644 --- a/commands/embed/handler.md +++ b/commands/embed/handler.md @@ -2,6 +2,15 @@ Retrieves embed handlers. +### EXAMPLES + # List id,regex,priority fields of available handlers. + $ wp embed handler list --fields=priority,id + +----------+-------------------+ + | priority | id | + +----------+-------------------+ + | 10 | youtube_embed_url | + | 9999 | audio | + | 9999 | video | diff --git a/commands/embed/provider.md b/commands/embed/provider.md index a1c28beb..67461e3e 100644 --- a/commands/embed/provider.md +++ b/commands/embed/provider.md @@ -2,6 +2,19 @@ Retrieves oEmbed providers. +### EXAMPLES + # List format,endpoint fields of available providers. + $ wp embed provider list + +------------------------------+-----------------------------------------+ + | format | endpoint | + +------------------------------+-----------------------------------------+ + | #https?://youtu\.be/.*#i | https://www.youtube.com/oembed | + | #https?://flic\.kr/.*#i | https://www.flickr.com/services/oembed/ | + | #https?://wordpress\.tv/.*#i | https://wordpress.tv/oembed/ | + + # Get the matching provider for the URL. + $ wp embed provider match https://www.youtube.com/watch?v=dQw4w9WgXcQ + https://www.youtube.com/oembed diff --git a/commands/eval-file.md b/commands/eval-file.md index 5bda55d3..c443e89b 100644 --- a/commands/eval-file.md +++ b/commands/eval-file.md @@ -2,6 +2,8 @@ Loads and executes a PHP file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Note: because code is executed within a method, global variables need to be explicitly globalized. ### OPTIONS diff --git a/commands/eval.md b/commands/eval.md index 4d05693c..aee172c8 100644 --- a/commands/eval.md +++ b/commands/eval.md @@ -2,6 +2,8 @@ Executes arbitrary PHP code. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Note: because code is executed within a method, global variables need to be explicitly globalized. ### OPTIONS diff --git a/commands/find.md b/commands/find.md index b2f7f82e..56ce7dbd 100644 --- a/commands/find.md +++ b/commands/find.md @@ -2,37 +2,14 @@ Find WordPress installations on the filesystem. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Recursively iterates subdirectories of provided <path> to find and report WordPress installations. A WordPress installation is a wp-includes directory with a version.php file. Avoids recursing some known paths (e.g. /node_modules/, hidden sys dirs) to significantly improve performance. Indicates depth at which the WordPress installations was found, and its alias, if it has one. -``` -$ wp find ./ -+--------------------------------------+---------------------+-------+--------+ -| version_path | version | depth | alias | -+--------------------------------------+---------------------+-------+--------+ -| /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | -+--------------------------------------+---------------------+-------+--------+ -``` - -### AVAILABLE FIELDS - -These fields will be displayed by default for each installation: - -* version_path - Path to the version.php file. -* version - WordPress version. -* depth - Directory depth at which the installation was found. -* alias - WP-CLI alias, if one is registered. - -These fields are optionally available: - -* wp_path - Path that can be passed to `--path=<path>` global parameter. -* db_host - Host name for the database. -* db_user - User name for the database. -* db_name - Database name for the database. - ### OPTIONS <path> @@ -68,6 +45,32 @@ options: [\--verbose] : Log useful information to STDOUT. +### AVAILABLE FIELDS + +These fields will be displayed by default for each installation: + +* version_path - Path to the version.php file. +* version - WordPress version. +* depth - Directory depth at which the installation was found. +* alias - WP-CLI alias, if one is registered. + +These fields are optionally available: + +* wp_path - Path that can be passed to `--path=<path>` global parameter. +* db_host - Host name for the database. +* db_user - User name for the database. +* db_name - Database name for the database. + +### EXAMPLES + + # Find WordPress installations. + $ wp find ./ + +--------------------------------------+---------------------+-------+--------+ + | version_path | version | depth | alias | + +--------------------------------------+---------------------+-------+--------+ + | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | + +--------------------------------------+---------------------+-------+--------+ + ### 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. diff --git a/commands/i18n.md b/commands/i18n.md index 51fff382..1860aae8 100644 --- a/commands/i18n.md +++ b/commands/i18n.md @@ -2,6 +2,8 @@ Provides internationalization tools for WordPress projects. +Unless overridden, these commands run on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES # Create a POT file for the WordPress plugin/theme in the current directory diff --git a/commands/i18n/make-json.md b/commands/i18n/make-json.md index d7295fa3..b4f67ac8 100644 --- a/commands/i18n/make-json.md +++ b/commands/i18n/make-json.md @@ -2,6 +2,8 @@ Extract JavaScript strings from PO files and add them to individual JSON files. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + For JavaScript internationalization purposes, WordPress requires translations to be split up into one Jed-formatted JSON file per JavaScript source file. See https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/ to learn more about WordPress JavaScript internationalization. diff --git a/commands/i18n/make-mo.md b/commands/i18n/make-mo.md index dcf788e5..37756aff 100644 --- a/commands/i18n/make-mo.md +++ b/commands/i18n/make-mo.md @@ -2,6 +2,8 @@ Create MO files from PO files. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <source> diff --git a/commands/i18n/make-php.md b/commands/i18n/make-php.md index d0b6aa26..5360160f 100644 --- a/commands/i18n/make-php.md +++ b/commands/i18n/make-php.md @@ -2,6 +2,8 @@ Create PHP files from PO files. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <source> diff --git a/commands/i18n/make-pot.md b/commands/i18n/make-pot.md index 518768a2..3d1f6679 100644 --- a/commands/i18n/make-pot.md +++ b/commands/i18n/make-pot.md @@ -2,6 +2,8 @@ Create a POT file for a WordPress project. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Scans PHP, Blade-PHP and JavaScript files for translatable strings, as well as theme stylesheets and plugin files if the source directory is detected as either a plugin or theme. ### OPTIONS @@ -81,12 +83,14 @@ Scans PHP, Blade-PHP and JavaScript files for translatable strings, as well as t ### EXAMPLES - # Create a POT file for the WordPress plugin/theme in the current directory + # Create a POT file for the WordPress plugin/theme in the current directory. $ wp i18n make-pot . languages/my-plugin.pot # Create a POT file for the continents and cities list in WordPress core. - $ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php" - --ignore-domain + $ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php" --ignore-domain + + # Create a POT file for the WordPress theme in the current directory with custom headers. + $ wp i18n make-pot . languages/my-theme.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/theme-author/my-theme/","POT-Creation-Date":""}' ### GLOBAL PARAMETERS diff --git a/commands/i18n/update-po.md b/commands/i18n/update-po.md index 973098ba..dc1f9269 100644 --- a/commands/i18n/update-po.md +++ b/commands/i18n/update-po.md @@ -2,17 +2,33 @@ Update PO files from a POT file. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + This behaves similarly to the [msgmerge](https://www.gnu.org/software/gettext/manual/html_node/msgmerge-Invocation.html) command. ### OPTIONS <source> -: Path to an existing POT file to use for updating +: Path to an existing POT file to use for updating. [<destination>] : PO file to update or a directory containing multiple PO files. Defaults to all PO files in the source directory. +### EXAMPLES + + # Update all PO files from a POT file in the current directory. + $ wp i18n update-po example-plugin.pot + Success: Updated 3 files. + + # Update a PO file from a POT file. + $ wp i18n update-po example-plugin.pot example-plugin-de_DE.po + Success: Updated 1 file. + + # Update all PO files in a given directory from a POT file. + $ wp i18n update-po example-plugin.pot languages + Success: Updated 2 files. + ### 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. diff --git a/commands/language.md b/commands/language.md index 7315e31f..fb70672d 100644 --- a/commands/language.md +++ b/commands/language.md @@ -6,18 +6,36 @@ Installs, activates, and manages language packs. # Install the Dutch core language pack. $ wp language core install nl_NL - Success: Language installed. + Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. # Activate the Dutch core language pack. - $ wp language core activate nl_NL + $ wp site switch-language nl_NL Success: Language activated. - # Install the Dutch language pack for Twenty Seventeen. - $ wp language theme install twentyseventeen nl_NL - Success: Language installed. - - # Install the Dutch language pack for Akismet. - $ wp language plugin install akismet nl_NL - Success: Language installed. + # Install the Dutch theme language pack for Twenty Ten. + $ wp language theme install twentyten nl_NL + Downloading translation from https://downloads.wordpress.org/translation/theme/twentyten/4.0/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. + + # Install the Dutch plugin language pack for Hello Dolly. + $ wp language plugin install hello-dolly nl_NL + Downloading translation from https://downloads.wordpress.org/translation/plugin/hello-dolly/1.7.2/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. diff --git a/commands/language/core.md b/commands/language/core.md index b87df49f..e7f4b340 100644 --- a/commands/language/core.md +++ b/commands/language/core.md @@ -6,22 +6,28 @@ Installs, activates, and manages core language packs. # Install the Dutch core language pack. $ wp language core install nl_NL - Success: Language installed. + Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. # Activate the Dutch core language pack. - $ wp language core activate nl_NL + $ wp site switch-language nl_NL Success: Language activated. # Uninstall the Dutch core language pack. $ wp language core uninstall nl_NL Success: Language uninstalled. - # List installed core language packages. + # List installed core language packs. $ wp language core list --status=installed +----------+--------------+-------------+-----------+-----------+---------------------+ | language | english_name | native_name | status | update | updated | +----------+--------------+-------------+-----------+-----------+---------------------+ - | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 | + | nl_NL | Dutch | Nederlands | installed | available | 2024-01-31 10:24:06 | +----------+--------------+-------------+-----------+-----------+---------------------+ diff --git a/commands/language/core/activate.md b/commands/language/core/activate.md index 8f856cc2..3c2c947c 100644 --- a/commands/language/core/activate.md +++ b/commands/language/core/activate.md @@ -11,6 +11,7 @@ Activates a given language. ### EXAMPLES + # Activate the given language. $ wp language core activate ja Success: Language activated. diff --git a/commands/language/core/install.md b/commands/language/core/install.md index e8d0cd85..51414502 100644 --- a/commands/language/core/install.md +++ b/commands/language/core/install.md @@ -2,7 +2,7 @@ Installs a given language. -Downloads the language pack from WordPress.org. +Downloads the language pack from WordPress.org. Find your language code at: https://translate.wordpress.org/ ### OPTIONS @@ -14,13 +14,14 @@ Downloads the language pack from WordPress.org. ### EXAMPLES - # Install the Japanese language. - $ wp language core install ja - Downloading translation from https://downloads.wordpress.org/translation/core/4.9.8/ja.zip... + # Install the Brazilian Portuguese language. + $ wp language core install pt_BR + Downloading translation from https://downloads.wordpress.org/translation/core/6.5/pt_BR.zip... Unpacking the update... Installing the latest version... + Removing the old version of the translation... Translation updated successfully. - Language 'ja' installed. + Language 'pt_BR' installed. Success: Installed 1 of 1 languages. ### GLOBAL PARAMETERS diff --git a/commands/language/core/list.md b/commands/language/core/list.md index 05ea732e..123a843e 100644 --- a/commands/language/core/list.md +++ b/commands/language/core/list.md @@ -21,6 +21,7 @@ options: - table - csv - json + - count \--- ### AVAILABLE FIELDS diff --git a/commands/language/core/uninstall.md b/commands/language/core/uninstall.md index 0511e0c9..189e4b1f 100644 --- a/commands/language/core/uninstall.md +++ b/commands/language/core/uninstall.md @@ -9,6 +9,7 @@ Uninstalls a given language. ### EXAMPLES + # Uninstall the Japanese core language pack. $ wp language core uninstall ja Success: Language uninstalled. diff --git a/commands/language/core/update.md b/commands/language/core/update.md index 8504f536..f3125a13 100644 --- a/commands/language/core/update.md +++ b/commands/language/core/update.md @@ -9,9 +9,10 @@ Updates installed languages for core. ### EXAMPLES + # Update installed core languages packs. $ wp language core update - Updating 'Japanese' translation for WordPress 4.9.2... - Downloading translation from https://downloads.wordpress.org/translation/core/4.9.2/ja.zip... + Updating 'Japanese' translation for WordPress 6.4.3... + Downloading translation from https://downloads.wordpress.org/translation/core/6.4.3/ja.zip... Translation updated successfully. Success: Updated 1/1 translation. diff --git a/commands/language/plugin.md b/commands/language/plugin.md index 705e4427..3a8ccf25 100644 --- a/commands/language/plugin.md +++ b/commands/language/plugin.md @@ -4,20 +4,32 @@ Installs, activates, and manages plugin language packs. ### EXAMPLES - # Install the Dutch plugin language pack. + # Install the Dutch plugin language pack for Hello Dolly. $ wp language plugin install hello-dolly nl_NL - Success: Language installed. + Downloading translation from https://downloads.wordpress.org/translation/plugin/hello-dolly/1.7.2/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. - # Uninstall the Dutch plugin language pack. + # Uninstall the Dutch plugin language pack for Hello Dolly. $ wp language plugin uninstall hello-dolly nl_NL - Success: Language uninstalled. + Language 'nl_NL' for 'hello-dolly' uninstalled. + +-------------+--------+-------------+ + | name | locale | status | + +-------------+--------+-------------+ + | hello-dolly | nl_NL | uninstalled | + +-------------+--------+-------------+ + Success: Uninstalled 1 of 1 languages. - # List installed plugin language packages. - $ wp language plugin list --status=installed - +----------+--------------+-------------+-----------+-----------+---------------------+ - | language | english_name | native_name | status | update | updated | - +----------+--------------+-------------+-----------+-----------+---------------------+ - | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 | - +----------+--------------+-------------+-----------+-----------+---------------------+ + # List installed plugin language packs for Hello Dolly. + $ wp language plugin list hello-dolly --status=installed + +-------------+----------+--------------+-------------+-----------+--------+---------------------+ + | plugin | language | english_name | native_name | status | update | updated | + +-------------+----------+--------------+-------------+-----------+--------+---------------------+ + | hello-dolly | nl_NL | Dutch | Nederlands | installed | none | 2023-11-13 12:34:15 | + +-------------+----------+--------------+-------------+-----------+--------+---------------------+ diff --git a/commands/language/plugin/install.md b/commands/language/plugin/install.md index b09cf992..bc995779 100644 --- a/commands/language/plugin/install.md +++ b/commands/language/plugin/install.md @@ -33,6 +33,7 @@ options: Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/4.0.3/ja.zip... Unpacking the update... Installing the latest version... + Removing the old version of the translation... Translation updated successfully. Language 'ja' installed. Success: Installed 1 of 1 languages. diff --git a/commands/language/plugin/list.md b/commands/language/plugin/list.md index ff241d60..7c1fcfc8 100644 --- a/commands/language/plugin/list.md +++ b/commands/language/plugin/list.md @@ -27,6 +27,7 @@ options: - table - csv - json + - count \--- ### AVAILABLE FIELDS @@ -43,8 +44,8 @@ These fields will be displayed by default for each translation: ### EXAMPLES - # List language,english_name,status fields of available languages. - $ wp language plugin list --fields=language,english_name,status + # List available language packs for the plugin. + $ wp language plugin list hello-dolly --fields=language,english_name,status +----------------+-------------------------+-------------+ | language | english_name | status | +----------------+-------------------------+-------------+ diff --git a/commands/language/plugin/uninstall.md b/commands/language/plugin/uninstall.md index 8f9f41dd..9dd8f59d 100644 --- a/commands/language/plugin/uninstall.md +++ b/commands/language/plugin/uninstall.md @@ -26,8 +26,15 @@ options: ### EXAMPLES + # Uninstall the Japanese plugin language pack for Hello Dolly. $ wp language plugin uninstall hello-dolly ja - Success: Language uninstalled. + Language 'ja' for 'hello-dolly' uninstalled. + +-------------+--------+-------------+ + | name | locale | status | + +-------------+--------+-------------+ + | hello-dolly | ja | uninstalled | + +-------------+--------+-------------+ + Success: Uninstalled 1 of 1 languages. ### GLOBAL PARAMETERS diff --git a/commands/language/plugin/update.md b/commands/language/plugin/update.md index c705e2c0..6372da56 100644 --- a/commands/language/plugin/update.md +++ b/commands/language/plugin/update.md @@ -15,6 +15,7 @@ Updates installed languages for one or more plugins. ### EXAMPLES + # Update all installed language packs for all plugins. $ wp language plugin update --all Updating 'Japanese' translation for Akismet 3.1.11... Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/ja.zip... diff --git a/commands/language/theme.md b/commands/language/theme.md index e1b220e9..0fbfa238 100644 --- a/commands/language/theme.md +++ b/commands/language/theme.md @@ -4,20 +4,32 @@ Installs, activates, and manages theme language packs. ### EXAMPLES - # Install the Dutch theme language pack. + # Install the Dutch theme language pack for Twenty Ten. $ wp language theme install twentyten nl_NL - Success: Language installed. + Downloading translation from https://downloads.wordpress.org/translation/theme/twentyten/4.0/nl_NL.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the translation... + Translation updated successfully. + Language 'nl_NL' installed. + Success: Installed 1 of 1 languages. - # Uninstall the Dutch theme language pack. + # Uninstall the Dutch theme language pack for Twenty Ten. $ wp language theme uninstall twentyten nl_NL - Success: Language uninstalled. + Language 'nl_NL' for 'twentyten' uninstalled. + +-----------+--------+-------------+ + | name | locale | status | + +-----------+--------+-------------+ + | twentyten | nl_NL | uninstalled | + +-----------+--------+-------------+ + Success: Uninstalled 1 of 1 languages. - # List installed theme language packages. - $ wp language theme list --status=installed - +----------+--------------+-------------+-----------+-----------+---------------------+ - | language | english_name | native_name | status | update | updated | - +----------+--------------+-------------+-----------+-----------+---------------------+ - | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 | - +----------+--------------+-------------+-----------+-----------+---------------------+ + # List installed theme language packs for Twenty Ten. + $ wp language theme list twentyten --status=installed + +-----------+----------+--------------+-------------+-----------+--------+---------------------+ + | theme | language | english_name | native_name | status | update | updated | + +-----------+----------+--------------+-------------+-----------+--------+---------------------+ + | twentyten | nl_NL | Dutch | Nederlands | installed | none | 2023-12-29 21:21:39 | + +-----------+----------+--------------+-------------+-----------+--------+---------------------+ diff --git a/commands/language/theme/list.md b/commands/language/theme/list.md index 37d4e652..2a2f4db0 100644 --- a/commands/language/theme/list.md +++ b/commands/language/theme/list.md @@ -27,6 +27,7 @@ options: - table - csv - json + - count \--- ### AVAILABLE FIELDS @@ -43,8 +44,8 @@ These fields will be displayed by default for each translation: ### EXAMPLES - # List language,english_name,status fields of available languages. - $ wp language theme list --fields=language,english_name,status + # List available language packs for the theme. + $ wp language theme list twentyten --fields=language,english_name,status +----------------+-------------------------+-------------+ | language | english_name | status | +----------------+-------------------------+-------------+ diff --git a/commands/language/theme/uninstall.md b/commands/language/theme/uninstall.md index 32888952..240b9bf3 100644 --- a/commands/language/theme/uninstall.md +++ b/commands/language/theme/uninstall.md @@ -26,8 +26,15 @@ options: ### EXAMPLES + # Uninstall the Japanese theme language pack for Twenty Ten. $ wp language theme uninstall twentyten ja - Success: Language uninstalled. + Language 'ja' for 'twentyten' uninstalled. + +-----------+--------+-------------+ + | name | locale | status | + +-----------+--------+-------------+ + | twentyten | ja | uninstalled | + +-----------+--------+-------------+ + Success: Uninstalled 1 of 1 languages. ### GLOBAL PARAMETERS diff --git a/commands/language/theme/update.md b/commands/language/theme/update.md index c1430c14..122ac039 100644 --- a/commands/language/theme/update.md +++ b/commands/language/theme/update.md @@ -15,6 +15,7 @@ Updates installed languages for one or more themes. ### EXAMPLES + # Update all installed language packs for all themes. $ wp language theme update --all Updating 'Japanese' translation for Twenty Fifteen 1.5... Downloading translation from https://downloads.wordpress.org/translation/theme/twentyfifteen/1.5/ja.zip... diff --git a/commands/maintenance-mode/activate.md b/commands/maintenance-mode/activate.md index 95571bd6..c1eaf96f 100644 --- a/commands/maintenance-mode/activate.md +++ b/commands/maintenance-mode/activate.md @@ -2,6 +2,8 @@ Activates maintenance mode. +### OPTIONS + [\--force] : Force maintenance mode activation operation. diff --git a/commands/media.md b/commands/media.md index 8d66cce6..89166d92 100644 --- a/commands/media.md +++ b/commands/media.md @@ -14,7 +14,8 @@ Imports files as attachments, regenerates thumbnails, or lists registered image # Import a local image and set it to be the featured image for a post. $ wp media import ~/Downloads/image.png --post_id=123 --title="A downloaded picture" --featured_image - Success: Imported file '/home/person/Downloads/image.png' as attachment ID 1753 and attached to post 123 as featured image. + Imported file '/home/person/Downloads/image.png' as attachment ID 1753 and attached to post 123 as featured image. + Success: Imported 1 of 1 images. # List all registered image sizes $ wp media image-size @@ -29,4 +30,9 @@ Imports files as attachments, regenerates thumbnails, or lists registered image | thumbnail | 150 | 150 | hard | +---------------------------+-------+--------+-------+ + # Fix orientation for specific images. + $ wp media fix-orientation 63 + 1/1 Fixing orientation for "Portrait_6" (ID 63). + Success: Fixed 1 of 1 images. + diff --git a/commands/media/regenerate.md b/commands/media/regenerate.md index ce799e83..a5f544c2 100644 --- a/commands/media/regenerate.md +++ b/commands/media/regenerate.md @@ -16,6 +16,9 @@ Regenerates thumbnails for one or more attachments. [\--only-missing] : Only generate thumbnails for images missing image sizes. +[\--delete-unknown] +: Only delete thumbnails for old unregistered image sizes. + [\--yes] : Answer yes to the confirmation message. Confirmation only shows when no IDs passed as arguments. diff --git a/commands/menu.md b/commands/menu.md index ec0163ce..39524e55 100644 --- a/commands/menu.md +++ b/commands/menu.md @@ -25,6 +25,6 @@ See the [Navigation Menus](https://developer.wordpress.org/themes/functionality/ # Assign the 'my-menu' menu to the 'primary' location $ wp menu location assign my-menu primary - Success: Assigned location to menu. + Success: Assigned location primary to menu my-menu. diff --git a/commands/menu/delete.md b/commands/menu/delete.md index 117698c6..24329c2f 100644 --- a/commands/menu/delete.md +++ b/commands/menu/delete.md @@ -10,7 +10,8 @@ Deletes one or more menus. ### EXAMPLES $ wp menu delete "My Menu" - Success: 1 menu deleted. + Deleted menu 'My Menu'. + Success: Deleted 1 of 1 menus. ### GLOBAL PARAMETERS diff --git a/commands/menu/item.md b/commands/menu/item.md index 9a9cf2fc..36f1e677 100644 --- a/commands/menu/item.md +++ b/commands/menu/item.md @@ -14,7 +14,7 @@ List, add, and delete items associated with a menu. # Delete menu item $ wp menu item delete 45 - Success: 1 menu item deleted. + Success: Deleted 1 of 1 menu items. diff --git a/commands/menu/item/delete.md b/commands/menu/item/delete.md index 86ed1861..f68705e7 100644 --- a/commands/menu/item/delete.md +++ b/commands/menu/item/delete.md @@ -10,7 +10,7 @@ Deletes one or more items from a menu. ### EXAMPLES $ wp menu item delete 45 - Success: 1 menu item deleted. + Success: Deleted 1 of 1 menu items. ### GLOBAL PARAMETERS diff --git a/commands/menu/location.md b/commands/menu/location.md index 8cb7125d..65e70059 100644 --- a/commands/menu/location.md +++ b/commands/menu/location.md @@ -15,7 +15,7 @@ Assigns, removes, and lists a menu's locations. # Assign the 'primary-menu' menu to the 'primary' location $ wp menu location assign primary-menu primary - Success: Assigned location to menu. + Success: Assigned location primary to menu primary-menu. # Remove the 'primary-menu' menu from the 'primary' location $ wp menu location remove primary-menu primary diff --git a/commands/option/add.md b/commands/option/add.md index 56ddeeea..b1834466 100644 --- a/commands/option/add.md +++ b/commands/option/add.md @@ -25,6 +25,8 @@ options: : Should this option be automatically loaded. \--- options: + - 'on' + - 'off' - 'yes' - 'no' \--- diff --git a/commands/option/get-autoload.md b/commands/option/get-autoload.md index 9bb7a545..e5e2beb2 100644 --- a/commands/option/get-autoload.md +++ b/commands/option/get-autoload.md @@ -7,6 +7,12 @@ Gets the 'autoload' value for an option. <key> : The name of the option to get 'autoload' of. +### EXAMPLES + + # Get the 'autoload' value for an option. + $ wp option get-autoload blogname + yes + ### 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. diff --git a/commands/option/set-autoload.md b/commands/option/set-autoload.md index 765b379e..3d6d8805 100644 --- a/commands/option/set-autoload.md +++ b/commands/option/set-autoload.md @@ -11,10 +11,18 @@ Sets the 'autoload' value for an option. : Should this option be automatically loaded. \--- options: + - 'on' + - 'off' - 'yes' - 'no' \--- +### EXAMPLES + + # Set the 'autoload' value for an option. + $ wp option set-autoload abc_options no + Success: Updated autoload value for 'abc_options' 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. diff --git a/commands/option/update.md b/commands/option/update.md index a2d0ff1c..2fd5a2b3 100644 --- a/commands/option/update.md +++ b/commands/option/update.md @@ -14,6 +14,8 @@ Updates an option value. : Requires WP 4.2. Should this option be automatically loaded. \--- options: + - 'on' + - 'off' - 'yes' - 'no' \--- diff --git a/commands/package.md b/commands/package.md index d31a3bcb..45bd52f5 100644 --- a/commands/package.md +++ b/commands/package.md @@ -2,22 +2,24 @@ Lists, installs, and removes WP-CLI packages. +Unless overridden, these commands run on the `before_wp_load` hook, just before the WP load process begins. + WP-CLI packages are community-maintained projects built on WP-CLI. They can contain WP-CLI commands, but they can also just extend WP-CLI in some way. Learn how to create your own command from the -[Commands Cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/) +[Commands Cookbook](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/) ### EXAMPLES - # List installed packages + # List installed packages. $ wp package list - +-----------------------+------------------------------------------+---------+----------+ - | name | description | authors | version | - +-----------------------+------------------------------------------+---------+----------+ - | wp-cli/server-command | Start a development server for WordPress | | dev-main | - +-----------------------+------------------------------------------+---------+----------+ + +-----------------------+------------------+----------+-----------+----------------+ + | name | authors | version | update | update_version | + +-----------------------+------------------+----------+-----------+----------------+ + | wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev | + +-----------------------+------------------+----------+-----------+----------------+ - # Install the latest development version of the package + # Install the latest development version of the package. $ wp package install wp-cli/server-command Installing package wp-cli/server-command (dev-main) Updating /home/person/.wp-cli/packages/composer.json to require the package... @@ -35,11 +37,11 @@ Learn how to create your own command from the --- Success: Package installed. - # Uninstall package + # Uninstall package. $ wp package uninstall wp-cli/server-command - Removing require statement from /home/person/.wp-cli/packages/composer.json - Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command - Regenerating Composer autoload. + Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json + Removing repository details from /home/person/.wp-cli/packages/composer.json + Removing package directories and regenerating autoloader... Success: Uninstalled package. diff --git a/commands/package/browse.md b/commands/package/browse.md index 0f19627c..ac53a11a 100644 --- a/commands/package/browse.md +++ b/commands/package/browse.md @@ -2,6 +2,8 @@ Browses WP-CLI packages available for installation. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Lists packages available for installation from the [Package Index](http://wp-cli.org/package-index/). Although the package index will remain in place for backward compatibility reasons, it has been deprecated and will not be updated further. Please refer to https://github.com/wp-cli/ideas/issues/51 to read about its potential replacement. ### OPTIONS diff --git a/commands/package/install.md b/commands/package/install.md index 6fac7872..37cb2d48 100644 --- a/commands/package/install.md +++ b/commands/package/install.md @@ -2,6 +2,8 @@ Installs a WP-CLI package. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Packages are required to be a valid Composer package, and can be specified as: * Package name from WP-CLI's package index. diff --git a/commands/package/list.md b/commands/package/list.md index 0266e602..1d7176cf 100644 --- a/commands/package/list.md +++ b/commands/package/list.md @@ -2,6 +2,8 @@ Lists installed WP-CLI packages. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS [\--fields=<fields>] @@ -35,12 +37,13 @@ These fields are optionally available: ### EXAMPLES + # List installed packages. $ wp package list - +-----------------------+------------------------------------------+---------+----------+ - | name | description | authors | version | - +-----------------------+------------------------------------------+---------+----------+ - | wp-cli/server-command | Start a development server for WordPress | | dev-main | - +-----------------------+------------------------------------------+---------+----------+ + +-----------------------+------------------+----------+-----------+----------------+ + | name | authors | version | update | update_version | + +-----------------------+------------------+----------+-----------+----------------+ + | wp-cli/server-command | Daniel Bachhuber | dev-main | available | 2.x-dev | + +-----------------------+------------------+----------+-----------+----------------+ ### GLOBAL PARAMETERS diff --git a/commands/package/path.md b/commands/package/path.md index aa39393a..68b2baa8 100644 --- a/commands/package/path.md +++ b/commands/package/path.md @@ -2,6 +2,8 @@ Gets the path to an installed WP-CLI package, or the package directory. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + If you want to contribute to a package, this is a great way to jump to it. ### OPTIONS @@ -11,11 +13,15 @@ If you want to contribute to a package, this is a great way to jump to it. ### EXAMPLES - # Get package path + # Get package path. $ wp package path /home/person/.wp-cli/packages/ - # Change directory to package path + # Get path to an installed package. + $ wp package path wp-cli/server-command + /home/person/.wp-cli/packages/vendor/wp-cli/server-command + + # Change directory to package path. $ cd $(wp package path) && pwd /home/vagrant/.wp-cli/packages diff --git a/commands/package/uninstall.md b/commands/package/uninstall.md index 46b75df1..27afacfc 100644 --- a/commands/package/uninstall.md +++ b/commands/package/uninstall.md @@ -2,6 +2,8 @@ Uninstalls a WP-CLI package. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### OPTIONS <name> @@ -12,10 +14,11 @@ Uninstalls a WP-CLI package. ### EXAMPLES + # Uninstall package. $ wp package uninstall wp-cli/server-command - Removing require statement from /home/person/.wp-cli/packages/composer.json - Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command - Regenerating Composer autoload. + Removing require statement for package 'wp-cli/server-command' from /home/person/.wp-cli/packages/composer.json + Removing repository details from /home/person/.wp-cli/packages/composer.json + Removing package directories and regenerating autoloader... Success: Uninstalled package. ### GLOBAL PARAMETERS diff --git a/commands/package/update.md b/commands/package/update.md index d3662b6c..f649e270 100644 --- a/commands/package/update.md +++ b/commands/package/update.md @@ -2,6 +2,8 @@ Updates all installed WP-CLI packages to their latest version. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + ### EXAMPLES $ wp package update diff --git a/commands/plugin/activate.md b/commands/plugin/activate.md index e7291123..1157392f 100644 --- a/commands/plugin/activate.md +++ b/commands/plugin/activate.md @@ -28,6 +28,18 @@ Activates one or more plugins. Plugin 'hello' network activated. Success: Network activated 1 of 1 plugins. + # Activate plugins that were recently active. + $ wp plugin activate $(wp plugin list --recently-active --field=name) + Plugin 'bbpress' activated. + Plugin 'buddypress' activated. + Success: Activated 2 of 2 plugins. + + # Activate plugins that were recently active on a multisite. + $ wp plugin activate $(wp plugin list --recently-active --field=name) --network + Plugin 'bbpress' network activated. + Plugin 'buddypress' network activated. + Success: Activated 2 of 2 plugins. + ### 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. diff --git a/commands/plugin/get.md b/commands/plugin/get.md index 2509e334..3da5e4ad 100644 --- a/commands/plugin/get.md +++ b/commands/plugin/get.md @@ -24,10 +24,28 @@ options: - yaml \--- +### AVAILABLE FIELDS + +These fields will be displayed by default for the plugin: + +* name +* title +* author +* version +* description +* status + +These fields are optionally available: + +* requires_wp +* requires_php +* requires_plugins + ### EXAMPLES + # Get plugin details. $ wp plugin get bbpress --format=json - {"name":"bbpress","title":"bbPress","author":"The bbPress Contributors","version":"2.6-alpha","description":"bbPress is forum software with a twist from the creators of WordPress.","status":"active"} + {"name":"bbpress","title":"bbPress","author":"The bbPress Contributors","version":"2.6.9","description":"bbPress is forum software with a twist from the creators of WordPress.","status":"active"} ### GLOBAL PARAMETERS diff --git a/commands/plugin/list.md b/commands/plugin/list.md index 1ec64d26..54da89c6 100644 --- a/commands/plugin/list.md +++ b/commands/plugin/list.md @@ -43,6 +43,9 @@ options: [\--skip-update-check] : If set, the plugin update check will be skipped. +[\--recently-active] +: If set, only recently active plugins will be shown and the status filter will be ignored. + ### AVAILABLE FIELDS These fields will be displayed by default for each plugin: @@ -52,6 +55,7 @@ These fields will be displayed by default for each plugin: * update * version * update_version +* auto_update These fields are optionally available: @@ -60,8 +64,8 @@ These fields are optionally available: * title * description * file -* auto_update * author +* tested_up_to * wporg_status * wporg_last_updated @@ -69,25 +73,25 @@ These fields are optionally available: # List active plugins on the site. $ wp plugin list --status=active --format=json - [{"name":"dynamic-hostname","status":"active","update":"none","version":"0.4.2","update_version": ""},{"name":"tinymce-templates","status":"active","update":"none","version":"4.4.3","update_version": ""},{"name":"wp-multibyte-patch","status":"active","update":"none","version":"2.4","update_version": ""},{"name":"wp-total-hacks","status":"active","update":"none","version":"2.0.1","update_version": ""}] + [{"name":"dynamic-hostname","status":"active","update":"none","version":"0.4.2","update_version":"","auto_update":"off"},{"name":"tinymce-templates","status":"active","update":"none","version":"4.8.1","update_version":"","auto_update":"off"},{"name":"wp-multibyte-patch","status":"active","update":"none","version":"2.9","update_version":"","auto_update":"off"},{"name":"wp-total-hacks","status":"active","update":"none","version":"4.7.2","update_version":"","auto_update":"off"}] # List plugins on each site in a network. $ wp site list --field=url | xargs -I % wp plugin list --url=% - +---------+----------------+--------+---------+----------------+ - | name | status | update | version | update_version | - +---------+----------------+--------+---------+----------------+ - | akismet | active-network | none | 3.1.11 | | - | hello | inactive | none | 1.6 | 1.7.2 | - +---------+----------------+--------+---------+----------------+ - +---------+----------------+--------+---------+----------------+ - | name | status | update | version | update_version | - +---------+----------------+--------+---------+----------------+ - | akismet | active-network | none | 3.1.11 | | - | hello | inactive | none | 1.6 | 1.7.2 | - +---------+----------------+--------+---------+----------------+ + +---------+----------------+-----------+---------+-----------------+------------+ + | name | status | update | version | update_version | auto_update | + +---------+----------------+-----------+---------+----------------+-------------+ + | akismet | active-network | none | 5.3.1 | | on | + | hello | inactive | available | 1.6 | 1.7.2 | off | + +---------+----------------+-----------+---------+----------------+-------------+ + +---------+----------------+-----------+---------+----------------+-------------+ + | name | status | update | version | update_version | auto_update | + +---------+----------------+-----------+---------+----------------+-------------+ + | akismet | active-network | none | 5.3.1 | | on | + | hello | inactive | available | 1.6 | 1.7.2 | off | + +---------+----------------+-----------+---------+----------------+-------------+ # Check whether plugins are still active on WordPress.org - $ wp plugin list --format=csv --fields=name,wporg_status,wporg_last_updated + $ wp plugin list --fields=name,wporg_status,wporg_last_updated +--------------------+--------------+--------------------+ | name | wporg_status | wporg_last_updated | +--------------------+--------------+--------------------+ @@ -97,6 +101,10 @@ These fields are optionally available: | local | | | +--------------------+--------------+--------------------+ + # List recently active plugins on the site. + $ wp plugin list --recently-active --field=name --format=json + ["akismet","bbpress","buddypress"] + ### 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. diff --git a/commands/post/term/add.md b/commands/post/term/add.md index c5711c84..1e7d6592 100644 --- a/commands/post/term/add.md +++ b/commands/post/term/add.md @@ -4,6 +4,8 @@ Add a term to an object. Append the term to the existing set of terms on the object. +### OPTIONS + <id> : The ID of the object. diff --git a/commands/post/term/list.md b/commands/post/term/list.md index 6ed8c1d8..707583ae 100644 --- a/commands/post/term/list.md +++ b/commands/post/term/list.md @@ -2,6 +2,8 @@ List all terms associated with an object. +### OPTIONS + <id> : ID for the object. diff --git a/commands/post/term/set.md b/commands/post/term/set.md index b374a228..e7fd19c6 100644 --- a/commands/post/term/set.md +++ b/commands/post/term/set.md @@ -4,6 +4,8 @@ Set object terms. Replaces existing terms on the object. +### OPTIONS + <id> : The ID of the object. diff --git a/commands/profile.md b/commands/profile.md index 076af73b..3887e22b 100644 --- a/commands/profile.md +++ b/commands/profile.md @@ -21,15 +21,16 @@ Quickly identify what's slow with WordPress. +--------------------------+---------+-------------+ | hook | time | cache_ratio | +--------------------------+---------+-------------+ - | muplugins_loaded:before | 0.2335s | 40% | - | muplugins_loaded | 0.0007s | 50% | - | plugins_loaded:before | 0.2792s | 77.63% | - | plugins_loaded | 0.1502s | 100% | - | after_setup_theme:before | 0.068s | 100% | - | init | 0.2643s | 96.88% | - | wp_loaded:after | 0.0377s | | + | muplugins_loaded:before | 0.1767s | 33.33% | + | plugins_loaded:before | 0.103s | 78.13% | + | plugins_loaded | 0.0194s | 19.32% | + | setup_theme | 0.0018s | 75% | + | after_setup_theme:before | 0.0116s | 95.45% | + | after_setup_theme | 0.0049s | 96% | + | init | 0.1428s | 76.74% | + | wp_loaded:after | 0.0236s | | +--------------------------+---------+-------------+ - | total (7) | 1.0335s | 77.42% | + | total (8) | 0.4837s | 67.71% | +--------------------------+---------+-------------+ diff --git a/commands/profile/eval-file.md b/commands/profile/eval-file.md index cb282c7b..1034d087 100644 --- a/commands/profile/eval-file.md +++ b/commands/profile/eval-file.md @@ -35,8 +35,18 @@ options: - DESC \--- -[\--orderby=<orderby>] -: Order by fields. +[\--orderby=<fields>] +: Set orderby which field. + +### EXAMPLES + + # Profile from a file `request.php` containing `<?php wp_remote_get( "https://www.apple.com/" );`. + $ wp profile eval-file request.php --fields=time,cache_ratio,request_count + +---------+-------------+---------------+ + | time | cache_ratio | request_count | + +---------+-------------+---------------+ + | 0.1009s | 100% | 1 | + +---------+-------------+---------------+ ### GLOBAL PARAMETERS diff --git a/commands/profile/eval.md b/commands/profile/eval.md index e6c1c219..ec224f8d 100644 --- a/commands/profile/eval.md +++ b/commands/profile/eval.md @@ -35,8 +35,18 @@ options: - DESC \--- -[\--orderby=<orderby>] -: Order by fields. +[\--orderby=<fields>] +: Set orderby which field. + +### EXAMPLES + + # Profile a function that makes one HTTP request. + $ wp profile eval 'wp_remote_get( "https://www.apple.com/" );' --fields=time,cache_ratio,request_count + +---------+-------------+---------------+ + | time | cache_ratio | request_count | + +---------+-------------+---------------+ + | 0.1009s | 100% | 1 | + +---------+-------------+---------------+ ### GLOBAL PARAMETERS diff --git a/commands/profile/hook.md b/commands/profile/hook.md index 6999ace9..5e4f2600 100644 --- a/commands/profile/hook.md +++ b/commands/profile/hook.md @@ -2,6 +2,8 @@ Profile key metrics for WordPress hooks (actions and filters). +This command runs on the `before_wp_load` hook, just before the WP load process begins. + In order to profile callbacks on a specific hook, the action or filter will need to execute during the course of the request. ### OPTIONS @@ -41,8 +43,26 @@ options: - DESC \--- -[\--orderby=<orderby>] -: Order by fields. +[\--orderby=<fields>] +: Set orderby which field. + +### EXAMPLES + + # Profile a hook. + $ wp profile hook template_redirect --fields=callback,cache_hits,cache_misses + +--------------------------------+------------+--------------+ + | callback | cache_hits | cache_misses | + +--------------------------------+------------+--------------+ + | _wp_admin_bar_init() | 0 | 0 | + | wp_old_slug_redirect() | 0 | 0 | + | redirect_canonical() | 5 | 0 | + | WP_Sitemaps->render_sitemaps() | 0 | 0 | + | rest_output_link_header() | 3 | 0 | + | wp_shortlink_header() | 0 | 0 | + | wp_redirect_admin_locations() | 0 | 0 | + +--------------------------------+------------+--------------+ + | total (7) | 8 | 0 | + +--------------------------------+------------+--------------+ ### GLOBAL PARAMETERS diff --git a/commands/profile/stage.md b/commands/profile/stage.md index 201c3fd8..e718127f 100644 --- a/commands/profile/stage.md +++ b/commands/profile/stage.md @@ -2,42 +2,14 @@ Profile each stage of the WordPress load process (bootstrap, main_query, template). +This command runs on the `before_wp_load` hook, just before the WP load process begins. + When WordPress handles a request from a browser, it’s essentially executing as one long PHP script. `wp profile stage` breaks the script into three stages: * **bootstrap** is where WordPress is setting itself up, loading plugins and the main theme, and firing the `init` hook. * **main_query** is how WordPress transforms the request (e.g. `/2016/10/21/moms-birthday/`) into the primary WP_Query. * **template** is where WordPress determines which theme template to render based on the main query, and renders it. -``` -# `wp profile stage` gives an overview of each stage. -$ wp profile stage --fields=stage,time,cache_ratio -+------------+---------+-------------+ -| stage | time | cache_ratio | -+------------+---------+-------------+ -| bootstrap | 0.7994s | 93.21% | -| main_query | 0.0123s | 94.29% | -| template | 0.792s | 91.23% | -+------------+---------+-------------+ -| total (3) | 1.6037s | 92.91% | -+------------+---------+-------------+ - -# Then, dive into hooks for each stage with `wp profile stage <stage>` -$ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight -+--------------------------+---------+-------------+ -| hook | time | cache_ratio | -+--------------------------+---------+-------------+ -| muplugins_loaded:before | 0.2335s | 40% | -| muplugins_loaded | 0.0007s | 50% | -| plugins_loaded:before | 0.2792s | 77.63% | -| plugins_loaded | 0.1502s | 100% | -| after_setup_theme:before | 0.068s | 100% | -| init | 0.2643s | 96.88% | -| wp_loaded:after | 0.0377s | | -+--------------------------+---------+-------------+ -| total (7) | 1.0335s | 77.42% | -+--------------------------+---------+-------------+ -``` - ### OPTIONS [<stage>] @@ -75,8 +47,38 @@ options: - DESC \--- -[\--orderby=<orderby>] -: Order by fields. +[\--orderby=<fields>] +: Set orderby which field. + +### EXAMPLES + + # See an overview for each stage of the load process. + $ wp profile stage --fields=stage,time,cache_ratio + +------------+---------+-------------+ + | stage | time | cache_ratio | + +------------+---------+-------------+ + | bootstrap | 0.7994s | 93.21% | + | main_query | 0.0123s | 94.29% | + | template | 0.792s | 91.23% | + +------------+---------+-------------+ + | total (3) | 1.6037s | 92.91% | + +------------+---------+-------------+ + + # Dive into hook performance for a given stage. + $ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight + +--------------------------+---------+-------------+ + | hook | time | cache_ratio | + +--------------------------+---------+-------------+ + | muplugins_loaded:before | 0.2335s | 40% | + | muplugins_loaded | 0.0007s | 50% | + | plugins_loaded:before | 0.2792s | 77.63% | + | plugins_loaded | 0.1502s | 100% | + | after_setup_theme:before | 0.068s | 100% | + | init | 0.2643s | 96.88% | + | wp_loaded:after | 0.0377s | | + +--------------------------+---------+-------------+ + | total (7) | 1.0335s | 77.42% | + +--------------------------+---------+-------------+ ### GLOBAL PARAMETERS diff --git a/commands/scaffold.md b/commands/scaffold.md index 432197af..970c4432 100644 --- a/commands/scaffold.md +++ b/commands/scaffold.md @@ -4,17 +4,17 @@ Generates code for post types, taxonomies, plugins, child themes, etc. ### EXAMPLES - # Generate a new plugin with unit tests + # Generate a new plugin with unit tests. $ wp scaffold plugin sample-plugin Success: Created plugin files. Success: Created test files. - # Generate theme based on _s + # Generate theme based on _s. $ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe" Success: Created theme 'Sample Theme'. - # Generate code for post type registration in given theme + # Generate code for post type registration in given 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 + Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'. diff --git a/commands/scaffold/block.md b/commands/scaffold/block.md index 8d0d34bc..630e223f 100644 --- a/commands/scaffold/block.md +++ b/commands/scaffold/block.md @@ -4,9 +4,9 @@ Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or **Warning: `wp scaffold block` is deprecated.** -The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/designers-developers/developers/packages/packages-create-block/) package. +The official script to generate a block is the [@wordpress/create-block](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/) package. -See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/create-block/) for a complete walk-through. +See the [Create a Block tutorial](https://developer.wordpress.org/block-editor/getting-started/tutorial/) for a complete walk-through. ### OPTIONS diff --git a/commands/scaffold/package-readme.md b/commands/scaffold/package-readme.md deleted file mode 100644 index 100706fc..00000000 --- a/commands/scaffold/package-readme.md +++ /dev/null @@ -1,103 +0,0 @@ -# wp scaffold package-readme - -Generate a README.md for your command. - -This command runs on the `before_wp_load` hook, just before the WP load process begins. - -Creates a README.md with Using, Installing, and Contributing instructions based on the composer.json file for your WP-CLI package. Run this command at the beginning of your project, and then every time your usage docs change. - -These command-specific docs are generated based composer.json -> 'extra' --> 'commands'. For instance, this package's composer.json includes: - -``` -{ - "name": "wp-cli/scaffold-package-command", - // [...] - "extra": { - "commands": [ - "scaffold package", - "scaffold package-tests", - "scaffold package-readme" - ] - } -} -``` - -You can also customize the rendering of README.md generally with composer.json -> 'extra' -> 'readme'. For example, runcommand/hook's composer.json includes: - -``` -{ - "extra": { - "commands": [ - "hook" - ], - "readme": { - "shields": [ - "[![Build Status](https://travis-ci.org/runcommand/reset-password.svg?branch=master)](https://travis-ci.org/runcommand/reset-password)" - ], - "sections": [ - "Using", - "Installing", - "Support" - ], - "support": { - "body": "https://raw.githubusercontent.com/runcommand/runcommand-theme/master/bin/readme-partials/support-open-source.md" - }, - "show_powered_by": false - } - } -} -``` - -In this example: - -* "shields" supports arbitrary images as shields to display. -* "sections" permits defining arbitrary sections (instead of default Using, Installing and Contributing). -* "support" -> "body" uses a remote Markdown file as the section contents. This can also be a local file path, or a string. -* "show_powered_by" shows or hides the Powered By mention at the end of the readme. - -For sections, "pre", "body" and "post" are supported. Example: -``` -"support": { - "pre": "highlight.md", - "body": "https://raw.githubusercontent.com/runcommand/runcommand-theme/master/bin/readme-partials/support-open-source.md", - "post": "This is additional text to show after main body content." -}, -``` In this example: - -* "pre" content is pulled from local highlight.md file. -* "body" content is pulled from remote URL. -* "post" is a string. - -### OPTIONS - -<dir> -: Directory path to an existing package to generate a readme for. - -[\--force] -: Overwrite the readme if it already exists. - -[\--branch=<branch>] -: Name of default branch of the underlying repository. Defaults to master. - -### 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/package-tests.md b/commands/scaffold/package-tests.md deleted file mode 100644 index 20601f2d..00000000 --- a/commands/scaffold/package-tests.md +++ /dev/null @@ -1,110 +0,0 @@ -# wp scaffold package-tests - -Generate files for writing Behat tests for your command. - -This command runs on the `before_wp_load` hook, just before the WP load process begins. - -WP-CLI makes use of a Behat-based testing framework, which you should use too. This command generates all of the files you need. Functional tests are an integral ingredient of high-quality, maintainable commands. Behat is a great choice as a testing framework because: - -* It’s easy to write new tests, which means they’ll actually get written. -* The tests interface with your command in the same manner as your users interface with your command, and they describe how the command is expected to work in human-readable terms. - -Behat tests live in the `features/` directory of your project. When you use this command, it will generate a default test that looks like this: - -``` -Feature: Test that WP-CLI loads. - - Scenario: WP-CLI loads for your tests - Given a WP install - - When I run `wp eval 'echo "Hello world.";'` - Then STDOUT should contain: - """ - Hello world. - """ -``` - -Functional tests typically follow this pattern: - -* **Given** some background, -* **When** a user performs a specific action, -* **Then** the end result should be X (and Y and Z). - -View all defined Behat steps available for use with `behat -dl`: - -``` -Given /^an empty directory$/ -Given /^an empty cache/ -Given /^an? ([^\s]+) file:$/ -Given /^"([^"]+)" replaced with "([^"]+)" in the ([^\s]+) file$/ -``` - -The files generated by this command include: - -* `.travis.yml` is the configuration file for Travis CI. -* `bin/install-package-tests.sh` will configure your environment to run the tests. -* `bin/test.sh` is a test runner that respects contextual Behat tags. -* `features/load-wp-cli.feature` is a basic test to confirm WP-CLI can load. -* `features/bootstrap`, `features/steps`, `features/extra` are Behat configuration files. - -After running `bin/install-package-tests.sh`, you can run the tests with `./vendor/bin/behat`. If you find yourself using Behat on a number of projects and don't want to install a copy with each one, you can `composer global require behat/behat` to install Behat globally on your machine. Make sure `~/.composer/vendor/bin` has also been added to your `$PATH`. Once you've done so, you can run the tests for a project by calling `behat`. - -For Travis CI, specially-named files in the package directory can be used to modify the generated `.travis.yml`, where `<tag>` is one of -'cache', 'env', 'matrix', 'before_install', 'install', 'before_script', 'script': -* `travis-<tag>.yml` - contents used for `<tag>:` (if present following ignored) -* `travis-<tag>-append.yml` - contents appended to generated `<tag>:` - -You can also append to the generated `.travis.yml` with the file: -* `travis-append.yml` - contents appended to generated `.travis.yml` - -### ENVIRONMENT - -The `features/bootstrap/FeatureContext.php` file expects the WP_CLI_BIN_DIR environment variable. - -WP-CLI Behat framework uses Behat ~2.5, which is installed with Composer. - -### OPTIONS - -<dir> -: Directory path to an existing package to generate tests for. - -[\--ci=<provider>] -: Create a configuration file for a specific CI provider. -\--- -default: travis -options: - - travis - - circle - - github -\--- - -[\--force] -: Overwrite files that already exist. - -### EXAMPLES - - # Generate files for writing Behat tests. - $ wp scaffold package-tests /path/to/command/dir/ - Success: Created package test files. - -### 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/plugin-tests.md b/commands/scaffold/plugin-tests.md index ef63f92e..f93c6f1b 100644 --- a/commands/scaffold/plugin-tests.md +++ b/commands/scaffold/plugin-tests.md @@ -11,7 +11,7 @@ The following files are generated by default: * `tests/test-sample.php` is a sample file containing the actual tests. * `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules. -Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/). +Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/). ### ENVIRONMENT @@ -33,6 +33,7 @@ options: - circle - gitlab - bitbucket + - github \--- [\--force] diff --git a/commands/scaffold/plugin.md b/commands/scaffold/plugin.md index b880ec74..8132eb17 100644 --- a/commands/scaffold/plugin.md +++ b/commands/scaffold/plugin.md @@ -54,6 +54,7 @@ default: circle options: - circle - gitlab + - github \--- [\--activate] diff --git a/commands/scaffold/theme-tests.md b/commands/scaffold/theme-tests.md index a214fa20..98035d16 100644 --- a/commands/scaffold/theme-tests.md +++ b/commands/scaffold/theme-tests.md @@ -11,7 +11,7 @@ The following files are generated by default: * `tests/test-sample.php` is a sample file containing the actual tests. * `.phpcs.xml.dist` is a collection of PHP_CodeSniffer rules. -Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/plugin-unit-tests/). +Learn more from the [plugin unit tests documentation](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/). ### ENVIRONMENT @@ -33,6 +33,7 @@ options: - circle - gitlab - bitbucket + - github \--- [\--force] diff --git a/commands/server.md b/commands/server.md index 71e8212f..e724f036 100644 --- a/commands/server.md +++ b/commands/server.md @@ -2,6 +2,8 @@ Launches PHP's built-in web server for a specific WordPress installation. +This command runs on the `before_wp_load` hook, just before the WP load process begins. + Uses `php -S` to launch a web server serving the WordPress webroot. <http://php.net/manual/en/features.commandline.webserver.php> diff --git a/commands/site/deactivate.md b/commands/site/deactivate.md index bfc86e4d..9382df42 100644 --- a/commands/site/deactivate.md +++ b/commands/site/deactivate.md @@ -15,8 +15,8 @@ Deactivates one or more sites. $ wp site deactivate 123 Success: Site 123 deactivated. - $ wp site deactivate --slug=demo - Success: Site 123 marked as deactivated. + $ wp site deactivate --slug=demo + Success: Site 123 deactivated. ### GLOBAL PARAMETERS diff --git a/commands/scaffold/package.md b/commands/site/generate.md similarity index 53% rename from commands/scaffold/package.md rename to commands/site/generate.md index 8c11087d..3fe08492 100644 --- a/commands/scaffold/package.md +++ b/commands/site/generate.md @@ -1,64 +1,43 @@ -# wp scaffold package +# wp site generate -Generate the files needed for a basic WP-CLI command. +Generate some sites. -This command runs on the `before_wp_load` hook, just before the WP load process begins. - -Default behavior is to create the following files: -- command.php -- composer.json (with package name, description, and license) -- .gitignore, .editorconfig, and .distignore -- README.md (via wp scaffold package-readme) -- Test harness (via wp scaffold package-tests) - -Unless specified with `--dir=<dir>`, the command package is placed in the WP-CLI `packages/local/` directory. +Creates a specified number of new sites. ### OPTIONS -<name> -: Name for the new package. Expects <author>/<package> (e.g. 'wp-cli/scaffold-package'). - -[\--description=<description>] -: Human-readable description for the package. - -[\--homepage=<homepage>] -: Homepage for the package. Defaults to 'https://github.com/<name>' - -[\--dir=<dir>] -: Specify a destination directory for the command. Defaults to WP-CLI's `packages/local/` directory. - -[\--license=<license>] -: License for the package. +[\--count=<number>] +: How many sites to generates? \--- -default: MIT +default: 100 \--- -[\--require_wp_cli=<version>] -: Required WP-CLI version for the package. -\--- -default: ^2.5 -\--- +[\--slug=<slug>] +: Path for the new site. Subdomain on subdomain installs, directory on subdirectory installs. -[\--require_wp_cli_tests=<version>] -: Required WP-CLI testing framework version for the package. -\--- -default: ^3.0.11 -\--- +[\--email=<email>] +: Email for admin user. User will be created if none exists. Assignment to super admin if not included. -[\--skip-tests] -: Don't generate files for integration testing. +[\--network_id=<network-id>] +: Network to associate new site with. Defaults to current network (typically 1). -[\--skip-readme] -: Don't generate a README.md for the package. +[\--private] +: If set, the new site will be non-public (not indexed) -[\--skip-github] -: Don't generate GitHub issue and pull request templates. +[\--format=<format>] +: Render output in a particular format. +\--- +default: progress +options: + - progress + - ids +\--- -[\--skip-install] -: Don't install the package after scaffolding. +### EXAMPLES -[\--force] -: Overwrite files that already exist. + # Generate 10 sites. + $ wp site generate --count=10 + Generating sites 100% [================================================] 0:01 / 0:04 ### GLOBAL PARAMETERS diff --git a/commands/super-admin.md b/commands/super-admin.md index 5b6fcbff..728f9744 100644 --- a/commands/super-admin.md +++ b/commands/super-admin.md @@ -4,17 +4,17 @@ Lists, adds, or removes super admin users on a multisite installation. ### EXAMPLES - # List user with super-admin capabilities + # List user with super-admin capabilities. $ wp super-admin list supervisor administrator # Grant super-admin privileges to the user. $ wp super-admin add superadmin2 - Success: Granted super-admin capabilities. + Success: Granted super-admin capabilities to 1 user. - # Revoke super-admin privileges to the user. + # Revoke super-admin privileges from the user. $ wp super-admin remove superadmin2 - Success: Revoked super-admin capabilities. + Success: Revoked super-admin capabilities from 1 user. diff --git a/commands/super-admin/add.md b/commands/super-admin/add.md index 03948d33..b93b9dba 100644 --- a/commands/super-admin/add.md +++ b/commands/super-admin/add.md @@ -9,8 +9,9 @@ Grants super admin privileges to one or more users. ### EXAMPLES + # Grant super-admin privileges to the user. $ wp super-admin add superadmin2 - Success: Granted super-admin capabilities. + Success: Granted super-admin capabilities to 1 user. ### GLOBAL PARAMETERS diff --git a/commands/super-admin/list.md b/commands/super-admin/list.md index 83c76ec8..78726985 100644 --- a/commands/super-admin/list.md +++ b/commands/super-admin/list.md @@ -14,12 +14,13 @@ options: - csv - json - count + - ids - yaml \--- ### EXAMPLES - # List user with super-admin capabilities + # List user with super-admin capabilities. $ wp super-admin list supervisor administrator diff --git a/commands/super-admin/remove.md b/commands/super-admin/remove.md index dafd8c3a..5401d21a 100644 --- a/commands/super-admin/remove.md +++ b/commands/super-admin/remove.md @@ -9,8 +9,9 @@ Removes super admin privileges from one or more users. ### EXAMPLES + # Revoke super-admin privileges from the user. $ wp super-admin remove superadmin2 - Success: Revoked super-admin capabilities. + Success: Revoked super-admin capabilities from 1 user. ### GLOBAL PARAMETERS diff --git a/commands/term/migrate.md b/commands/term/migrate.md index 1dc17b33..a83a8032 100644 --- a/commands/term/migrate.md +++ b/commands/term/migrate.md @@ -26,9 +26,10 @@ options: # Migrate a category's term (video) to tag taxonomy. $ wp term migrate 9190 --from=category --to=post_tag - Term '9190' migrated! - Old instance of term '9190' removed from its original taxonomy. - Success: Migrated the term '9190' from taxonomy 'category' to taxonomy 'post_tag' for 1 posts + Term 'video' assigned to post 1155. + Term 'video' migrated. + Old instance of term 'video' removed from its original taxonomy. + Success: Migrated the term 'video' from taxonomy 'category' to taxonomy 'post_tag' for 1 post. ### GLOBAL PARAMETERS diff --git a/commands/theme.md b/commands/theme.md index 6e3e0890..06095ecc 100644 --- a/commands/theme.md +++ b/commands/theme.md @@ -15,6 +15,7 @@ See the WordPress [Theme Handbook](https://developer.wordpress.org/themes/) deve Theme installed successfully. Activating 'twentysixteen'... Success: Switched to 'Twenty Sixteen' theme. + Success: Installed 1 of 1 themes. # Get details of an installed theme $ wp theme get twentysixteen --fields=name,title,version diff --git a/commands/theme/install.md b/commands/theme/install.md index c00e60f6..a22bf6eb 100644 --- a/commands/theme/install.md +++ b/commands/theme/install.md @@ -30,6 +30,7 @@ Installs one or more themes. Theme installed successfully. Activating 'twentysixteen'... Success: Switched to 'Twenty Sixteen' theme. + Success: Installed 1 of 1 themes. # Install from a local zip file $ wp theme install ../my-theme.zip diff --git a/commands/theme/list.md b/commands/theme/list.md index 882cacf0..7dc8c02a 100644 --- a/commands/theme/list.md +++ b/commands/theme/list.md @@ -46,6 +46,7 @@ These fields will be displayed by default for each theme: * update * version * update_version +* auto_update These fields are optionally available: @@ -53,15 +54,14 @@ These fields are optionally available: * update_id * title * description -* auto_update ### EXAMPLES - # List themes + # List inactive themes. $ wp theme list --status=inactive --format=csv - name,status,update,version,update_version - twentyfourteen,inactive,none,1.7, - twentysixteen,inactive,available,1.1, + name,status,update,version,update_version,auto_update + twentyfourteen,inactive,none,3.8,,off + twentysixteen,inactive,available,3.0,3.1,off ### GLOBAL PARAMETERS diff --git a/commands/theme/mod.md b/commands/theme/mod.md index ae11dfbd..59fd5fef 100644 --- a/commands/theme/mod.md +++ b/commands/theme/mod.md @@ -6,7 +6,7 @@ Sets, gets, and removes theme mods. # Set the 'background_color' theme mod to '000000'. $ wp theme mod set background_color 000000 - Success: Theme mod background_color set to 000000 + Success: Theme mod background_color set to 000000. # Get single theme mod in JSON format. $ wp theme mod get background_color --format=json diff --git a/commands/theme/mod/set.md b/commands/theme/mod/set.md index 30399b3a..9d45aeee 100644 --- a/commands/theme/mod/set.md +++ b/commands/theme/mod/set.md @@ -14,7 +14,7 @@ Sets the value of a theme mod. # Set theme mod $ wp theme mod set background_color 000000 - Success: Theme mod background_color set to 000000 + Success: Theme mod background_color set to 000000. ### GLOBAL PARAMETERS diff --git a/commands/user.md b/commands/user.md index f1f72e27..4c723f68 100644 --- a/commands/user.md +++ b/commands/user.md @@ -21,6 +21,6 @@ See references for [Roles and Capabilities](https://codex.wordpress.org/Roles_an # Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567 - Success: Removed user 123 from http://example.com + Success: Removed user 123 from http://example.com. diff --git a/commands/user/application-password/list.md b/commands/user/application-password/list.md index 19c1f92f..aac1d6d2 100644 --- a/commands/user/application-password/list.md +++ b/commands/user/application-password/list.md @@ -26,6 +26,7 @@ options: - json - count - yaml + - ids \--- [\--orderby=<fields>] diff --git a/commands/user/delete.md b/commands/user/delete.md index 4f07a548..7a8cf471 100644 --- a/commands/user/delete.md +++ b/commands/user/delete.md @@ -22,12 +22,12 @@ On multisite, `wp user delete` only removes the user from the current site. Incl # Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567 - Success: Removed user 123 from http://example.com + 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 --field=ID) --reassign=2 - Success: Removed user 813 from http://example.com - Success: Removed user 578 from http://example.com + Success: Removed user 813 from http://example.com. + Success: Removed user 578 from http://example.com. # Delete all contributors in batches of 100 (avoid error: argument list too long: wp) $ wp user delete $(wp user list --role=contributor --field=ID | head -n 100) diff --git a/commands/scaffold/package-github.md b/commands/user/exists.md similarity index 72% rename from commands/scaffold/package-github.md rename to commands/user/exists.md index f0853847..c6f76b04 100644 --- a/commands/scaffold/package-github.md +++ b/commands/user/exists.md @@ -1,22 +1,26 @@ -# wp scaffold package-github +# wp user exists -Generate GitHub configuration files for your command. +Verifies whether a user exists. -This command runs on the `before_wp_load` hook, just before the WP load process begins. +Displays a success message if the user does exist. -Creates a variety of files to better manage your project on GitHub. These files include: +### OPTIONS -* `.github/ISSUE_TEMPLATE` - Text displayed when a user opens a new issue. -* `.github/PULL_REQUEST_TEMPLATE` - Text displayed when a user submits a pull request. -* `.github/settings.yml` - Configuration file for the [Probot settings app](https://probot.github.io/apps/settings/). +<id> +: The ID of the user to check. -### OPTIONS +### EXAMPLES -<dir> -: Directory path to an existing package to generate GitHub configuration for. + # The user exists. + $ wp user exists 1337 + Success: User with ID 1337 exists. + $ echo $? + 0 -[\--force] -: Overwrite files that already exist. + # The user does not exist. + $ wp user exists 10000 + $ echo $? + 1 ### GLOBAL PARAMETERS diff --git a/commands/user/import-csv.md b/commands/user/import-csv.md index 41d15ece..6bcd5da1 100644 --- a/commands/user/import-csv.md +++ b/commands/user/import-csv.md @@ -19,9 +19,9 @@ If the user already exists (matching the email address or login), then the user # Import users from local CSV file $ wp user import-csv /path/to/users.csv - Success: bobjones created - Success: newuser1 created - Success: existinguser created + Success: bobjones created. + Success: newuser1 created. + Success: existinguser created. # Import users from remote CSV file $ wp user import-csv http://example.com/users.csv diff --git a/commands/user/reset-password.md b/commands/user/reset-password.md index ef53b6b1..bcab2307 100644 --- a/commands/user/reset-password.md +++ b/commands/user/reset-password.md @@ -24,20 +24,26 @@ Resets the password for one or more users. Reset password for editor. Success: Passwords reset for 2 users. + # Reset and display the password. + $ wp user reset-password editor --show-password + Reset password for editor. + Password: N6hAau0fXZMN#rLCIirdEGOh + Success: Password reset for 1 user. + # Reset the password for one user, displaying only the new password, and not sending the change email. $ wp user reset-password admin --skip-email --porcelain yV6BP*!d70wg # Reset password for all users. $ wp user reset-password $(wp user list --format=ids) - Reset password for admin - Reset password for editor - Reset password for subscriber + Reset password for admin. + Reset password for editor. + Reset password for subscriber. Success: Passwords reset for 3 users. # Reset password for all users with a particular role. $ wp user reset-password $(wp user list --format=ids --role=administrator) - Reset password for admin + Reset password for admin. Success: Password reset for 1 user. ### GLOBAL PARAMETERS diff --git a/commands/user/signup.md b/commands/user/signup.md new file mode 100644 index 00000000..81105c60 --- /dev/null +++ b/commands/user/signup.md @@ -0,0 +1,28 @@ +# wp user signup + +Manages signups on a multisite installation. + +### EXAMPLES + + # List signups. + $ wp user signup list + +-----------+------------+---------------------+---------------------+--------+------------------+ + | signup_id | user_login | user_email | registered | active | activation_key | + +-----------+------------+---------------------+---------------------+--------+------------------+ + | 1 | bobuser | bobuser@example.com | 2024-03-13 05:46:53 | 1 | 7320b2f009266618 | + | 2 | johndoe | johndoe@example.com | 2024-03-13 06:24:44 | 0 | 9068d859186cd0b5 | + +-----------+------------+---------------------+---------------------+--------+------------------+ + + # Activate signup. + $ wp user signup activate 2 + Signup 2 activated. Password: bZFSGsfzb9xs + Success: Activated 1 of 1 signups. + + # Delete signup. + $ wp user signup delete 3 + Signup 3 deleted. + Success: Deleted 1 of 1 signups. + + + + diff --git a/commands/user/signup/activate.md b/commands/user/signup/activate.md new file mode 100644 index 00000000..bbaafd26 --- /dev/null +++ b/commands/user/signup/activate.md @@ -0,0 +1,37 @@ +# wp user signup activate + +Activates one or more signups. + +### OPTIONS + +<signup>... +: The signup ID, user login, user email, or activation key of the signup(s) to activate. + +### EXAMPLES + + # Activate signup. + $ wp user signup activate 2 + Signup 2 activated. Password: bZFSGsfzb9xs + Success: Activated 1 of 1 signups. + +### 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/signup/delete.md b/commands/user/signup/delete.md new file mode 100644 index 00000000..ab1aff44 --- /dev/null +++ b/commands/user/signup/delete.md @@ -0,0 +1,40 @@ +# wp user signup delete + +Deletes one or more signups. + +### OPTIONS + +[<signup>...] +: The signup ID, user login, user email, or activation key of the signup(s) to delete. + +[\--all] +: If set, all signups will be deleted. + +### EXAMPLES + + # Delete signup. + $ wp user signup delete 3 + Signup 3 deleted. + Success: Deleted 1 of 1 signups. + +### 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/signup/get.md b/commands/user/signup/get.md new file mode 100644 index 00000000..ad51c231 --- /dev/null +++ b/commands/user/signup/get.md @@ -0,0 +1,56 @@ +# wp user signup get + +Gets details about a signup. + +### OPTIONS + +<signup> +: The signup ID, user login, user email, or activation key. + +[\--field=<field>] +: Instead of returning the whole signup, returns the value of a single field. + +[\--fields=<fields>] +: Limit the output to specific fields. Defaults to all fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - yaml +\--- + +### EXAMPLES + + # Get signup. + $ wp user signup get 1 --field=user_login + bobuser + + # Get signup and export to JSON file. + $ wp user signup get bobuser --format=json > bobuser.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/user/signup/list.md b/commands/user/signup/list.md new file mode 100644 index 00000000..08ab9e77 --- /dev/null +++ b/commands/user/signup/list.md @@ -0,0 +1,84 @@ +# wp user signup list + +Lists signups. + +[\--<field>=<value>] +: Filter the list by a specific field. + +[\--field=<field>] +: Prints the value of a single field for each signup. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - ids + - json + - count + - yaml +\--- + +[\--per_page=<per_page>] +: Limits the signups to the given number. Defaults to none. + +### AVAILABLE FIELDS + +These fields will be displayed by default for each signup: + +* signup_id +* user_login +* user_email +* registered +* active +* activation_key + +These fields are optionally available: + +* domain +* path +* title +* activated +* meta + +### EXAMPLES + + # List signup IDs. + $ wp user signup list --field=signup_id + 1 + + # List all signups. + $ wp user signup list + +-----------+------------+---------------------+---------------------+--------+------------------+ + | signup_id | user_login | user_email | registered | active | activation_key | + +-----------+------------+---------------------+---------------------+--------+------------------+ + | 1 | bobuser | bobuser@example.com | 2024-03-13 05:46:53 | 1 | 7320b2f009266618 | + | 2 | johndoe | johndoe@example.com | 2024-03-13 06:24:44 | 0 | 9068d859186cd0b5 | + +-----------+------------+---------------------+---------------------+--------+------------------+ + +### 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/spam.md b/commands/user/spam.md index 53833999..9a4e0b57 100644 --- a/commands/user/spam.md +++ b/commands/user/spam.md @@ -1,17 +1,18 @@ # wp user spam -Marks one or more users as spam. +Marks one or more users as spam on multisite. ### OPTIONS -<id>... -: One or more IDs of users to mark as spam. +<user>... +: The user login, user email, or user ID of the user(s) to mark as spam. ### EXAMPLES + # Mark user as spam. $ wp user spam 123 User 123 marked as spam. - Success: Spamed 1 of 1 users. + Success: Spammed 1 of 1 users. ### GLOBAL PARAMETERS diff --git a/commands/user/term/add.md b/commands/user/term/add.md index 03362066..c4f3311d 100644 --- a/commands/user/term/add.md +++ b/commands/user/term/add.md @@ -4,6 +4,8 @@ Add a term to an object. Append the term to the existing set of terms on the object. +### OPTIONS + <id> : The ID of the object. diff --git a/commands/user/term/list.md b/commands/user/term/list.md index 5a5eb9fb..00a59256 100644 --- a/commands/user/term/list.md +++ b/commands/user/term/list.md @@ -2,6 +2,8 @@ List all terms associated with an object. +### OPTIONS + <id> : ID for the object. diff --git a/commands/user/term/set.md b/commands/user/term/set.md index 08259de9..74d62691 100644 --- a/commands/user/term/set.md +++ b/commands/user/term/set.md @@ -4,6 +4,8 @@ Set object terms. Replaces existing terms on the object. +### OPTIONS + <id> : The ID of the object. diff --git a/commands/user/unspam.md b/commands/user/unspam.md index 87a0e39a..9b92c282 100644 --- a/commands/user/unspam.md +++ b/commands/user/unspam.md @@ -1,14 +1,15 @@ # wp user unspam -Removes one or more users from spam. +Removes one or more users from spam on multisite. ### OPTIONS -<id>... -: One or more IDs of users to remove from spam. +<user>... +: The user login, user email, or user ID of the user(s) to remove from spam. ### EXAMPLES + # Remove user from spam. $ wp user unspam 123 User 123 removed from spam. Success: Unspamed 1 of 1 users. diff --git a/internal-api/wp-cli-get-config.md b/internal-api/wp-cli-get-config.md index ba16b0db..463fc878 100644 --- a/internal-api/wp-cli-get-config.md +++ b/internal-api/wp-cli-get-config.md @@ -19,7 +19,7 @@ Get values of global configuration parameters. ## Notes Provides access to `--path=`, `--url=`, and other values of -the [global configuration parameters](https://make.wordpress.org/cli/handbook/references/config/#global-parameters). +the [global configuration parameters](https://make.wordpress.org/cli/handbook/references/config/). ``` WP_CLI::log( 'The --url= value is: ' . WP_CLI::get_config( 'url' ) );