diff --git a/.actrc b/.actrc deleted file mode 100644 index 99e6b7ec..00000000 --- a/.actrc +++ /dev/null @@ -1,3 +0,0 @@ -# Configuration file for nektos/act. -# See https://github.com/nektos/act#configuration --P ubuntu-latest=shivammathur/node:latest diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 84f918ed..00000000 --- a/.editorconfig +++ /dev/null @@ -1,26 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -# WordPress Coding Standards -# https://make.wordpress.org/core/handbook/coding-standards/ - -# From https://github.com/WordPress/wordpress-develop/blob/trunk/.editorconfig with a couple of additions. - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = tab - -[{*.yml,*.feature,.jshintrc,*.json}] -indent_style = space -indent_size = 2 - -[*.md] -trim_trailing_whitespace = false - -[{*.txt,wp-config-sample.php}] -end_of_line = crlf diff --git a/.github/workflows/check-branch-alias.yml b/.github/workflows/check-branch-alias.yml deleted file mode 100644 index 78da6371..00000000 --- a/.github/workflows/check-branch-alias.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Check Branch Alias - -on: - release: - types: [released] - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -jobs: - check-branch-alias: - uses: wp-cli/.github/.github/workflows/reusable-check-branch-alias.yml@main diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml deleted file mode 100644 index 07e4fd1f..00000000 --- a/.github/workflows/code-quality.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Code Quality Checks - -on: - pull_request: - push: - branches: - - main - - master - -jobs: - code-quality: - uses: wp-cli/.github/.github/workflows/reusable-code-quality.yml@main diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml deleted file mode 100644 index d5e319e5..00000000 --- a/.github/workflows/copilot-setup-steps.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Copilot Setup Steps" - -on: - workflow_dispatch: - push: - paths: - - .github/workflows/copilot-setup-steps.yml - pull_request: - paths: - - .github/workflows/copilot-setup-steps.yml - -permissions: - contents: read - -jobs: - copilot-setup-steps: - name: Setup environment - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - name: Check existence of composer.json file - id: check_composer_file - run: echo "files_exists=$(test -f composer.json && echo true || echo false)" >> "$GITHUB_OUTPUT" - - - name: Set up PHP environment - if: steps.check_composer_file.outputs.files_exists == 'true' - uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2 - with: - php-version: 'latest' - ini-values: zend.assertions=1, error_reporting=-1, display_errors=On - coverage: 'none' - tools: composer,cs2pr - env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install Composer dependencies & cache dependencies - if: steps.check_composer_file.outputs.files_exists == 'true' - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - env: - COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml deleted file mode 100644 index 68334703..00000000 --- a/.github/workflows/issue-triage.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Issue and PR Triage - -'on': - issues: - types: [opened] - pull_request_target: - types: [opened] - workflow_dispatch: - inputs: - issue_number: - description: 'Issue/PR number to triage (leave empty to process all)' - required: false - type: string - -permissions: - issues: write - pull-requests: write - actions: write - contents: read - models: read - -jobs: - issue-triage: - uses: wp-cli/.github/.github/workflows/reusable-issue-triage.yml@main - with: - issue_number: >- - ${{ - (github.event_name == 'workflow_dispatch' && inputs.issue_number) || - (github.event_name == 'pull_request_target' && github.event.pull_request.number) || - (github.event_name == 'issues' && github.event.issue.number) || - '' - }} diff --git a/.github/workflows/manage-labels.yml b/.github/workflows/manage-labels.yml deleted file mode 100644 index 45711bde..00000000 --- a/.github/workflows/manage-labels.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Manage Labels - -'on': - workflow_dispatch: - push: - branches: - - main - - master - paths: - - 'composer.json' - -permissions: - issues: write - contents: read - -jobs: - manage-labels: - uses: wp-cli/.github/.github/workflows/reusable-manage-labels.yml@main diff --git a/.github/workflows/regenerate-readme.yml b/.github/workflows/regenerate-readme.yml deleted file mode 100644 index 6198d630..00000000 --- a/.github/workflows/regenerate-readme.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Regenerate README file - -on: - workflow_dispatch: - push: - branches: - - main - - master - paths-ignore: - - "features/**" - - "README.md" - -permissions: - contents: write - pull-requests: write - -jobs: - regenerate-readme: - uses: wp-cli/.github/.github/workflows/reusable-regenerate-readme.yml@main diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index 1044b798..00000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Testing - -on: - pull_request: - push: - branches: - - main - - master - schedule: - - cron: '17 1 * * *' # Run every day on a seemly random time. - -jobs: - test: - uses: wp-cli/.github/.github/workflows/reusable-testing.yml@main diff --git a/.github/workflows/welcome-new-contributors.yml b/.github/workflows/welcome-new-contributors.yml deleted file mode 100644 index bc01490b..00000000 --- a/.github/workflows/welcome-new-contributors.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Welcome New Contributors - -on: - pull_request_target: - types: [opened] - branches: - - main - - master - -permissions: - pull-requests: write - -jobs: - welcome: - uses: wp-cli/.github/.github/workflows/reusable-welcome-new-contributors.yml@main diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 1ff84f6d..00000000 --- a/AGENTS.md +++ /dev/null @@ -1,121 +0,0 @@ -# Instructions - -This package is part of WP-CLI, the official command line interface for WordPress. For a detailed explanation of the project structure and development workflow, please refer to the main @README.md file. - -## Best Practices for Code Contributions - -When contributing to this package, please adhere to the following guidelines: - -* **Follow Existing Conventions:** Before writing any code, analyze the existing codebase in this package to understand the coding style, naming conventions, and architectural patterns. -* **Focus on the Package's Scope:** All changes should be relevant to the functionality of the package. -* **Write Tests:** All new features and bug fixes must be accompanied by acceptance tests using Behat. You can find the existing tests in the `features/` directory. There may be PHPUnit unit tests as well in the `tests/` directory. -* **Update Documentation:** If your changes affect the user-facing functionality, please update the relevant inline code documentation. - -### Building and running - -Before submitting any changes, it is crucial to validate them by running the full suite of static code analysis and tests. To run the full suite of checks, execute the following command: `composer test`. - -This single command ensures that your changes meet all the quality gates of the project. While you can run the individual steps separately, it is highly recommended to use this single command to ensure a comprehensive validation. - -### Useful Composer Commands - -The project uses Composer to manage dependencies and run scripts. The following commands are available: - -* `composer install`: Install dependencies. -* `composer test`: Run the full test suite, including linting, code style checks, static analysis, and unit/behavior tests. -* `composer lint`: Check for syntax errors. -* `composer phpcs`: Check for code style violations. -* `composer phpcbf`: Automatically fix code style violations. -* `composer phpstan`: Run static analysis. -* `composer phpunit`: Run unit tests. -* `composer behat`: Run behavior-driven tests. - -### Coding Style - -The project follows the `WP_CLI_CS` coding standard, which is enforced by PHP_CodeSniffer. The configuration can be found in `phpcs.xml.dist`. Before submitting any code, please run `composer phpcs` to check for violations and `composer phpcbf` to automatically fix them. - -## Documentation - -The `README.md` file might be generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). In that case, changes need to be made against the corresponding part of the codebase. - -### Inline Documentation - -Only write high-value comments if at all. Avoid talking to the user through comments. - -## Testing - -The project has a comprehensive test suite that includes unit tests, behavior-driven tests, and static analysis. - -* **Unit tests** are written with PHPUnit and can be found in the `tests/` directory. The configuration is in `phpunit.xml.dist`. -* **Behavior-driven tests** are written with Behat and can be found in the `features/` directory. The configuration is in `behat.yml`. -* **Static analysis** is performed with PHPStan. - -All tests are run on GitHub Actions for every pull request. - -When writing tests, aim to follow existing patterns. Key conventions include: - -* When adding tests, first examine existing tests to understand and conform to established conventions. -* For unit tests, extend the base `WP_CLI\Tests\TestCase` test class. -* For Behat tests, only WP-CLI commands installed in `composer.json` can be run. - -### Behat Steps - -WP-CLI makes use of a Behat-based testing framework and provides a set of custom step definitions to write feature tests. - -> **Note:** If you are expecting an error output in a test, you need to use `When I try ...` instead of `When I run ...` . - -#### Given - -* `Given an empty directory` - Creates an empty directory. -* `Given /^an? (empty|non-existent) ([^\s]+) directory$/` - Creates or deletes a specific directory. -* `Given an empty cache` - Clears the WP-CLI cache directory. -* `Given /^an? ([^\s]+) (file|cache file):$/` - Creates a file with the given contents. -* `Given /^"([^"]+)" replaced with "([^"]+)" in the ([^\s]+) file$/` - Search and replace a string in a file using regex. -* `Given /^that HTTP requests to (.*?) will respond with:$/` - Mock HTTP requests to a given URL. -* `Given WP files` - Download WordPress files without installing. -* `Given wp-config.php` - Create a wp-config.php file using `wp config create`. -* `Given a database` - Creates an empty database. -* `Given a WP install(ation)` - Installs WordPress. -* `Given a WP install(ation) in :subdir` - Installs WordPress in a given directory. -* `Given a WP install(ation) with Composer` - Installs WordPress with Composer. -* `Given a WP install(ation) with Composer and a custom vendor directory :vendor_directory` - Installs WordPress with Composer and a custom vendor directory. -* `Given /^a WP multisite (subdirectory|subdomain)?\s?(install|installation)$/` - Installs WordPress Multisite. -* `Given these installed and active plugins:` - Installs and activates one or more plugins. -* `Given a custom wp-content directory` - Configure a custom `wp-content` directory. -* `Given download:` - Download multiple files into the given destinations. -* `Given /^save (STDOUT|STDERR) ([\'].+[^\'])?\s?as \{(\w+)\}$/` - Store STDOUT or STDERR contents in a variable. -* `Given /^a new Phar with (?:the same version|version "([^"]+)")$/` - Build a new WP-CLI Phar file with a given version. -* `Given /^a downloaded Phar with (?:the same version|version "([^"]+)")$/` - Download a specific WP-CLI Phar version from GitHub. -* `Given /^save the (.+) file ([\'].+[^\'])? as \{(\w+)\}$/` - Stores the contents of the given file in a variable. -* `Given a misconfigured WP_CONTENT_DIR constant directory` - Modify wp-config.php to set `WP_CONTENT_DIR` to an empty string. -* `Given a dependency on current wp-cli` - Add `wp-cli/wp-cli` as a Composer dependency. -* `Given a PHP built-in web server` - Start a PHP built-in web server in the current directory. -* `Given a PHP built-in web server to serve :subdir` - Start a PHP built-in web server in the given subdirectory. - -#### When - -* ``When /^I launch in the background `([^`]+)`$/`` - Launch a given command in the background. -* ``When /^I (run|try) `([^`]+)`$/`` - Run or try a given command. -* ``When /^I (run|try) `([^`]+)` from '([^\s]+)'$/`` - Run or try a given command in a subdirectory. -* `When /^I (run|try) the previous command again$/` - Run or try the previous command again. - -#### Then - -* `Then /^the return code should( not)? be (\d+)$/` - Expect a specific exit code of the previous command. -* `Then /^(STDOUT|STDERR) should( strictly)? (be|contain|not contain):$/` - Check the contents of STDOUT or STDERR. -* `Then /^(STDOUT|STDERR) should be a number$/` - Expect STDOUT or STDERR to be a numeric value. -* `Then /^(STDOUT|STDERR) should not be a number$/` - Expect STDOUT or STDERR to not be a numeric value. -* `Then /^STDOUT should be a table containing rows:$/` - Expect STDOUT to be a table containing the given rows. -* `Then /^STDOUT should end with a table containing rows:$/` - Expect STDOUT to end with a table containing the given rows. -* `Then /^STDOUT should be JSON containing:$/` - Expect valid JSON output in STDOUT. -* `Then /^STDOUT should be a JSON array containing:$/` - Expect valid JSON array output in STDOUT. -* `Then /^STDOUT should be CSV containing:$/` - Expect STDOUT to be CSV containing certain values. -* `Then /^STDOUT should be YAML containing:$/` - Expect STDOUT to be YAML containing certain content. -* `Then /^(STDOUT|STDERR) should be empty$/` - Expect STDOUT or STDERR to be empty. -* `Then /^(STDOUT|STDERR) should not be empty$/` - Expect STDOUT or STDERR not to be empty. -* `Then /^(STDOUT|STDERR) should be a version string (<|<=|>|>=|==|=|<>) ([+\w.{}-]+)$/` - Expect STDOUT or STDERR to be a version string comparing to the given version. -* `Then /^the (.+) (file|directory) should( strictly)? (exist|not exist|be:|contain:|not contain):$/` - Expect a certain file or directory to (not) exist or (not) contain certain contents. -* `Then /^the contents of the (.+) file should( not)? match (((\/.*\/)|(#.#))([a-z]+)?)$/` - Match file contents against a regex. -* `Then /^(STDOUT|STDERR) should( not)? match (((\/.*\/)|(#.#))([a-z]+)?)$/` - Match STDOUT or STDERR against a regex. -* `Then /^an email should (be sent|not be sent)$/` - Expect an email to be sent (or not). -* `Then the HTTP status code should be :code` - Expect the HTTP status code for visiting `http://localhost:8080`. diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..07dab832 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +wp-cli.org diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 32d24cd4..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2012-2018 WP-CLI Development Group (https://github.com/wp-cli/wp-cli.github.com/contributors) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/README.md b/README.md index 51421adb..24bcf45a 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,7 @@ SUBCOMMANDS ### How to translate -1. Add your language to `[_config.yml](https://github.com/wp-cli/wp-cli.github.com/blob/main/_config.yml)`. +1. Add your language to `[_config.yml](https://github.com/wp-cli/wp-cli.github.com/blob/master/_config.yml)`. 2. Create a folder under the name of your appropriate language code (IETF language tag). e.g. ja or pt_BR -3. Copy the *English* `index.md` into your language's directory. +3. Copy `index.md` into your language's directory. 4. Translate `index.md`. - -Note: Please avoid using a language file other than the English one in the root folder as your source for translating, as it might not be up-to-date. The root `index.md` is considered to be the source of truth and is the only one guaranteed to be current. diff --git a/_config.yml b/_config.yml index 99a9a947..fa4ac99f 100644 --- a/_config.yml +++ b/_config.yml @@ -5,7 +5,7 @@ markdown: kramdown gems: - jekyll-paginate - jekyll-redirect-from -url: https://wp-cli.org +url: http://wp-cli.org permalink: /blog/:title.html paginate: 10 paginate_path: /blog/page:num @@ -18,15 +18,18 @@ exclude: - README.md navigation: - text: Commands - url: https://developer.wordpress.org/cli/commands/ + url: /commands/ - text: Configuration - url: https://make.wordpress.org/cli/handbook/config/ -- text: Handbook - url: https://make.wordpress.org/cli/handbook/ + url: /config/ +- text: Docs + url: /docs/ - text: Blog - url: https://make.wordpress.org/cli/ -- text: Contributing - url: https://make.wordpress.org/cli/handbook/contributing/ + url: /blog/ + layout: post +- text: Packages + url: /package-index/ +- text: RESTful WP-CLI + url: /restful/ languages: - label: English iso-alpha2: en @@ -34,9 +37,6 @@ languages: - label: Japanese iso-alpha2: ja path: /ja/ -- label: Persian (Farsi) - iso-alpha2: fa - path: /fa/ - label: Français iso-alpha2: fr path: /fr/ @@ -58,12 +58,3 @@ languages: - label: Italiano iso-alpha2: it path: /it/ -- label: Español - iso-alpha2: es - path: /es/ -- label: Română - iso-alpha2: ro - path: /ro/ -- label: 简体中文 - iso-alpha2: zh-cn - path: /zh-cn/ diff --git a/_includes/cmd-list.html b/_includes/cmd-list.html new file mode 100644 index 00000000..ac901c9e --- /dev/null +++ b/_includes/cmd-list.html @@ -0,0 +1,140 @@ +
The command line interface for WordPressQuick links: + {% for quick_link in page.quick_links %} + {% capture link %}{{ quick_link | slugify }}{% endcapture %} + {{quick_link}} {% if forloop.last == false %}|{% endif %} + {% endfor %} +
+{% endif %} + +{{ content }} + +{% include footer.html %} diff --git a/_posts/2012-11-05-new-home.md b/_posts/2012-11-05-new-home.md index 6db9b4e1..c617d93d 100644 --- a/_posts/2012-11-05-new-home.md +++ b/_posts/2012-11-05-new-home.md @@ -8,4 +8,4 @@ Welcome to the new website for the WP-CLI project! wp-cli already has a public [code repository](https://github.com/wp-cli/wp-cli), an [issue tracker](https://github.com/wp-cli/wp-cli/issues) and a [wiki](https://github.com/wp-cli/wp-cli/wiki). The only thing that was missing was a blog for publishing release notes and other news. -Since GitHub has built-in support for [Jekyll](https://github.com/mojombo/jekyll/wiki), I decided to use that. The code for this website is also public: [github.com/wp-cli/wp-cli.github.com](https://github.com/wp-cli/wp-cli.github.com) +Since github has built-in support for [Jekyll](https://github.com/mojombo/jekyll/wiki), I decided to use that. The code for this website is also public: [github.com/wp-cli/wp-cli.github.com](https://github.com/wp-cli/wp-cli.github.com) diff --git a/_posts/2012-11-10-wp-shell.md b/_posts/2012-11-10-wp-shell.md index 4a380785..cb478d35 100644 --- a/_posts/2012-11-10-wp-shell.md +++ b/_posts/2012-11-10-wp-shell.md @@ -21,4 +21,4 @@ Here's a contrived example session: wp> exit scribu@air:~/wp/core$ -`wp shell` will be available in the 0.7 release of WP-CLI, but if you want to try it out right now, clone the [latest version](https://github.com/wp-cli/wp-cli) from GitHub. If you have suggestions for making it better, don't hesitate to open issues and pull requests. +`wp shell` will be available in the 0.7 release of WP-CLI, but if you want to try it out right now, clone the [latest version](https://github.com/wp-cli/wp-cli) from github. If you have suggestions for making it better, don't hesitate to open issues and pull requests. diff --git a/_posts/2013-06-15-version-0.10.1.md b/_posts/2013-06-15-version-0.10.1.md index ef0f4e46..121168f2 100644 --- a/_posts/2013-06-15-version-0.10.1.md +++ b/_posts/2013-06-15-version-0.10.1.md @@ -17,4 +17,4 @@ Internals: * show warning if a URL redirect is attempted while using WP-CLI -You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=11&state=closed) on GitHub. +You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=11&state=closed) on Github. diff --git a/_posts/2013-06-26-version-0.10.2.md b/_posts/2013-06-26-version-0.10.2.md index 28a59aec..207b3378 100644 --- a/_posts/2013-06-26-version-0.10.2.md +++ b/_posts/2013-06-26-version-0.10.2.md @@ -16,4 +16,4 @@ Internals: * fix required version for php-cli-tools package -You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=12&state=closed) on GitHub. +You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=12&state=closed) on Github. diff --git a/_posts/2013-08-05-version-0.11.md b/_posts/2013-08-05-version-0.11.md index 9356b9e2..3499643a 100644 --- a/_posts/2013-08-05-version-0.11.md +++ b/_posts/2013-08-05-version-0.11.md @@ -51,6 +51,6 @@ Internals: * support passing `--require=` multiple times * deprecated `WP_CLI::add_man_dir()` -You can also browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=10&state=closed) on GitHub. +You can also browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=10&state=closed) on Github. Contributors to this release: [dangardner](https://github.com/dangardner), [danielbachhuber](https://github.com/danielbachhuber), [eugeneware](https://github.com/eugeneware), [jmslbam](https://github.com/jmslbam), [johnbillion](https://github.com/johnbillion), [MiteshShah](https://github.com/MiteshShah), [om4james](https://github.com/om4james), [scribu](https://github.com/scribu), [twratajczak](https://github.com/twratajczak), [Veered](https://github.com/Veered). diff --git a/_posts/2013-08-08-version-0.11.1.md b/_posts/2013-08-08-version-0.11.1.md index fd6d60bb..a85f8253 100644 --- a/_posts/2013-08-08-version-0.11.1.md +++ b/_posts/2013-08-08-version-0.11.1.md @@ -20,6 +20,6 @@ Internals: * fixed synopsis parser bug where arguments with vertical bars would be ignored * added support for `WP_CLI_PHP_ARGS` environment variable -You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=15&state=closed) on GitHub. +You can also browse the list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=15&state=closed) on Github. Contributors to this release: [c10b10](https://github.com/c10b10), [jmslbam](https://github.com/jmslbam), [scribu](https://github.com/scribu). diff --git a/_posts/2013-10-04-version-0.12.md b/_posts/2013-10-04-version-0.12.md index af9d9043..bd5f180b 100644 --- a/_posts/2013-10-04-version-0.12.md +++ b/_posts/2013-10-04-version-0.12.md @@ -33,7 +33,7 @@ This nifty little parameter changes the behaviour of commands when required argu ### Phar archives are back -They were originally introduced in [version 0.9](https://wp-cli.org/blog/version-0.9.html) and... ahem, naively abandoned in the next release with the introduction of the installer script. +They were originally introduced in [version 0.9](http://wp-cli.org/blog/version-0.9.html) and... ahem, naively abandoned in the next release with the introduction of the installer script. The installer uses Composer, which has its own environmental requirements, but, more importantly, it has to fetch all of the packages WP-CLI depends on, which is both less reliable and slower than downloading a single file that contains everything. @@ -60,7 +60,7 @@ So, phar archives can be downloaded from the [wp-cli/builds](https://github.com/ * `wp plugin is-installed` and `wp theme is-installed` * `wp user add-cap`, `wp user remove-cap` and `wp user list-caps` -You can browse the full list of [resolved issues](https://github.com/WP-CLI/WP-CLI/issues?milestone=14&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/WP-CLI/WP-CLI/issues?milestone=14&state=closed) on Github. [1]: https://github.com/wp-cli/wp-cli/issues/792#issuecomment-25376430 [2]: https://github.com/wp-cli/wp-cli/pull/786 diff --git a/_posts/2013-10-11-version-0.12.1.md b/_posts/2013-10-11-version-0.12.1.md index 2c15fc59..e78eff00 100644 --- a/_posts/2013-10-11-version-0.12.1.md +++ b/_posts/2013-10-11-version-0.12.1.md @@ -11,6 +11,6 @@ Hot on the heels of the [0.12 release](/blog/version-0.12.html) comes a minor re * made the `--post__in=` parameter in `wp post list` work * added `--match=` argument for `wp rewrite list` + other improvements -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=18&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=18&page=1&state=closed) on Github. Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber), [mattes](https://github.com/mattes), [scribu](https://github.com/scribu) diff --git a/_posts/2013-10-24-how-wp-cli-loads-wordpress.md b/_posts/2013-10-24-how-wp-cli-loads-wordpress.md index 21ab3374..bd8ee44a 100644 --- a/_posts/2013-10-24-how-wp-cli-loads-wordpress.md +++ b/_posts/2013-10-24-how-wp-cli-loads-wordpress.md @@ -15,7 +15,7 @@ She figures that if she manages to load the WP environment from a CLI script, th Shelly is pleased; her script even works on multisite installs. Both the host name and the path to the WordPress install are hardcoded, but she can figure ways around that later. -With her geeky curiosity satisfied, she lazily types in a Google search, to check if anyone else has solved this problem. The first result is a project called WP-CLI. She installs it and tries out a few commands - it seems to work pretty well. +With her geeky curiosity satisfied, she lazily types in a google search, to check if anyone else has solved this problem. The first result is a project called WP-CLI. She installs it and tries out a few commands - it seems to work pretty well. She then goes to the WP-CLI source and searches for 'wp-load.php', to see how it handles the WordPress bootstrapping - 0 results. Puzzled, she starts going through the first file that gets executed and eventually reaches one called `wp-setting-cli.php`. This strikes Shelly as peculiar, since she encountered a similar file in WordPress Core. She signs into the project's IRC channel. diff --git a/_posts/2013-11-30-version-0.13.md b/_posts/2013-11-30-version-0.13.md index 1a46306f..332f2390 100644 --- a/_posts/2013-11-30-version-0.13.md +++ b/_posts/2013-11-30-version-0.13.md @@ -32,7 +32,7 @@ We have simplified the process of [setting up and running plugin tests](https:// It fetches the test library from the new `develop.svn.wordpress.org` repository. -Also, the Travis build no longer depends on the GitHub mirror of WordPress. +Also, the Travis build no longer depends on the Github mirror of WordPress. ### Improved downloads @@ -72,6 +72,6 @@ Misc: * removed `wp core init-tests` command ([context](https://github.com/wp-cli/wp-cli/pull/885)) * renamed `WP_CLI::add_action()` to `WP_CLI::add_hook()` ([context](https://github.com/wp-cli/wp-cli/pull/845)) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=19&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=19&page=1&state=closed) on Github. Contributors to this release: [BoiteAWeb](https://github.com/BoiteAWeb), [ctayloroomphinc](https://github.com/ctayloroomphinc), [danielbachhuber](https://github.com/danielbachhuber), [dd32](https://github.com/dd32), [francescolaffi](https://github.com/francescolaffi), [jonathanbardo](https://github.com/jonathanbardo), [Kevinlearynet](https://github.com/Kevinlearynet), [leewillis77](https://github.com/leewillis77), [nickdaugherty](https://github.com/nickdaugherty), [QWp6t](https://github.com/QWp6t), [rodrigoprimo](https://github.com/rodrigoprimo), [ryanduff](https://github.com/ryanduff), [scribu](https://github.com/scribu), [simonwheatley](https://github.com/simonwheatley), [tiagohillebrandt](https://github.com/tiagohillebrandt), [tlovett1](https://github.com/tlovett1), [wojsmol](https://github.com/wojsmol). diff --git a/_posts/2014-02-06-version-0.14.md b/_posts/2014-02-06-version-0.14.md index c3d1ae32..1005954b 100644 --- a/_posts/2014-02-06-version-0.14.md +++ b/_posts/2014-02-06-version-0.14.md @@ -16,7 +16,7 @@ To make this not-common-enough scenario work, we had to once again call upon the ### Protection against running as root -If you try to run a WP-CLI command as the superuser, WP-CLI will refuse to run. In production environments, most of the commands should actually be run under the same user as the web server. But, in general, running commands as root is a bad idea. +If you try to run a WP-CLI command as the superuser, WP-CLI will refuse to run. In production environemnts, most of the commands should actually be run under the same user as the web server. But, in general, running commands as root is a bad idea. For example, if you run `wp media regenerate` as `root`, then the newly created thumbnail files will naturally be owned by `root`. If the web server is running under the `www-data` user, it won't be able to change these files (unless they're globally writable, which is less secure). So, the correct command would be `sudo -u www-data wp media regenerate`. @@ -60,7 +60,7 @@ You can also skip only particular plugins: `wp --skip-plugins=admin-blocker,comp * fixed issue with progress bar calling `tput` too often * execution is now aborted if too many positional parameters are passed or if an unknown associative parameter is passed -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=20&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=20&state=closed) on Github.| Name | +Description | +
|---|---|
| {{name}} | +{{description}} | +
-
-
-
-
-
+[](https://travis-ci.org/wp-cli/wp-cli) [](https://gemnasium.com/github.com/wp-cli/wp-cli) [](http://isitmaintained.com/project/wp-cli/wp-cli "Tempo médio para resolver um issue") [](http://isitmaintained.com/project/wp-cli/wp-cli "Percentual de issues ainda abertos")
-A versão estável mais recente é a [2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). Para manter-se atualizado, siga [@wpcli no Twitter](https://twitter.com/wpcli) ou [assine nossa newsletter](https://make.wordpress.org/cli/subscribe/). [Leia nosso plano de ação](https://make.wordpress.org/cli/handbook/roadmap/) para uma visão geral do que está sendo planejado para próximas versões.
-
-[](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [](https://isitmaintained.com/project/wp-cli/wp-cli "Tempo médio para resolver um issue") [](https://isitmaintained.com/project/wp-cli/wp-cli "Percentual de issues ainda abertos")
-
-Links rápidos: [Usando](#usando) | [Instalando](#instalando) | [Suporte](#suporte) | [Estendendo](#estendendo) | [Contribuindo](#contribuindo) | [Créditos](#créditos)
+Links rápidos: [Usando](#usando) | [Instalando](#instalando) | [Suporte](#suporte) | [Extendendo](#extendendo) | [Contribuindo](#contribuindo) | [Créditos](#creditos)
## Usando
-O objetivo da WP-CLI é fornecer uma interface em linha de comando para muitas das ações que você pode executar na administração do WordPress. Por exemplo, `wp plugin install --activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) permite a instalação e ativação de um plugin WordPress:
+O objetivo da WP-CLI é fornecer uma interface em linha de comando para qualquer ação que você queira executar na administração do WordPress. Por exemplo `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) permite a instação e ativação de um plugin WordPress:
```bash
-$ wp plugin install user-switching --activate
-Installing User Switching (1.0.9)
-Downloading installation package from https://downloads.wordpress.org/plugin/user-switching.1.0.9.zip...
+$ wp plugin install rest-api --activate
+Installing WordPress REST API (Version 2) (2.0-beta13)
+Downloading install package from https://downloads.wordpress.org/plugin/rest-api.2.0-beta13.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
-Activating 'user-switching'...
-Plugin 'user-switching' activated.
-Success: Installed 1 of 1 plugins.
+Activating 'rest-api'...
+Success: Plugin 'rest-api' activated.
```
-A WP-CLI também inclui muitos comandos para ações que não são possíveis através da administração do WordPress. Por exemplo, `wp transient delete --all` ([doc](https://developer.wordpress.org/cli/commands/transient/delete/)) permite excluir um ou todos os transients:
+WP-CLI também inclui muitos comandos para ações que não são possíveis através da administração do WordPress. Por exemplo, `wp transient delete --all` ([doc](https://wp-cli.org/commands/transient/delete-all/)) permite deletar uma ou todas as transients:
```bash
$ wp transient delete --all
Success: 34 transients deleted from the database.
```
-Para uma introdução mais completa sobre como usar a WP-CLI, leia o [Guia rápido](https://make.wordpress.org/cli/handbook/quick-start/). Veja também os [shell friends](https://make.wordpress.org/cli/handbook/shell-friends/) para saber mais sobre utilitários de linha de comando.
+Para uma introdução mais completa sobre como usar a WP-CLI, leia o [Guia rápido](https://wp-cli.org/docs/quick-start/).
-Já se sente confortável com o básico? Vá para a [lista completa de comandos](https://developer.wordpress.org/cli/commands/) para informações detalhadas sobre gerenciamento de temas e plugins, importação e exportação de dados, operações de busca e substituição no banco de dados e muito mais.
+Já se sente confortável com o básico? Vá para a [lista completa de comandos](https://wp-cli.org/commands/) para obter informações detalhadas na gestão de temas e plugins, importação e exportação de dados, operações de busca e substituição no banco de dados e muito mais.
## Instalando
-Baixar o arquivo Phar é o método de instalação que recomendamos para a maioria dos usuários. Caso precise, veja também a documentação sobre [métodos alternativos de instalação](https://make.wordpress.org/cli/handbook/installing/) ([Composer](https://make.wordpress.org/cli/handbook/installing/#installing-via-composer), [Homebrew](https://make.wordpress.org/cli/handbook/installing/#installing-via-homebrew), [Docker](https://make.wordpress.org/cli/handbook/installing/#installing-via-docker)).
+Realizar o download do arquivo Phar é o método de instalação que recomendamos. Caso precise, nossa documentação para [métodos alternativos de instação](https://wp-cli.org/docs/installing/).
-Antes de instalar a WP-CLI, tenha certeza de que seu ambiente cumpre os requisitos mínimos:
+Antes instalar a WP-CLI, certifique-se que seu ambiente possua os requesitos mínimos:
- Ambiente UNIX-like (OS X, Linux, FreeBSD, Cygwin); suporte limitado para ambientes Windows
-- PHP 5.6 ou superior
-- WordPress 3.7 ou superior. Versões do WordPress anteriores à mais recente podem ter funcionalidade reduzida
+- PHP 5.3.29 ou superior
+- WordPress 3.7 ou superior
-Após verificar os requisitos, baixe o arquivo [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) usando `wget` ou `curl`:
+Após verificar os requesitos, faça o download do arquivo [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) usando `wget` ou `curl`:
```bash
-curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
+$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
```
-Em seguida, verifique se o arquivo phar está funcionando:
+Em seguida, verifique se está funcionando:
```bash
-php wp-cli.phar --info
+$ php wp-cli.phar --info
```
-Para usar a WP-CLI na linha de comando usando apenas `wp`, torne o arquivo executável e mova-o para algum diretório presente em sua variável de ambiente PATH. Por exemplo:
+Digite `wp` para utilizar WP-CLI a partir da linha de comando, torne o arquivo executável e mova-o para algum diretório presente em sua variável de ambiente PATH. For example:
```bash
-chmod +x wp-cli.phar
-sudo mv wp-cli.phar /usr/local/bin/wp
+$ chmod +x wp-cli.phar
+$ sudo mv wp-cli.phar /usr/local/bin/wp
```
-Se a WP-CLI foi instalada corretamente, ao executar `wp --info` você deverá ver algo como:
+Se WP-CLI foi instalado com sucesso, ao executar `wp --info` você deverá ver algo como:
```bash
$ wp --info
-OS: Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64
-Shell: /usr/bin/zsh
-PHP binary: /usr/bin/php
-PHP version: 8.0.5
-php.ini used: /etc/php/8.0/cli/php.ini
-MySQL binary: /usr/bin/mysql
-MySQL version: mysql Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
-SQL modes:
-WP-CLI root dir: /home/wp-cli/
-WP-CLI vendor dir: /home/wp-cli/vendor
-WP_CLI phar path:
+PHP binary: /usr/bin/php5
+PHP version: 5.5.9-1ubuntu4.14
+php.ini used: /etc/php5/cli/php.ini
+WP-CLI root dir: /home/wp-cli/.wp-cli
WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/
-WP-CLI global config:
-WP-CLI project config: /home/wp-cli/wp-cli.yml
-WP-CLI version: 2.12.0
+WP-CLI global config: /home/wp-cli/.wp-cli/config.yml
+WP-CLI project config:
+WP-CLI version: 0.23.0
```
### Atualizando
-WP-CLI pode ser atualizada com `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/)) ou repetindo os passos da instalação.
-
-Se o proprietário do arquivo da WP-CLI for root ou outro usuário do sistema, será necessário executar `sudo wp cli update`.
+WP-CLI pode ser atualizado com `wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)), ou repetindo os passos da instalação.
-Quer viver no limite? Execute `wp cli update --nightly` para usar a última compilação de desenvolvimento da WP-CLI. Essa versão é estável o suficiente para ser usada em seu ambiente de desenvolvimento e sempre inclui as melhores e mais recentes funcionalidades da WP-CLI.
+_Quer viver a vida no limite?_ Execute `wp cli update --nightly` para usar a última compilação de desenvolvimento da WP-CLI. Essa versão é bastante estável para utilizar em seu ambiente de desenvolvimento, e sempre inclui as melhores e mais atuais funcionalidades da WP-CLI.
-### Autocompletar com tab
+### Auto-completar
-A WP-CLI também possui scripts de autocompletar para Bash ou ZSH. Baixe [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) e carregue-o através do `~/.bash_profile`:
+WP-CLI também acompanha scripts de auto-completar para Bash ou ZSH. Faça o download [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) e carregue o arquivo para `~/.bash_profile`:
```bash
source /FULL/PATH/TO/wp-completion.bash
@@ -116,42 +96,26 @@ source /FULL/PATH/TO/wp-completion.bash
Não se esqueça de executar `source ~/.bash_profile` em seguida.
-Se estiver usando zsh como shell, pode ser necessário carregar e iniciar `bashcompinit` antes de carregá-lo. Inclua o seguinte no seu `.zshrc`:
-
-```bash
-autoload bashcompinit
-bashcompinit
-source /FULL/PATH/TO/wp-completion.bash
-```
-
## Suporte
-Os responsáveis e os colaboradores da WP-CLI possuem disponibilidade limitada para atender a questões gerais de suporte. A [versão atual da WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) é a única com suporte oficial.
-
-Ao procurar por suporte, pesquise primeiro por sua dúvida nas fontes abaixo:
+Os colaboradores do projeto WP-CLI fazem seu melhor para rsponder a todos os problemas assim que possível. Para que possamos fazer melhor uso do tempo dos voluntários, verifique se já existe uma resposta para sua pergunta em umas das fontes abaixo:
-* [Questões comuns e suas respostas](https://make.wordpress.org/cli/handbook/common-issues/)
-* [Manual da WP-CLI](https://make.wordpress.org/cli/handbook/)
-* [Questões abertas ou fechadas no GitHub da WP-CLI](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue)
-* [Tópicos com a tag 'WP-CLI' no fórum de suporte do WordPress.org](https://wordpress.org/support/topic-tag/wp-cli/)
-* [Questões com a tag 'WP-CLI' no WordPress StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli)
+- [Questões comuns e suas respostas](https://wp-cli.org/docs/common-issues/)
+- [Melhores práticas para informar um problema](https://wp-cli.org/docs/bug-reports/)
+- [Portal de documentação](https://wp-cli.org/docs/)
+- [Questões abertas ou fechadas no Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue)
+- [Forum WordPress no StackExchange](http://wordpress.stackexchange.com/questions/tagged/wp-cli)
-Se você não encontrou uma resposta em nenhum dos endereços acima, você pode:
+Caso não encontre uma resposta na fontes existentes, fique a vontade para [abrir uma questão](https://github.com/wp-cli/wp-cli/issues/new) com sua dúvida.
-* Entrar para o canal `#cli` no [Slack Internacional do WordPress.org](https://make.wordpress.org/chat/) para conversar com quem estiver disponível no momento. Esta opção é a melhor para perguntas rápidas.
-* [Criar um novo tópico](https://wordpress.org/support/forum/wp-advanced/#new-post) no fórum internacional do WordPress.org e colocar a tag 'WP-CLI' para que ele seja encontrado pela comunidade.
+Se você possui uma conta WordPress.org, considere se inscrever no canal `#cli` no [Slack do WordPress.org](https://make.wordpress.org/chat/).
-Issues do GitHub são usadas para acompanhar melhorias e erros dos comandos existentes, não para suporte em geral. Antes de informar um erro, veja [nossas boas práticas](https://make.wordpress.org/cli/handbook/bug-reports/) para que o problema possa ser resolvido em tempo hábil.
+## Extendendo
-Não faça perguntas de suporte no Twitter. O Twitter não é um lugar aceitável para suporte porque: 1) é difícil conversar com apenas 280 caracteres e 2) o Twitter não é um lugar onde alguém com a mesma pergunta possa procurar por uma resposta de uma conversa anterior.
+Um **commando** é uma unidade singular de uma funcionalidade WP-CLI. `wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) é um comando. `wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) é outro.
-Lembre-se: libre != gratis; A licença do código aberto dá para você a liberdade de usar e modificar, mas não gera compromissos com o tempo dos outros. Seja respeitoso e regule suas expectativas.
+A WP-CLI suporta o registro de qualquer classe ou função como um comando, lendo os detalhes de uso através de _PHPdoc Callback_. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) é utilizado para registo de comandos internos e de terceiros.
-## Estendendo
-
-Um **comando** é a unidade atômica de funcionalidade da WP-CLI. `wp plugin install` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) é um comando. `wp plugin activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/activate/)) é outro.
-
-A WP-CLI suporta o registro de qualquer classe ou função como um comando. Ela lê os detalhes de uso através do callback do PHPdoc. `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) é usado para registo de comandos internos e de terceiros.
```php
/**
@@ -181,31 +145,36 @@ $delete_option_cmd = function( $args ) {
WP_CLI::add_command( 'option delete', $delete_option_cmd );
```
-A WP-CLI vem com vários comandos. Criar um comando personalizado para WP-CLI é mais fácil do que parece. Leia o [livro de receitas de comandos](https://make.wordpress.org/cli/handbook/commands-cookbook/) para saber mais. Navegue pela [documentação de API interna](https://make.wordpress.org/cli/handbook/internal-api/) para descobrir umaa variedade de funções úteis que você pode utilizar no seu comando personalizado para WP-CLI.
+WP-CLI vem com muitos comandos. Criar um comando personalizado para WP-CLi é mais fácil do que parece. Leia o [livro de receitas de comandos](https://wp-cli.org/docs/commands-cookbook/) para aprender mais. Procure a [documentação de API interna](https://wp-cli.org/docs/internal-api/) para descobrir a variedade de funcionalidades úteis que você pode utilizar no seu comando personalizado para WP-CLI.
## Contribuindo
-Nós agradecemos sua iniciativa em contribuir com a WP-CLI. É por sua causa, e pela comunidade à sua volta, que a WP-CLI é um projeto tão legal.
+Seja bem vindo e obrigado!
+
+Nós agradecemos sua iniciativa em contribuir com a WP-CLI. É por sua causa e a comunidade a sua volta, que a WP-CLI se tornou um grande projeto.
-**Contribuir não é limitado somente a código.** Nós encorajamos você a contribuir da maneira que melhor se encaixar em suas habilidades, escrevendo tutoriais, com demonstrações em meetups locais, ajudando outros usuários respondendo suas dúvidas no fórum ou revisando nossa documentação.
+**Contribuir não é limitado a somente código.** Te encorajamos a contribuir da maneira que melhor se encaixe em suas habilidades, escrevendo tutoriais, com demonstrações em palestras locais, ajudar outros usuários respondendo suas dúvidas no suporte, ou revisando nossa documentação.
-No manual, dê uma olhada nas nossas [diretrizes para contribuir](https://make.wordpress.org/cli/handbook/contributing/) para uma introdução completa sobre como participar. Seguir esses passos ajuda a passar a ideia de que você respeita o tempo dos outros colaboradores. Por sua vez, eles farão o melhor para retribuir esse respeito ao trabalhar com você, nos diferentes fusos horários, em todo o mundo.
+De uma olhada com atenção [nesse guia](https://wp-cli.org/docs/contributing/). Seguindo esses passos você estará respeitando o tempo dos outros colaboradoes. Por sua vez, eles farão o melhor para retribuir esse respeito no trabalho com você, nos diferentes fusos horários e em todo o mundo.
-## Liderança
+## Criadores e liderança
-A WP-CLI tem um responsável pelo projeto: [schlessera](https://github.com/schlessera).
+WP-CLI foi criado e mantido por:
-Quando necessário, [damos permissão de escrita para colaboradores](https://make.wordpress.org/cli/handbook/committers-credo/) que demonstraram sua capacidade durante algum tempo e que se esforçaram para levar o projeto adiante.
+* [Daniel Bachhuber](https://github.com/danielbachhuber/) - Líder atual
+* [Cristi Burcă](https://github.com/scribu) - Líder anterior
+* [Andreas Creten](https://github.com/andreascreten) - Criador
-Leia o [documento sobre governança no manual](https://make.wordpress.org/cli/handbook/governance/) para mais detalhes operacionais do projeto.
+Saiba mais sobre os projetos de [governança](https://wp-cli.org/docs/governance/) e veja a [lista completa dos colaboradores](https://github.com/wp-cli/wp-cli/contributors).
## Créditos
+
-Além das bibliotecas especificadas em [composer.json](/composer.json), usamos código ou ideias dos projetos abaixos:
+Além das bibliotecas especificadas em [composer.json](/composer.json), utilizamos o código ou idéias dos projetos abaixos:
-* [Drush](https://github.com/drush-ops/drush) para... muitas coisas
-* [wpshell](https://code.trac.wordpress.org/browser/wpshell) para `wp shell`
-* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) para `wp media regenerate`
+* [Drush](http://drush.ws/) para... muitas coisas
+* [wpshell](http://code.trac.wordpress.org/browser/wpshell) para `wp shell`
+* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) para `wp media regenerate`
* [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) para `wp search-replace`
* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) para `wp export`
* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) para `wp import`
diff --git a/command.php b/command.php
index a99bbe70..f689e63b 100644
--- a/command.php
+++ b/command.php
@@ -15,6 +15,11 @@
*/
function generate() {
generate_homepage();
+ generate_config();
+ generate_contributing();
+ generate_commands();
+ generate_docs();
+ generate_internal_api_docs();
}
WP_CLI::add_command( 'website generate', 'WP_CLI_Org\generate' );
@@ -55,6 +60,482 @@ function generate_homepage() {
}
WP_CLI::add_command( 'website generate-homepage', '\WP_CLI_Org\generate_homepage' );
+/**
+ * Generate the /config/ page.
+ *
+ * @when before_wp_load
+ */
+function generate_config() {
+ $config_spec = invoke_wp_cli( 'wp cli param-dump' );
+
+ $out = '';
+
+ $global_args = array();
+ foreach ( $config_spec as $key => $details ) {
+ if ( isset( $details['hidden'] ) || isset( $details['deprecated'] ) )
+ continue;
+
+ if ( false !== $details['file'] ) {
+ $config = "$key: " . $details['file'];
+ } else {
+ $config = '';
+ }
+
+ if ( false !== $details['runtime'] ) {
+ $flag = ( true === $details['runtime'] )
+ ? "--[no-]$key"
+ : "--$key" . $details['runtime'];
+ } else {
+ $flag = '';
+ }
+
+ $default = json_encode( $details['default'] );
+
+ $description = ( isset( $details['desc'] ) ) ? $details['desc'] : '';
+
+ $out .= render( 'config.mustache', compact( 'config', 'flag', 'default', 'description' ) );
+ if ( ! empty( $flag ) ) {
+ $global_args[] = array(
+ 'flag' => $flag,
+ 'description' => $description,
+ );
+ }
+ }
+
+ file_put_contents( '_includes/param-list.html', $out );
+ file_put_contents( '_includes/global-parameters.html', render( 'global-parameters.mustache', array( 'args' => $global_args ) ) );
+ WP_CLI::success( 'Generated /config/' );
+}
+WP_CLI::add_command( 'website generate-config', '\WP_CLI_Org\generate_config' );
+
+/**
+ * Generate the contributing page from WP-CLI's CONTRIBUTING.md
+ *
+ * @when before_wp_load
+ */
+function generate_contributing() {
+ $ret = trim( shell_exec( 'which wp' ) );
+ if ( empty( $ret ) ) {
+ WP_CLI::error( 'Could not find path to wp executable.' );
+ }
+ if ( 'link' === filetype( $ret ) ) {
+ $ret = readlink( $ret );
+ }
+
+ $contributing_path = dirname( dirname( $ret ) ) . '/CONTRIBUTING.md';
+ if ( ! is_file( $contributing_path ) ) {
+ WP_CLI::error( 'Could not find CONTRIBUTING.md in wp executable PATH. Please make sure wp executable points to git clone.' );
+ }
+
+ $contents = file_get_contents( $contributing_path );
+ $search = <<| Name | +Description | +
|---|---|
| add | +Add a value to the object cache. | +
| decr | +Decrement a value in the object cache. | +
| delete | +Remove a value from the object cache. | +
| flush | +Flush the object cache. | +
| get | +Get a value from the object cache. | +
| incr | +Increment a value in the object cache. | +
| replace | +Replace a value in the object cache, if the value already exists. | +
| set | +Set a value to the object cache, regardless of whether it already exists. | +
| type | +Attempts to determine which object cache is being used. | +
| Name | +Description | +
|---|---|
| add | +Add capabilities to a given role. | +
| list | +List capabilities for a given role. | +
| remove | +Remove capabilities from a given role. | +
| Name | +Description | +
|---|---|
| alias | +List available WP-CLI aliases. | +
| check-update | +Check to see if there is a newer version of WP-CLI available. | +
| cmd-dump | +Dump the list of installed commands, as JSON. | +
| completions | +Generate tab completion strings. | +
| info | +Print various details about the WP-CLI environment. | +
| param-dump | +Dump the list of global parameters, as JSON or in var_export format. | +
| update | +Update WP-CLI to the latest release. | +
| version | +Print WP-CLI version. | +
| Name | +Description | +
|---|---|
| approve | +Approve a comment. | +
| count | +Count comments, on whole blog or on a given post. | +
| create | +Create a new comment. | +
| delete | +Delete a comment. | +
| exists | +Verify whether a comment exists. | +
| generate | +Generate some number of new dummy comments. | +
| get | +Get data of a single comment. | +
| list | +Get a list of comments. | +
| meta | +Manage comment custom fields. | +
| recount | +Recalculate the comment_count value for one or more posts. | +
| spam | +Mark a comment as spam. | +
| status | +Get status of a comment. | +
| trash | +Trash a comment. | +
| unapprove | +Unapprove a comment. | +
| unspam | +Unmark a comment as spam. | +
| untrash | +Untrash a comment. | +
| update | +Update one or more comments. | +
| Name | +Description | +
|---|---|
| add | +Add a meta field. | +
| delete | +Delete a meta field. | +
| get | +Get meta field value. | +
| list | +List all metadata associated with an object. | +
| update | +Update a meta field. | +
| Name | +Description | +
|---|---|
| check-update | +Check for WordPress updates via Version Check API. | +
| config | +Generate a wp-config.php file. | +
| download | +Download core WordPress files. | +
| install | +Runs the standard WordPress installation process. | +
| is-installed | +Check if WordPress is installed. | +
| language | +Manage core language. | +
| multisite-convert | +Transform a single-site install into a WordPress multisite install. | +
| multisite-install | +Install WordPress multisite from scratch. | +
| update | +Update WordPress to a newer version. | +
| update-db | +Run the WordPress database update procedure. | +
| verify-checksums | +Verify WordPress files against WordPress.org's checksums. | +
| version | +Display the WordPress version. | +
| Name | +Description | +
|---|---|
| activate | +Activate a given language. | +
| install | +Install a given language. | +
| list | +List all available languages. | +
| uninstall | +Uninstall a given language. | +
| update | +Update installed languages. | +
| Name | +Description | +
|---|---|
| delete | +Delete the next scheduled cron event for the given hook. | +
| list | +List scheduled cron events. | +
| run | +Run the next scheduled cron event for the given hook. | +
| schedule | +Schedule a new cron event. | +
| Name | +Description | +
|---|---|
| event | +Manage WP-Cron events. | +
| schedule | +Manage WP-Cron schedules. | +
| test | +Test the WP Cron spawning system and report back its status. | +
| Name | +Description | +
|---|---|
| list | +List available cron schedules. | +
| Name | +Description | +
|---|---|
| check | +Check the current status of the database. | +
| cli | +Open a MySQL console using credentials from wp-config.php | +
| create | +Create a new database. | +
| drop | +Delete the existing database. | +
| export | +Exports the database to a file or to STDOUT. | +
| import | +Import a database from a file or from STDIN. | +
| optimize | +Optimize the database. | +
| query | +Execute a SQL query against the database. | +
| repair | +Repair the database. | +
| reset | +Remove all tables from the database. | +
| tables | +List the database tables. | +
| Command | +Description | +
|---|
Also see the list of community commands.
diff --git a/commands/media/import/index.md b/commands/media/import/index.md index 7791aae0..b430928e 100644 --- a/commands/media/import/index.md +++ b/commands/media/import/index.md @@ -1,4 +1,70 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/import/ ---- \ No newline at end of file +layout: default +title: 'wp media import' +display_global_parameters: true +--- + +[Commands](/commands/) » [media](/commands/media/) » import + +`wp media import` - Create attachments from local files or URLs. + +Quick links: Github issues + +| Name | +Description | +
|---|---|
| import | +Create attachments from local files or URLs. | +
| regenerate | +Regenerate thumbnails for one or more attachments. | +
| Name | +Description | +
|---|---|
| create | +Create a new menu. | +
| delete | +Delete one or more menus. | +
| item | +List, add, and delete items associated with a menu. | +
| list | +Get a list of menus. | +
| location | +Manage a menu's assignment to locations. | +
| Name | +Description | +
|---|---|
| add-custom | +Add a custom menu item. | +
| add-post | +Add a post as a menu item. | +
| add-term | +Add a taxonomy term as a menu item. | +
| delete | +Delete one or more items from a menu. | +
| list | +Get a list of items associated with a menu. | +
| update | +Update a menu item. | +
| Name | +Description | +
|---|---|
| assign | +Assign a location to a menu. | +
| list | +List locations for the current theme. | +
| remove | +Remove a location from a menu. | +
| Name | +Description | +
|---|---|
| meta | +Manage network custom fields. | +
| Name | +Description | +
|---|---|
| add | +Add a meta field. | +
| delete | +Delete a meta field. | +
| get | +Get meta field value. | +
| list | +List all metadata associated with an object. | +
| update | +Update a meta field. | +
| Name | +Description | +
|---|---|
| add | +Add a new option value. | +
| delete | +Delete an option. | +
| get | +Get the value for an option. | +
| list | +List options and their values. | +
| update | +Update an option value. | +
| Name | +Description | +
|---|---|
| browse | +Browse WP-CLI packages available for installation. | +
| install | +Install a WP-CLI package. | +
| list | +List installed WP-CLI packages. | +
| path | +Get the path to an installed WP-CLI package, or the package directory. | +
| uninstall | +Uninstall a WP-CLI package. | +
| update | +Update all installed WP-CLI packages to their latest version. | +
| Name | +Description | +
|---|---|
| activate | +Activate a plugin. | +
| deactivate | +Deactivate a plugin. | +
| delete | +Delete plugin files without deactivating or uninstalling. | +
| get | +Get details about an installed plugin. | +
| install | +Install a plugin. | +
| is-installed | +Check if the plugin is installed. | +
| list | +Get a list of plugins. | +
| path | +Get the path to a plugin or to the plugin directory. | +
| search | +Search the WordPress.org plugin directory. | +
| status | +See the status of one or all plugins. | +
| toggle | +Toggle a plugin's activation state. | +
| uninstall | +Uninstall a plugin. | +
| update | +Update one or more plugins. | +
| Name | +Description | +
|---|---|
| get | +Get details about a registered post type. | +
| list | +List registered post types. | +
| Name | +Description | +
|---|---|
| create | +Create a new post. | +
| delete | +Delete an existing post. | +
| edit | +Launch system editor to edit post content. | +
| generate | +Generate some posts. | +
| get | +Get details about a post. | +
| list | +Get a list of posts. | +
| meta | +Manage post custom fields. | +
| term | +Manage post terms. | +
| update | +Update one or more existing posts. | +
| Name | +Description | +
|---|---|
| add | +Add a meta field. | +
| delete | +Delete a meta field. | +
| get | +Get meta field value. | +
| list | +List all metadata associated with an object. | +
| update | +Update a meta field. | +
| Name | +Description | +
|---|---|
| add | +Add a term to an object. | +
| list | +List all terms associated with an object. | +
| remove | +Remove a term from an object. | +
| set | +Set object terms. | +
| Name | +Description | +
|---|---|
| flush | +Flush rewrite rules. | +
| list | +Get a list of the current rewrite rules. | +
| structure | +Update the permalink structure. | +
| Name | +Description | +
|---|---|
| create | +Create a new role. | +
| delete | +Delete an existing role. | +
| exists | +Check if a role exists. | +
| list | +List all roles. | +
| reset | +Reset any default role to default capabilities. | +
| Name | +Description | +
|---|---|
| _s | +Generate starter code for a theme based on _s. | +
| child-theme | +Generate child theme based on an existing theme. | +
| plugin | +Generate starter code for a plugin. | +
| plugin-tests | +Generate files needed for running PHPUnit tests in a plugin. | +
| post-type | +Generate PHP code for registering a custom post type. | +
| taxonomy | +Generate PHP code for registering a custom taxonomy. | +
| theme-tests | +Generate files needed for running PHPUnit tests in a theme. | +
| Name | +Description | +
|---|---|
| list | +List registered sidebars. | +
| Name | +Description | +
|---|---|
| activate | +Activate one or more sites. | +
| archive | +Archive one or more sites. | +
| create | +Create a site in a multisite install. | +
| deactivate | +Deactivate one or more sites. | +
| delete | +Delete a site in a multisite install. | +
| empty | +Empty a site of its content (posts, comments, terms, and meta). | +
| list | +List all sites in a multisite install. | +
| option | +Manage site options in a multisite install. | +
| spam | +Mark one or more sites as spam. | +
| unarchive | +Unarchive one or more sites. | +
| unspam | +Remove one or more sites from spam. | +
| Name | +Description | +
|---|---|
| add | +Add a site option. | +
| delete | +Delete a site option. | +
| get | +Get a site option. | +
| list | +List site options. | +
| update | +Update a site option. | +
| Name | +Description | +
|---|---|
| add | +Grant super admin privileges to one or more users. | +
| list | +List users with super admin capabilities. | +
| remove | +Remove super admin privileges from one or more users. | +
| Name | +Description | +
|---|---|
| get | +Get details about a registered taxonomy. | +
| list | +List registered taxonomies. | +
| Name | +Description | +
|---|---|
| create | +Create a new term. | +
| delete | +Delete an existing term. | +
| generate | +Generate some terms. | +
| get | +Get details about a term. | +
| list | +List terms in a taxonomy. | +
| meta | +Manage term custom fields. | +
| recount | +Recalculate number of posts assigned to each term. | +
| update | +Update an existing term. | +
| Name | +Description | +
|---|---|
| add | +Add a meta field. | +
| delete | +Delete a meta field. | +
| get | +Get meta field value. | +
| list | +List all metadata associated with an object. | +
| update | +Update a meta field. | +
| Name | +Description | +
|---|---|
| activate | +Activate a theme. | +
| delete | +Delete a theme. | +
| disable | +Disable a theme on a WordPress multisite install. | +
| enable | +Enable a theme on a WordPress multisite install. | +
| get | +Get details about a theme. | +
| install | +Install a theme. | +
| is-installed | +Check if the theme is installed. | +
| list | +Get a list of themes. | +
| mod | +Manage theme mods. | +
| path | +Get the path to a theme or to the theme directory. | +
| search | +Search the WordPress.org theme directory. | +
| status | +See the status of one or all themes. | +
| update | +Update one or more themes. | +
| Name | +Description | +
|---|---|
| get | +Get one or more theme mods. | +
| remove | +Remove one or more theme mods. | +
| set | +Set the value of a theme mod. | +
| Name | +Description | +
|---|---|
| delete | +Delete a transient value. | +
| get | +Get a transient value. | +
| set | +Set a transient value. | +
| type | +Determine type of transients implementation. | +
| Name | +Description | +
|---|---|
| add-cap | +Add a capability to a user. | +
| add-role | +Add a role for a user. | +
| create | +Create a new user. | +
| delete | +Delete one or more users from the current site. | +
| generate | +Generate some users. | +
| get | +Get details about a user. | +
| import-csv | +Import users from a CSV file. | +
| list | +List users. | +
| list-caps | +List all capabilities for a user. | +
| meta | +Manage user custom fields. | +
| remove-cap | +Remove a user's capability. | +
| remove-role | +Remove a user's role. | +
| session | +Manage a user's sessions. | +
| set-role | +Set the user role. | +
| term | +Manage user terms. | +
| update | +Update an existing user. | +
| Name | +Description | +
|---|---|
| add | +Add a meta field. | +
| delete | +Delete a meta field. | +
| get | +Get meta field value. | +
| list | +List all metadata associated with a user. | +
| update | +Update a meta field. | +
| Name | +Description | +
|---|---|
| destroy | +Destroy a session for the given user. | +
| list | +List sessions for the given user. | +
| Name | +Description | +
|---|---|
| add | +Add a term to an object. | +
| list | +List all terms associated with an object. | +
| remove | +Remove a term from an object. | +
| set | +Set object terms. | +
| Name | +Description | +
|---|---|
| add | +Add a widget to a sidebar. | +
| deactivate | +Deactivate one or more widgets from an active sidebar. | +
| delete | +Delete one or more widgets from a sidebar. | +
| list | +List widgets associated with a sidebar. | +
| move | +Move the position of a widget. | +
| reset | +Reset sidebar. | +
| update | +Update options for an existing widget. | +
-
-
-
-
-
-
-La versión estable actual es la [2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). Para estar al día, sigue [@wpcli en Twitter](https://twitter.com/wpcli) o [regístrate para recibir actualizaciones por correo electrónico](https://make.wordpress.org/cli/subscribe/). [Consulta la hoja de ruta](https://make.wordpress.org/cli/handbook/roadmap/) para una visión general de lo que está planeado para las próximas versiones.
-
-[](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open")
-
-Enlaces rápidos: [Uso](#uso) | [Instalación](#instalación) | [Soporte](#soporte) | [Extender](#extender) | [Contribuir](#contribuir) | [Créditos](#créditos)
-
-## Uso
-
-WP-CLI proporciona una interfaz de línea de comandos para muchas acciones que puedes realizar en el escritorio de WordPress. Por ejemplo, `wp plugin install --activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) te permite instalar y activar un plugin de WordPress:
-
-```bash
-$ wp plugin install user-switching --activate
-Installing User Switching (1.0.9)
-Downloading install package from https://downloads.wordpress.org/plugin/user-switching.1.0.9.zip...
-Unpacking the package...
-Installing the plugin...
-Plugin installed successfully.
-Activating 'user-switching'...
-Plugin 'user-switching' activated.
-Success: Installed 1 of 1 plugins.
-```
-
-WP-CLI también incluye comandos para muchas cosas que no puedes hacer en el escritorio de WordPress. Por ejemplo, `wp transient delete --all` ([doc](https://developer.wordpress.org/cli/commands/transient/delete/)) te permite eliminar uno o todos los datos transitorios:
-
-```bash
-$ wp transient delete --all
-Success: 34 transients deleted from the database.
-```
-
-Para una introducción más completa para usar WP-CLI, lee la [guía de inicio rápido](https://make.wordpress.org/cli/handbook/quick-start/). O bien, ponte al día con los [*shell friends*](https://make.wordpress.org/cli/handbook/shell-friends/) para aprender acerca de las utilidades de línea de comandos.
-
-¿Ya te sientes cómodo con lo básico? Ve a la [lista completa de comandos](https://developer.wordpress.org/cli/commands/) para obtener información detallada sobre la gestión de temas y plugins, importación y exportación de datos, realización de operaciones de búsqueda y reemplazo de bases de datos, y más.
-
-## Instalación
-
-La descarga del archivo Phar es nuestro método de instalación recomendado para la mayoría de usuarios. Si lo necesitas, consulta también nuestra documentación acerca de [métodos de instalación alternativos](https://wp-cli.org/docs/installing/) ([Composer](https://make.wordpress.org/cli/handbook/installing/#installing-via-composer), [Homebrew](https://make.wordpress.org/cli/handbook/installing/#installing-via-homebrew), [Docker](https://make.wordpress.org/cli/handbook/installing/#installing-via-docker)).
-
-Antes de instalar WP-CLI, asegúrate de que tu entorno cumple con los requisitos mínimos:
-
-- Entorno de tipo UNIX (OS X, Linux, FreeBSD, Cygwin); soporte limitado en el entorno de Windows
-- PHP 5.6 o posterior
-- WordPress 3.7 o posterior. Las versiones anteriores a la última versión de WordPress pueden tener funcionalidad degradada
-
-Una vez que hayas verificado los requisitos, descarga el archivo [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) usando `wget` o `curl` :
-
-```bash
-curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
-```
-
-A continuación, comprueba el archivo Phar para verificar que está funcionando:
-
-```bash
-php wp-cli.phar --info
-```
-
-Para usar WP-CLI desde la línea de comandos tecleando `wp`, haz que el archivo sea ejecutable y muévelo a algún lugar de tu `PATH`. Por ejemplo:
-
-```bash
-chmod +x wp-cli.phar
-sudo mv wp-cli.phar /usr/local/bin/wp
-```
-
-Si WP-CLI se instaló correctamente, deberías ver algo como esto cuando ejecutas `wp --info`:
-
-```bash
-$ wp --info
-OS: Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64
-Shell: /usr/bin/zsh
-PHP binary: /usr/bin/php
-PHP version: 8.0.5
-php.ini used: /etc/php/8.0/cli/php.ini
-MySQL binary: /usr/bin/mysql
-MySQL version: mysql Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
-SQL modes:
-WP-CLI root dir: /home/wp-cli/
-WP-CLI vendor dir: /home/wp-cli/vendor
-WP_CLI phar path:
-WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/
-WP-CLI global config:
-WP-CLI project config: /home/wp-cli/wp-cli.yml
-WP-CLI version: 2.12.0
-```
-
-### Actualización
-
-Puedes actualizar WP-CLI con `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/)), o repitiendo los pasos de instalación.
-
-Si WP-CLI es propiedad de root u otro usuario del sistema, necesitarás ejecutar `sudo wp cli update`.
-
-¿Quieres vivir la vida al límite? Ejecuta `wp cli update --nightly` para usar la última compilación nocturna (nightly build) de WP-CLI. Una compilación nocturna es más o menos lo suficientemente estable como para que puedas utilizarla en tu entorno de desarrollo, y siempre incluye las últimas y mejores características de WP-CLI.
-
-### Autocompletar con el tabulador
-
-WP-CLI también viene con un scripts para autocompletar con el tabulador para Bash y ZSH. Tan sólo descarga [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) y usa el comando `source` desde `~/.bash_profile`:
-
-```bash
-source /FULL/PATH/TO/wp-completion.bash
-```
-
-No te olvides de ejecutar `source ~/.bash_profile` después.
-
-Si usa la shell zsh, es posible que debas cargar e iniciar `bashcompinit` antes de usar el comando `source`. Pon lo siguiente en tu `.zshrc`:
-
-```bash
-autoload bashcompinit
-bashcompinit
-source /RUTA/COMPLETA/HASTA/wp-completion.bash
-```
-
-## Soporte
-
-Tanto los que mantienen WP-CLI como sus colaboradores tienen disponibilidad limitada para responder preguntas generales de soporte. La [versión actual de WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) es la única versión oficialmente soportada.
-
-Cuando busques ayuda, primero busca tu pregunta en estos lugares:
-
-* [Problemas comunes y sus soluciones](https://make.wordpress.org/cli/handbook/common-issues/)
-* [Manual de WP-CLI (Handbook)](https://make.wordpress.org/cli/handbook/)
-* [*Issues* abiertos o cerrados en la organización de WP-CLI en GitHub](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue)
-* [Hilos etiquetados con «WP-CLI» en el foro de soporte de WordPress.org](https://wordpress.org/support/topic-tag/wp-cli/)
-* [Preguntas etiquetadas con «WP-CLI» en WordPress Development Stack Exchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli)
-
-Si no encontraste una respuesta en uno de los lugares anteriores, puedes:
-
-* Únirte al canal `#cli` en el [Slack de WordPress.org](https://make.wordpress.org/chat/) para chatear con quien esté disponible en ese momento. Esta opción es la mejor para preguntas rápidas.
-* [Publicar un nuevo hilo](https://wordpress.org/support/forum/wp-advanced/#new-post) en el foro de soporte de WordPress.org y etiquetarlo como «WP-CLI» para que lo vea la comunidad.
-
-Los *issues* de GitHub están destinados al seguimiento de mejoras y errores de los comandos existentes, no para soporte general. Antes de enviar un informe de errores, por favor, [revisa nuestras mejores prácticas](https://make.wordpress.org/cli/handbook/bug-reports/) para ayudar a garantizar que tu *issue* se resuelva de manera oportuna.
-
-Por favor, no hagas preguntas de soporte en Twitter. Twitter no es un lugar aceptable para el soporte porque: 1) es difícil mantener conversaciones con menos de 280 caracteres, y 2) Twitter no es un lugar donde alguien con tu misma pregunta pueda buscar una respuesta en una conversación previa.
-
-Recuerda, libre != gratis; la licencia open source te da la libertad de usar y modificar, pero no a expensas del tiempo de otras personas. Por favor, se respetuoso y establece tus expectativas en consecuencia.
-
-## Extender
-
-Un **comando** es la unidad atómica de la funcionalidad de WP-CLI. `wp plugin install` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) es un comando. `wp plugin activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/activate/)) es otro.
-
-WP-CLI permite registrar cualquier clase, función o *closure* invocable como un comando. Este lee los detalles de uso del PHPdoc de la devolución de llamada. `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) se utiliza tanto para el registro de comandos internos como de terceros.
-
-```php
-/**
- * Delete an option from the database.
- *
- * Returns an error if the option didn't exist.
- *
- * ## OPTIONS
- *
- *









