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 @@ + + cache + Manage the object cache. + + + cap + Manage user capabilities. + + + cli + Manage WP-CLI itself. + + + comment + Manage comments. + + + core + Download, install, update and manage a WordPress install. + + + cron + Manage WP-Cron events and schedules. + + + db + Perform basic database operations using credentials stored in wp-config.php + + + eval + Execute arbitrary PHP code. + + + eval-file + Load and execute a PHP file. + + + export + Export WordPress content to a WXR file. + + + help + Get help on WP-CLI, or on a specific command. + + + import + Import content from a WXR file. + + + media + Manage attachments. + + + menu + List, create, assign, and delete menus. + + + network + + + + option + Manage options. + + + package + Manage WP-CLI packages. + + + plugin + Manage plugins. + + + post + Manage posts. + + + post-type + Manage post types. + + + rewrite + Manage rewrite rules. + + + role + Manage user roles. + + + scaffold + Generate code for post types, taxonomies, plugins, child themes. etc. + + + search-replace + Search/replace strings in the database. + + + server + Launch PHP's built-in web server for this specific WordPress installation. + + + shell + Interactive PHP console. + + + sidebar + Manage sidebars. + + + site + Perform site-wide operations. + + + super-admin + Manage super admins on WordPress multisite. + + + taxonomy + Manage taxonomies. + + + term + Manage terms. + + + theme + Manage themes. + + + transient + Manage transients. + + + user + Manage users. + + + widget + Manage sidebar widgets. + diff --git a/_includes/doc-list.html b/_includes/doc-list.html new file mode 100644 index 00000000..dd513548 --- /dev/null +++ b/_includes/doc-list.html @@ -0,0 +1,43 @@ +

Guides

+ + + +

References

+ + + +

Contributing

+ + + +

Misc

+ + + diff --git a/_includes/footer.html b/_includes/footer.html index b5e45176..e88827a9 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -5,7 +5,7 @@ {% include global-parameters.html %} {% endif %} - + {% include analytics.html %} diff --git a/_includes/header.html b/_includes/header.html index f9985180..58e77c91 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,47 +1,38 @@ {% assign hreflang = 'en' %}{% for lang in site.languages %}{% if lang.path == page.url %}{% assign hreflang = lang.iso-alpha2 %}{% endif %}{% endfor %} - + - + - - + + - {% if page.title == "WP-CLI" or page.title == nil %}WP-CLI - The command line interface for WordPress{% else %}{{ page.title }} | WP-CLI{% endif %} - - - - - - - - - - - - - - - + {{ page.title }} | WP-CLI + {% for lang in site.languages %} {% endfor %} - + + {% if page.display_global_parameters %} - {% elsif page.direction == 'rtl' %} - {% else %} {% endif %}
-

WP-CLI The command line interface for WordPress

+

WP-CLI

+ {% capture page_url %}{{ page.url | remove:'index.html' }}{% endcapture %} + {% if page_url == '/restful/' %} +

A RESTful command line interface for WordPress

+ {% else %} +

A command line interface for WordPress

+ {% endif %} {% include navigation.html %} {% include languages.html %} diff --git a/_includes/internal-api-list.html b/_includes/internal-api-list.html new file mode 100644 index 00000000..e103c44e --- /dev/null +++ b/_includes/internal-api-list.html @@ -0,0 +1,146 @@ +*** + +## Registration + + + + +## Output + + + + +## Input + + + + +## Execution + + + + +## System + + + + +## Misc + + + + diff --git a/_includes/languages.html b/_includes/languages.html index 487fc9df..2c44f118 100644 --- a/_includes/languages.html +++ b/_includes/languages.html @@ -10,7 +10,7 @@ 'use strict'; var langs = document.getElementById( 'languages' ); - // Only apply this after we set the Selected option. + // Only apply this after we set the Selected option langs.onchange = function( ev ) { if ( ev.currentTarget && ev.currentTarget.value ) { location.href = ev.currentTarget.value; @@ -25,7 +25,7 @@ count = opts.length; for ( var i = 0; i < count; i++ ){ - // Only happens if you have language path on the start of the location.pathname. + // Only happens if you have language path on the start of the location.pathname if ( 0 === window.location.pathname.indexOf( opts[ i ].value ) ) { opts[ i ].setAttribute( 'selected', 'selected' ); } diff --git a/_includes/navigation.html b/_includes/navigation.html index cacac288..c5c36c73 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -21,7 +21,7 @@
  • - +
  • diff --git a/_layouts/doc.html b/_layouts/doc.html new file mode 100644 index 00000000..cf381e81 --- /dev/null +++ b/_layouts/doc.html @@ -0,0 +1,24 @@ +{% include header.html %} + +{% capture page_url %}{{ page.url | remove:'index.html' }}{% endcapture %} + +Edit + +{% if page_url != '/docs/' %} +Docs » {{ page.category }} +{% endif %} + +

    {{ page.title }}

    + +{% if page.quick_links %} +

    Quick 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.
    diff --git a/_posts/2014-04-15-version-0.15.md b/_posts/2014-04-15-version-0.15.md index 220146a3..4fa24565 100644 --- a/_posts/2014-04-15-version-0.15.md +++ b/_posts/2014-04-15-version-0.15.md @@ -50,7 +50,7 @@ Note that after updating `wp-cli.phar`, you will also have to update the [wp-com * `wp post create`: fixed handling of `--post_category=` parameter * `wp eval-file`: allow passing arbitrary arguments to the file -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=21&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=21&page=1&state=closed) on Github. Contributors to this release: [clemens-tolboom](https://github.com/clemens-tolboom), [danielbachhuber](https://github.com/danielbachhuber), [francescolaffi](https://github.com/francescolaffi), [itsananderson](https://github.com/itsananderson), [johnpbloch](https://github.com/johnpbloch), [mattheu](https://github.com/mattheu), [nyordanov](https://github.com/nyordanov), [Rarst](https://github.com/Rarst), [robertboloc](https://github.com/robertboloc), [rodrigoprimo](https://github.com/rodrigoprimo), [sboisvert](https://github.com/sboisvert), [scribu](https://github.com/scribu), [szepeviktor](https://github.com/szepeviktor), [trepmal](https://github.com/trepmal). diff --git a/_posts/2014-04-29-survey-results.md b/_posts/2014-04-29-survey-results.md index 9bb793c8..6a897566 100644 --- a/_posts/2014-04-29-survey-results.md +++ b/_posts/2014-04-29-survey-results.md @@ -16,20 +16,20 @@ Many thanks to the 56 people who took our first user survey. We appreciate your Even with its variety of commands, WP-CLI is largely used to install and update. 37.5% of respondents reported using WP-CLI to install WordPress (with 30.36% using it to update WordPress), and 32.14% reported using it to update plugins and themes. -After code management, WP-CLI is popularly used (23.21%) to perform migrations. Respondents reported using [`wp db export`](https://wp-cli.org/commands/db/export/) and [`wp db import`](https://wp-cli.org/commands/db/import/) in conjunction with [`wp search-replace`](https://wp-cli.org/commands/search-replace/), or [`wp export`](https://wp-cli.org/commands/export/) and [`wp import`](https://wp-cli.org/commands/import/). +After code management, WP-CLI is popularly used (23.21%) to perform migrations. Respondents reported using [`wp db export`](http://wp-cli.org/commands/db/export/) and [`wp db import`](http://wp-cli.org/commands/db/import/) in conjunction with [`wp search-replace`](http://wp-cli.org/commands/search-replace/), or [`wp export`](http://wp-cli.org/commands/export/) and [`wp import`](http://wp-cli.org/commands/import/). A subset of respondents reported using WP-CLI to perform specialized tasks, including: -* Creating users with [`wp user create`](https://wp-cli.org/commands/user/create/) and [`wp user import-csv`](https://wp-cli.org/commands/user/import-csv/). -* [Deleting options](https://wp-cli.org/commands/option/delete/). -* [Resizing images](https://wp-cli.org/commands/media/regenerate/). -* [Creating posts / pages](https://wp-cli.org/commands/post/create/). -* Quick code execution via [`wp eval`](https://wp-cli.org/commands/eval/), [`wp eval-file`](https://wp-cli.org/commands/eval-file/), and [`wp shell`](https://wp-cli.org/commands/shell/). +* Creating users with [`wp user create`](http://wp-cli.org/commands/user/create/) and [`wp user import-csv`](http://wp-cli.org/commands/user/import-csv/). +* [Deleting options](http://wp-cli.org/commands/option/delete/). +* [Resizing images](http://wp-cli.org/commands/media/regenerate/). +* [Creating posts / pages](http://wp-cli.org/commands/post/create/). +* Quick code execution via [`wp eval`](http://wp-cli.org/commands/eval/), [`wp eval-file`](http://wp-cli.org/commands/eval-file/), and [`wp shell`](http://wp-cli.org/commands/shell/). * [Writing custom commands](https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook). **Only 38% have used community packages** -WP-CLI now has 24 community packages listed in its [Package Index](https://wp-cli.org/package-index/). A good 62% percent of respondents will have the good fortune in the future to discover a helpful community package. +WP-CLI now has 24 community packages listed in its [Package Index](http://wp-cli.org/package-index/). A good 62% percent of respondents will have the good fortune in the future to discover a helpful community package. ### Feature requests diff --git a/_posts/2014-05-14-version-0.15.1.md b/_posts/2014-05-14-version-0.15.1.md index d31cdd2f..f1347a49 100644 --- a/_posts/2014-05-14-version-0.15.1.md +++ b/_posts/2014-05-14-version-0.15.1.md @@ -15,6 +15,6 @@ The longer 0.15 soaked, the more bug fixes it saw. It's finally time to get them * use WordPress' `_n()` instead of `ngettext()` * fix segmentation fault in PHP 5.5.11/12 (and probably other 5.5.x versions) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=24&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=24&page=1&state=closed) on Github. Contributors to this release: [boonebgorges](https://github.com/boonebgorges), [danielbachhuber](https://github.com/danielbachhuber), [jmslbam](https://github.com/jmslbam), [mboynes](https://github.com/mboynes), [szepeviktor](https://github.com/szepeviktor), [westonruter](https://github.com/westonruter) diff --git a/_posts/2014-06-30-version-0.16.md b/_posts/2014-06-30-version-0.16.md index 7f714ce7..fdc0598b 100644 --- a/_posts/2014-06-30-version-0.16.md +++ b/_posts/2014-06-30-version-0.16.md @@ -61,7 +61,7 @@ If any core files have been modified, you'll see something like this: ### A new look -[WP-CLI.org](https://wp-cli.org) received a much-appreciated fresh coat of paint. [Share the love on Twitter](https://twitter.com/intent/tweet?text=Love%20the%20fresh%20coat%20of%20paint%2C%20%40wpcli%21%20Check%20it%20out%3A%20http%3A%2F%2Fwp-cli.org) (or report any bugs in the [issue tracker](https://github.com/wp-cli/wp-cli/issues/new)). +[WP-CLI.org](http://wp-cli.org) received a much-appreciated fresh coat of paint. [Share the love on Twitter](https://twitter.com/intent/tweet?text=Love%20the%20fresh%20coat%20of%20paint%2C%20%40wpcli%21%20Check%20it%20out%3A%20http%3A%2F%2Fwp-cli.org) (or report any bugs in the [issue tracker](https://github.com/wp-cli/wp-cli/issues/new)). ### Other changes @@ -83,6 +83,6 @@ Fixes: * Autocompletion file works properly for both bash and ZSH * `wp core update`: can update directly from a ZIP file -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=23&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=23&page=1&state=closed) on Github. Contributors to this release: [boonebgorges](https://github.com/boonebgorges), [danielbachhuber](https://github.com/danielbachhuber), [jmslbam](https://github.com/jmslbam), [johnbillion](https://github.com/johnbillion), [joshlevinson](https://github.com/joshlevinson), [mboynes](https://github.com/mboynes), [rodrigoprimo](https://github.com/rodrigoprimo), [ryanduff](https://github.com/ryanduff), [scribu](https://github.com/scribu), [szepeviktor](https://github.com/szepeviktor), [westonruter](https://github.com/westonruter) diff --git a/_posts/2014-09-11-version-0.17.md b/_posts/2014-09-11-version-0.17.md index 9a515d8e..c94e3214 100644 --- a/_posts/2014-09-11-version-0.17.md +++ b/_posts/2014-09-11-version-0.17.md @@ -105,6 +105,6 @@ Fixes: * GUIDs are escaped as URLs for `wp export`. * Thanks to improvements in php-cli-tools, long strings in tables will be wrapped, instead of breaking output. See in action with `wp theme get twentyfourteen`. -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.17.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.17.0+is%3Aclosed) on Github. Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber), [dlh01](https://github.com/dlh01), [jeichorn](https://github.com/jeichorn), [johnbillion](https://github.com/johnbillion), [lkwdwrd](https://github.com/lkwdwrd), [mattheu](https://github.com/mattheu), [nschoenholtz](https://github.com/nschoenholtz), [phh](https://github.com/phh), [rodrigoprimo](https://github.com/rodrigoprimo), [santagada](https://github.com/santagada), [scribu](https://github.com/scribu), [szepeviktor](https://github.com/szepeviktor), [tddewey](https://github.com/tddewey), [tollmanz](https://github.com/tollmanz), [trepmal](https://github.com/trepmal), [willmot](https://github.com/willmot). diff --git a/_posts/2014-11-18-version-0.17.1.md b/_posts/2014-11-18-version-0.17.1.md index 9da1aa59..a4d0da4a 100644 --- a/_posts/2014-11-18-version-0.17.1.md +++ b/_posts/2014-11-18-version-0.17.1.md @@ -17,6 +17,6 @@ Consider yourself lucky there were less bugs in 0.17 than sugar ants in our kitc * Adds error handling to `Core_Command::_read()`, for when WordPress.org returns bad responses. * php-cli-tools v0.10.2: Fixes supplying empty array to `cli\Table`, and incorrect lengths for colorized strings in `cli\Table` -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=27&page=1&state=closed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=27&page=1&state=closed) on Github. Contributors to this release: [borekb](https://github.com/borekb), [danielbachhuber](https://github.com/danielbachhuber), [szepeviktor](https://github.com/szepeviktor), [wturrell](https://github.com/wturrell) diff --git a/_posts/2015-06-20-version-0.19.2.md b/_posts/2015-06-20-version-0.19.2.md index 62ee0222..d9b3134b 100644 --- a/_posts/2015-06-20-version-0.19.2.md +++ b/_posts/2015-06-20-version-0.19.2.md @@ -4,7 +4,7 @@ author: danielbachhuber title: Version 0.19.2 released --- -Embarrassingly, [WP-CLI v0.19.1](https://wp-cli.org/blog/version-0.19.1.html) introduced another bug related to scaffolding plugin tests. More embarrassingly, it took me a full month to get around to fixing it. My apologies if you were bit by it. +Embarrassingly, [WP-CLI v0.19.1](http://wp-cli.org/blog/version-0.19.1.html) introduced another bug related to scaffolding plugin tests. More embarrassingly, it took me a full month to get around to fixing it. My apologies if you were bit by it. You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=31&page=1&state=closed) on Github. diff --git a/_posts/2015-08-26-version-0.20.0.md b/_posts/2015-08-26-version-0.20.0.md index ca759760..3e6285b4 100644 --- a/_posts/2015-08-26-version-0.20.0.md +++ b/_posts/2015-08-26-version-0.20.0.md @@ -36,7 +36,7 @@ Use `wp core verify-checksums` to make sure a given WordPress install has the co ### WP-API CLI -We [released v0.19.0](https://wp-cli.org/blog/version-0.19.0.html) with this statement: +We [released v0.19.0](http://wp-cli.org/blog/version-0.19.0.html) with this statement: > WP-API is days away from 2.0-beta1, and brings with it a powerful new interface to WordPress. In the near future, we’ll start exploring how WP-CLI can use WP-API internally. If all goes well, WP-CLI could see just one more 0.x.0 release before the big 1.0.0. @@ -48,7 +48,7 @@ There were a couple issues opened for "how do I do X?", which you might find hel # List plugins on each site in a network wp site list --field=url | xargs -n 1 -I % wp plugin list --url=% - + # Delete inactive plugins wp plugin delete $(wp plugin list --status=inactive --field=name) diff --git a/_posts/2015-10-14-version-0.20.2.md b/_posts/2015-10-14-version-0.20.2.md index 0ea6b0be..ead5ff9a 100644 --- a/_posts/2015-10-14-version-0.20.2.md +++ b/_posts/2015-10-14-version-0.20.2.md @@ -8,6 +8,6 @@ Since the beginning, `install-wp-tests.sh` (the setup script for plugin unit tes We've updated `install-wp-tests.sh` provided by WP-CLI to use an appropriately-tagged version of the WordPress testing framework. However, because `install-wp-tests.sh` is added to a plugin during the scaffolding process, plugin authors will need to update the plugin copy of the script to fix failing tests. We weren't able to get to the entire internet, but here are some plugins that have already been updated: [pantheon-systems/wp-native-php-sessions](https://github.com/pantheon-systems/wp-native-php-sessions/pull/20), [washingtonstateuniversity/WSUWP-Plugin-Color-Palette](https://github.com/washingtonstateuniversity/WSUWP-Plugin-Color-Palette/pull/5), [ethymos/delibera](https://github.com/ethymos/delibera/pull/45) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.20.2) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.20.2) on Github. Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber), [torounit](https://github.com/torounit) diff --git a/_posts/2015-10-30-version-0.20.3.md b/_posts/2015-10-30-version-0.20.3.md index c568503c..e7d3c987 100644 --- a/_posts/2015-10-30-version-0.20.3.md +++ b/_posts/2015-10-30-version-0.20.3.md @@ -4,12 +4,12 @@ author: danielbachhuber title: Version 0.20.3 released --- -WordPress 4.4 loads a few new files in `wp-settings.php` relating to oEmbed and the REST API. Because WP-CLI has a custom `wp-settings-cli.php` ([background](https://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.20.3 is a compatibility release to load these new files. +WordPress 4.4 loads a few new files in `wp-settings.php` relating to oEmbed and the REST API. Because WP-CLI has a custom `wp-settings-cli.php` ([background](http://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.20.3 is a compatibility release to load these new files. **Importantly, due to the nature of these changes, WP-CLI versions prior to 0.20.3 will be incompatible with WordPress 4.4.** -Stay tuned next week for WP-CLI v0.21.0 (which is also compatible with WordPress 4.4), the results of the [user survey](https://wp-cli.org/blog/user-survey-2015.html), and a special announcement. +Stay tuned next week for WP-CLI v0.21.0 (which is also compatible with WordPress 4.4), the results of the [user survey](http://wp-cli.org/blog/user-survey-2015.html), and a special announcement. -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.20.2) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.20.2) on Github. Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber), [kraftbj](https://github.com/kraftbj), [rmccue](https://github.com/rmccue) diff --git a/_posts/2015-11-04-version-0.21.0.md b/_posts/2015-11-04-version-0.21.0.md index 342b1195..f8e2e3ab 100644 --- a/_posts/2015-11-04-version-0.21.0.md +++ b/_posts/2015-11-04-version-0.21.0.md @@ -11,7 +11,7 @@ As many of you are aware of, I launched a Kickstarter campaign Monday night: [A But, I have an even more **important note** about supported WordPress versions: * WP-CLI v0.22.0 (the next release) will bump the minimum supported WordPress version from 3.5 to 3.7 ([background](https://github.com/wp-cli/wp-cli/issues/2134)). -* WP-CLI versions prior to 0.20.3 will be incompatible with WordPress 4.4 ([background](https://wp-cli.org/blog/version-0.20.3.html)). +* WP-CLI versions prior to 0.20.3 will be incompatible with WordPress 4.4 ([background](http://wp-cli.org/blog/version-0.20.3.html)). This important note may apply to you in some way -- please take action accordingly. @@ -24,7 +24,7 @@ For a while now, you've been able to run a WP-CLI command before WordPress loads See how `wp eval` makes use of `WP_CLI::get_runner()->load_wordpress()`: class Eval_Command extends WP_CLI_Command { - + /** * Execute arbitrary PHP code. * @@ -84,7 +84,7 @@ Make your own commands more helpful by including `WP_CLI::debug( $debug_message Enhancements: * Use `wp core update-db --network` to upgrade databases across an entire network; also improves verbosity for this command by providing the `from` and `to` database versions. -* Adds a `wp comment recount` command for recalculating a post's comment count. +* Adds a `wp comment recount` command for recalcuating a post's comment count. * Includes `wp taxonomy list`, `wp taxonomy get`, `wp post-type list` and `wp post-type get` for getting details about registered taxonomies and post types. * Use `--defer-term-counting` with `wp post update` or `wp post delete` to recalculate term count at the end of the operation for increased performance. * Returns a more useful error message when running `wp scaffold plugin-tests` with an invalid plugin slug. diff --git a/_posts/2015-11-23-versions-0.21.1-and-0.20.4.md b/_posts/2015-11-23-versions-0.21.1-and-0.20.4.md index 0be51db5..d4f3a492 100644 --- a/_posts/2015-11-23-versions-0.21.1-and-0.20.4.md +++ b/_posts/2015-11-23-versions-0.21.1-and-0.20.4.md @@ -4,7 +4,7 @@ author: danielbachhuber title: Versions 0.21.1 and 0.20.4 released --- -WordPress 4.4 loads a few new files even more files in `wp-settings.php`. Because WP-CLI has a custom `wp-settings-cli.php` ([background](https://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.21.1 and v0.20.4 are compatibility releases to load these new files. +WordPress 4.4 loads a few new files even more files in `wp-settings.php`. Because WP-CLI has a custom `wp-settings-cli.php` ([background](http://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.21.1 and v0.20.4 are compatibility releases to load these new files. **Importantly, due to the nature of these changes, WP-CLI versions prior to 0.20.4 will be incompatible with WordPress 4.4.** diff --git a/_posts/2015-12-01-survey-results-2015.md b/_posts/2015-12-01-survey-results-2015.md index 4d8b639f..78400f1c 100644 --- a/_posts/2015-12-01-survey-results-2015.md +++ b/_posts/2015-12-01-survey-results-2015.md @@ -4,9 +4,9 @@ author: danielbachhuber title: What the survey said, 2015 edition --- -Many thanks to the 206 (!!!) people who took our [second user survey](https://wp-cli.org/blog/user-survey-2015.html). We appreciate your time in helping us to understand how WP-CLI is being adopted by the community. +Many thanks to the 206 (!!!) people who took our [second user survey](http://wp-cli.org/blog/user-survey-2015.html). We appreciate your time in helping us to understand how WP-CLI is being adopted by the community. -Curious as to how the numbers have changed? Take a look at the [summary of the first user survey](https://wp-cli.org/blog/survey-results.html) from April 2014. +Curious as to how the numbers have changed? Take a look at the [summary of the first user survey](http://wp-cli.org/blog/survey-results.html) from April 2014. ### By the numbers @@ -65,6 +65,6 @@ Feel like contributing to WP-CLI over the holidays? Here's a grab bag of enhance * Add option to exclude specific tables in `wp search-replace`. * Provide a way to log in with a one-time link. -If you can't find an [existing GitHub issue](https://github.com/wp-cli/wp-cli/issues), please create one and we can begin discussing implementation. +If you can't find an [existing Github issue](https://github.com/wp-cli/wp-cli/issues), please create one and we can begin discussing implementation. Thanks again to everyone who took the time to complete our user survey! May WP-CLI continue to be a shining light for your WordPress development needs. diff --git a/_posts/2016-01-07-version-0.22.0.md b/_posts/2016-01-07-version-0.22.0.md index 1f913b24..f707d89e 100644 --- a/_posts/2016-01-07-version-0.22.0.md +++ b/_posts/2016-01-07-version-0.22.0.md @@ -100,4 +100,4 @@ Bug fixes across the board: Contributors to this release: [2ndkauboy](https://github.com/2ndkauboy), [coreyworrell](https://github.com/coreyworrell), [danielbachhuber](https://github.com/danielbachhuber), [davidleach](https://github.com/davidleach), [duncanjbrown](https://github.com/duncanjbrown), [ernilambar](https://github.com/ernilambar), [fjarrett](https://github.com/fjarrett), [gilbitron](https://github.com/gilbitron), [greg-1-anderson](https://github.com/greg-1-anderson), [iandunn](https://github.com/iandunn), [jjeaton](https://github.com/jjeaton), [modelm](https://github.com/modelm), [rodrigoprimo](https://github.com/rodrigoprimo), [ryanshoover](https://github.com/ryanshoover), [stevector](https://github.com/stevector), [szepeviktor](https://github.com/szepeviktor), [tristanpenman](https://github.com/tristanpenman), [x1024](https://github.com/x1024) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.22.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.22.0+is%3Aclosed) on Github. diff --git a/_posts/2016-02-04-restful-wp-cli-update-2.md b/_posts/2016-02-04-restful-wp-cli-update-2.md index 0c331103..f052b813 100644 --- a/_posts/2016-02-04-restful-wp-cli-update-2.md +++ b/_posts/2016-02-04-restful-wp-cli-update-2.md @@ -55,7 +55,7 @@ Wait, `wp package install`. What in the? That's right, WP-CLI now has package management. Using `wp cli update --nightly`, you now can: -* `wp package browse` to browse [packages available for installation](https://wp-cli.org/package-index/). +* `wp package browse` to browse [packages available for installation](http://wp-cli.org/package-index/). * `wp package install` to install a given package. * `wp package list` to list packages installed locally. * `wp package uninstall` to uninstall a given package. @@ -124,7 +124,7 @@ I'd much prefer: wp @wpapi tag create -In the example preceding, `@wpapi` is an alias for both the target and authentication. +In the example preceeding, `@wpapi` is an alias for both the target and authentication. In this hypothetical universe, aliases would also be injected into the WP-CLI runtime: @@ -145,4 +145,4 @@ In this hypothetical universe, aliases would also be injected into the WP-CLI ru There's a bit of thinking to do, and code to write, to get from here to there, though. -Feeling inspired? I want to hear from you! Particularly if you've written custom endpoints I can test against. Please [open a GitHub issue](https://github.com/danielbachhuber/wp-rest-cli/issues) with questions, feedback, and violent dissent, or [email me directly](mailto:daniel@handbuilt.co). +Feeling inspired? I want to hear from you! Particularly if you've written custom endpoints I can test against. Please [open a Github issue](https://github.com/danielbachhuber/wp-rest-cli/issues) with questions, feedback, and violent dissent, or [email me directly](mailto:daniel@handbuilt.co). diff --git a/_posts/2016-03-22-version-0.23.0.md b/_posts/2016-03-22-version-0.23.0.md index 7bcf7522..3519507e 100644 --- a/_posts/2016-03-22-version-0.23.0.md +++ b/_posts/2016-03-22-version-0.23.0.md @@ -9,11 +9,11 @@ It's hard to believe the last WP-CLI release was only two months ago because thi If you don't make it all of the way through, here's what you absolutely need to know about WP-CLI v0.23.0: * This release includes WordPress 4.5 compatibility. Older WP-CLI versions are incompatible with WordPress 4.5. If you're planning to use WordPress 4.5 in the future, you'll need to upgrade before you do. -* You can now browse [available packages](https://wp-cli.org/package-index/) with `wp package browse`, and install them with `wp package install`. Try `wp package install runcommand/db-ack`. -* There are many new tools for registering commands. Ain't no more need to extend `WP_CLI_Command`. See the [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) to learn more. -* All of the wiki pages moved to a [documentation portal on the website](https://wp-cli.org/docs/), including new pages documenting [internal APIs](https://wp-cli.org/docs/internal-api/) you can use in your own commands. Pull requests encouraged. +* You can now browse [available packages](http://wp-cli.org/package-index/) with `wp package browse`, and install them with `wp package install`. Try `wp package install runcommand/db-ack`. +* There are many new tools for registering commands. Ain't no more need to extend `WP_CLI_Command`. See the [commands cookbook](http://wp-cli.org/docs/commands-cookbook/) to learn more. +* All of the wiki pages moved to a [documentation portal on the website](http://wp-cli.org/docs/), including new pages documenting [internal APIs](http://wp-cli.org/docs/internal-api/) you can use in your own commands. Pull requests encouraged. -Now that I've given away all of the surprises, let's get on with the release post. +Now that I've given away all of the surpises, let's get on with the release post. Oh darn, I forgot two more things: @@ -24,7 +24,7 @@ And now, the release post. ### WordPress 4.5 compatibility -WordPress 4.5 loads yet another file in `wp-settings.php`. Because WP-CLI has a custom wp-settings-cli.php ([background](https://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.23.0 is the only release compatible with WordPress 4.5. +WordPress 4.5 loads yet another file in `wp-settings.php`. Because WP-CLI has a custom wp-settings-cli.php ([background](http://wp-cli.org/blog/how-wp-cli-loads-wordpress.html)), WP-CLI v0.23.0 is the only release compatible with WordPress 4.5. **Importantly, due to the nature of these changes, WP-CLI versions prior to 0.23.0 will be incompatible with WordPress 4.5.** @@ -46,7 +46,7 @@ If you had to complete this task using the WordPress network admin, it would tak WP-CLI also generally follows the 80/20 rule when deciding whether to introduce a new feature. If the feature could be useful to most people, then maybe; otherwise, probably not. Those 20% shouldn't be left with the short stick though, particularly when it comes to the really helpful commands. -Today, I'm proud to reintroduce the [Package Index](https://wp-cli.org/package-index/), a directory of community-maintained WP-CLI packages. Browse available packages to install with `wp package browse` ([doc](https://wp-cli.org/commands/package/browse/)). Once you've found the solution you're looking for, install it with `wp package install` ([doc](https://wp-cli.org/commands/package/install/)): +Today, I'm proud to reintroduce the [Package Index](http://wp-cli.org/package-index/), a directory of community-maintained WP-CLI packages. Browse available packages to install with `wp package browse` ([doc](http://wp-cli.org/commands/package/browse/)). Once you've found the solution you're looking for, install it with `wp package install` ([doc](http://wp-cli.org/commands/package/install/)): $ wp package install runcommand/find-unused-themes Installing runcommand/find-unused-themes (dev-master) @@ -86,7 +86,7 @@ Relevant pull requests for `wp package` include [#2442](https://github.com/wp-cl Ever wonder why, when writing your own command, you had to extend `WP_CLI_Command`? Well, you didn't need to, actually. -In fact, `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) now supports registering any arbitrary callable as a WP-CLI command. For instance, here's a closure command to reset the passwords of one or more users ([runcommand/reset-passwords](https://github.com/runcommand/reset-passwords)): +In fact, `WP_CLI::add_command()` ([doc](http://wp-cli.org/docs/internal-api/wp-cli-add-command/)) now supports registering any arbitrary callable as a WP-CLI command. For instance, here's a closure command to reset the passwords of one or more users ([runcommand/reset-passwords](https://github.com/runcommand/reset-passwords)): /** * Reset passwords for one or more WordPress users. @@ -146,14 +146,14 @@ Note the `default` argument attribute for `format`. WP-CLI accepts `default` and */ $hook_command = function( $args, $assoc_args ) { -Check out the [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) for a deep dive into command registration. Relevant pull requests for these improvements to `WP_CLI::add_command()` include [#2373](https://github.com/wp-cli/wp-cli/pull/2373), [#2389](https://github.com/wp-cli/wp-cli/pull/2389), [#2398](https://github.com/wp-cli/wp-cli/pull/2398), [#2409](https://github.com/wp-cli/wp-cli/pull/2409), [#2556](https://github.com/wp-cli/wp-cli/pull/2556), [#2559](https://github.com/wp-cli/wp-cli/pull/2559). +Check out the [commands cookbook](http://wp-cli.org/docs/commands-cookbook/) for a deep dive into command registration. Relevant pull requests for these improvements to `WP_CLI::add_command()` include [#2373](https://github.com/wp-cli/wp-cli/pull/2373), [#2389](https://github.com/wp-cli/wp-cli/pull/2389), [#2398](https://github.com/wp-cli/wp-cli/pull/2398), [#2409](https://github.com/wp-cli/wp-cli/pull/2409), [#2556](https://github.com/wp-cli/wp-cli/pull/2556), [#2559](https://github.com/wp-cli/wp-cli/pull/2559). ### More, better, easier to find documentation It's actually hard to imagine how people got around previously. Here's what's changed in documentationland: -* The wiki has been reincarnated as the [documentation portal](https://wp-cli.org/docs/) on the website. I spent time cleaning up the pages as I moved them over; hopefully you find the new [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) quite helpful. -* Internal APIs you can use in your own commands are now [publicly documented](https://wp-cli.org/docs/internal-api/). The internal API pages are generated from the codebase, which should greatly help maintenance efforts. +* The wiki has been reincarnated as the [documentation portal](http://wp-cli.org/docs/) on the website. I spent time cleaning up the pages as I moved them over; hopefully you find the new [commands cookbook](http://wp-cli.org/docs/commands-cookbook/) quite helpful. +* Internal APIs you can use in your own commands are now [publicly documented](http://wp-cli.org/docs/internal-api/). The internal API pages are generated from the codebase, which should greatly help maintenance efforts. * On each command page, there's a "Github issues" link to make it easier to find both open and closed issues for a given command. For instance, here are [all of the outstanding issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+label%3Acommand%3Apackage+sort%3Aupdated-desc) for `wp package` and its subcommands. Keep in mind this isn't necessarily exact, because I didn't go back through and label all issues of all time. This feature will become more useful as time goes forward. Relevant pull requests include [#2454](https://github.com/wp-cli/wp-cli/pull/2454), [#2487](https://github.com/wp-cli/wp-cli/pull/2487), [#2494](https://github.com/wp-cli/wp-cli/pull/2494), [#2499](https://github.com/wp-cli/wp-cli/pull/2499), [#2507](https://github.com/wp-cli/wp-cli/pull/2507), [#2513](https://github.com/wp-cli/wp-cli/pull/2513), [#2515](https://github.com/wp-cli/wp-cli/pull/2515). @@ -220,4 +220,4 @@ Bug fixes across the board: Contributors to this release: [anantshri](https://github.com/anantshri), [danielbachhuber](https://github.com/danielbachhuber), [edueo](https://github.com/edueo), [GaryJones](https://github.com/GaryJones), [gilbitron](https://github.com/gilbitron), [hina](https://github.com/hina), [hinoue-work](https://github.com/hinoue-work), [jacobischwartz](https://github.com/jacobischwartz), [marco-c](https://github.com/marco-c), [markjaquith](https://github.com/markjaquith), [markkimsal](https://github.com/markkimsal), [mbovel](https://github.com/mbovel), [ottok](https://github.com/ottok), [rodrigoprimo](https://github.com/rodrigoprimo), [sourcerer-mike](https://github.com/sourcerer-mike), [staude](https://github.com/staude), [szepeviktor](https://github.com/szepeviktor), [za-creature](https://github.com/za-creature) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.23.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.23.0+is%3Aclosed) on Github. diff --git a/_posts/2016-04-14-restful-wp-cli-update-3.md b/_posts/2016-04-14-restful-wp-cli-update-3.md index 94f919de..162132f5 100644 --- a/_posts/2016-04-14-restful-wp-cli-update-3.md +++ b/_posts/2016-04-14-restful-wp-cli-update-3.md @@ -4,7 +4,7 @@ author: danielbachhuber title: RESTful WP-CLI - What I've been hacking on --- -Let me just say — Thursday, February 4th was [pretty darn demoralizing](https://twitter.com/Krogsgard/status/695634320401285121). I spent a huge amount of time in January towards the WP REST API in preparation for what I wanted to do on the command line, and a lot of momentum / inspiration / general good feelings were destroyed in that meeting. As such, I spent much of February and March working on WP-CLI features unrelated to the WP REST API (e.g. [package management](https://wp-cli.org/commands/package/)). +Let me just say — Thursday, February 4th was [pretty darn demoralizing](https://twitter.com/Krogsgard/status/695634320401285121). I spent a huge amount of time in January towards the WP REST API in preparation for what I wanted to do on the command line, and a lot of momentum / inspiration / general good feelings were destroyed in that meeting. As such, I spent much of February and March working on WP-CLI features unrelated to the WP REST API (e.g. [package management](http://wp-cli.org/commands/package/)). But, I'm back in the saddle. Because I'm 2/3 of the way through one of those fancy WP REST API + React WordPress applications, I'm running into dozens of ways I want to be able to make WordPress more efficiently. And of course, this means doing it on the command line. @@ -74,7 +74,7 @@ Profiling works for any CRUD operation. Debug (rest): REST command executed 31 queries in 0.023309 seconds. Use --debug=rest to see all queries. (1.634s) Success: Updated post. -Hopefully this feature becomes an invaluable part of your REST endpoint development process, as it has mine. Hit me with feedback on [its GitHub issue](https://github.com/danielbachhuber/wp-rest-cli/issues/42). +Hopefully this feature becomes an invaluable part of your REST endpoint development process, as it has mine. Hit me with feedback on [its Github issue](https://github.com/danielbachhuber/wp-rest-cli/issues/42). ### Use `wp rest * edit` to edit a resource in your system editor @@ -130,4 +130,4 @@ I'd love your input on the dozens of ideas I have for a more RESTful WP-CLI: * Introduce `wp rest * diff` to be able to diff the state of two different WordPresses, a la [Dictator](https://github.com/danielbachhuber/dictator) [[#56](https://github.com/danielbachhuber/wp-rest-cli/issues/56)]. * Figure out an elegant aliases implementation, so `--http=http://daniel:daniel@wordpress-develop.dev` becomes `@wpdev` [[#2039](https://github.com/wp-cli/wp-cli/issues/2039)] -And I want to hear your ideas too! As well as any feedback, questions, or violent dissent. [Let's chat on GitHub](https://github.com/danielbachhuber/wp-rest-cli/issues). +And I want to hear your ideas too! As well as any feedback, questions, or violent dissent. [Let's chat on Github](https://github.com/danielbachhuber/wp-rest-cli/issues). diff --git a/_posts/2016-04-28-version-0.23.1.md b/_posts/2016-04-28-version-0.23.1.md index 3e128300..9ed1225e 100644 --- a/_posts/2016-04-28-version-0.23.1.md +++ b/_posts/2016-04-28-version-0.23.1.md @@ -10,4 +10,4 @@ If you're using the Phar distribution of WP-CLI, you *should* `wp cli update`, b Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.23.1+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.23.1+is%3Aclosed) on Github. diff --git a/_posts/2016-06-23-future-wp-cli.md b/_posts/2016-06-23-future-wp-cli.md index 6f62578b..7fc79034 100644 --- a/_posts/2016-06-23-future-wp-cli.md +++ b/_posts/2016-06-23-future-wp-cli.md @@ -6,7 +6,7 @@ title: The future of WP-CLI As you might be aware, WP-CLI is an indispensable tool for many individuals and companies. We very much appreciate our community of users (although we have no idea how many of you there actually are), and want to ensure our relationship is strong for the years to come. -Just over a month ago, I [started a GitHub issue](https://github.com/wp-cli/wp-cli/issues/2743) with this question: +Just over a month ago, I [started a Github issue](https://github.com/wp-cli/wp-cli/issues/2743) with this question: > how do I reduce WP-CLI's bus factor, and more generally lay a foundation for WP-CLI's long-term organizational stability? @@ -16,7 +16,7 @@ Based on our conversation, we think the most important task is to reduce WP-CLI' * Documentation - Help ensure WP-CLI's documentation is world-class. * Marketing / community management - Help spread the word about WP-CLI. -* Support - Help WP-CLI users where they're asking questions, let it be GitHub, WordPress.org, Stack Exchange, or elsewhere. +* Support - Help WP-CLI users where they're asking questions, let it be Github, WordPress.org, Stack Exchange, or elsewhere. Contributions in these areas will always be welcome. Maintainership is a longer-term commitment to the project, focused on ongoing improvements to the specific area. WP-CLI expects its maintainers to commit a few hours per week to the project. diff --git a/_posts/2016-07-27-version-0.24.0.md b/_posts/2016-07-27-version-0.24.0.md index 99ea9a4e..e934a746 100644 --- a/_posts/2016-07-27-version-0.24.0.md +++ b/_posts/2016-07-27-version-0.24.0.md @@ -13,7 +13,7 @@ As I [mentioned in my WordCamp Europe talk](https://runcommand.io/2016/06/26/my- In this model, WP-CLI becomes the common interface, and supporting application layer, to a rich ecosystem of features. Doing so opens more frontiers for innovation, which leads to a greater selection of ideas to choose from. And because more people are involved in authoring packages, WP-CLI benefits from a larger contributor pool. -With this model, my focus shifts towards designing a world-class experience for WP-CLI package authorship. Read through the [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) for a thorough introduction to creating a WP-CLI command. Check out `wp scaffold package` [[repo](https://github.com/wp-cli/scaffold-package-command)] for the easiest way to generate the boilerplate for your new WP-CLI package. Weigh in with your thoughts on [how we should evolve the WP-CLI package index](https://github.com/wp-cli/wp-cli/issues/3197). And [follow @runcommand](https://twitter.com/runcommand) as I explore commercializing WP-CLI products and services — I hope that [runcommand](https://runcommand.io) is just the first of several WP-CLI-based businesses. +With this model, my focus shifts towards designing a world-class experience for WP-CLI package authorship. Read through the [commands cookbook](http://wp-cli.org/docs/commands-cookbook/) for a thorough introduction to creating a WP-CLI command. Check out `wp scaffold package` [[repo](https://github.com/wp-cli/scaffold-package-command)] for the easiest way to generate the boilerplate for your new WP-CLI package. Weigh in with your thoughts on [how we should evolve the WP-CLI package index](https://github.com/wp-cli/wp-cli/issues/3197). And [follow @runcommand](https://twitter.com/runcommand) as I explore commercializing WP-CLI products and services — I hope that [runcommand](https://runcommand.io) is just the first of several WP-CLI-based businesses. One last ask: if you care about the WP-CLI release cycle, or dependencies and backwards compatibility, please [let me know how often you think WP-CLI should be released](https://github.com/wp-cli/wp-cli/issues/3198). @@ -23,7 +23,7 @@ Let's get on with the show. Use `wp cli update` to install v0.24.0, representing Every application has a bootstrap file which loads all of the requisite utilities needed to serve a request. In WordPress, this is called `wp-settings.php`. -Since v0.8.0 [[#261](https://github.com/wp-cli/wp-cli/pull/261)], WP-CLI has used a forked version of this bootstrap file, called `wp-settings-cli.php`, to give it more control over the load process, providing features like `--skip-plugins`. But, because WordPress can require new files from `wp-settings.php`, maintaining a forked version has the unfortunate side effect of WP-CLI [regularly breaking when a new version of WordPress is released](https://wp-cli.org/blog/versions-0.21.1-and-0.20.4.html). +Since v0.8.0 [[#261](https://github.com/wp-cli/wp-cli/pull/261)], WP-CLI has used a forked version of this bootstrap file, called `wp-settings-cli.php`, to give it more control over the load process, providing features like `--skip-plugins`. But, because WordPress can require new files from `wp-settings.php`, maintaining a forked version has the unfortunate side effect of WP-CLI [regularly breaking when a new version of WordPress is released](http://wp-cli.org/blog/versions-0.21.1-and-0.20.4.html). Thanks to coordinated changes in the WordPress project, WP-CLI v0.24.0 returns to loading `wp-settings.php` for WordPress 4.6 and higher [[#2278](https://github.com/wp-cli/wp-cli/issues/2278)]. Doing so should make WP-CLI more future proof against new versions of WordPress. @@ -32,8 +32,8 @@ Thanks to coordinated changes in the WordPress project, WP-CLI v0.24.0 returns t Thanks to tireless efforts by a solid group of contributors, WP-CLI now has more documentation in more languages. * Dozens of commands have improved examples for reference. -* We have a new [CONTRIBUTING.md](https://github.com/wp-cli/wp-cli/blob/master/CONTRIBUTING.md), which also has a [page on the website](https://wp-cli.org/docs/contributing/). -* Our new [README.md](https://github.com/wp-cli/wp-cli/blob/master/README.md) powers the [WP-CLI homepage](https://wp-cli.org/), and is available in [Japanese](https://wp-cli.org/ja/), [Français](https://wp-cli.org/fr/), [Português (Brasil)](https://wp-cli.org/br/), [Türkçe](https://wp-cli.org/tr/), [Deutsch](https://wp-cli.org/de/), [नेपाली](https://wp-cli.org/ne/), and [ελληνικά](https://wp-cli.org/gr/). +* We have a new [CONTRIBUTING.md](https://github.com/wp-cli/wp-cli/blob/master/CONTRIBUTING.md), which also has a [page on the website](http://wp-cli.org/docs/contributing/). +* Our new [README.md](https://github.com/wp-cli/wp-cli/blob/master/README.md) powers the [WP-CLI homepage](http://wp-cli.org/), and is available in [Japanese](http://wp-cli.org/ja/), [Français](http://wp-cli.org/fr/), [Português (Brasil)](http://wp-cli.org/br/), [Türkçe](http://wp-cli.org/tr/), [Deutsch](http://wp-cli.org/de/), [नेपाली](http://wp-cli.org/ne/), and [ελληνικά](http://wp-cli.org/gr/). Want to get involved with WP-CLI's documentation? Check out the [Github issues labeled "scope:documentation"](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3Ascope%3Adocumentation). @@ -143,7 +143,7 @@ Bug fixes across the board: * Fixes listing user meta associated with a given username [[#2700](https://github.com/wp-cli/wp-cli/pull/2700)]. * Differentiates output when moving comments to trash from output when deleting comments [[#2701](https://github.com/wp-cli/wp-cli/pull/2701)]. * Prevents runaway memory usage from `wp export` by clearing object cache after each file [[#2716](https://github.com/wp-cli/wp-cli/pull/2716)]. -* Ignores ambiguous empty plugin and theme slugs when installing [[#2715](https://github.com/wp-cli/wp-cli/pull/2715)]. +* Ignores ambigious empty plugin and theme slugs when installing [[#2715](https://github.com/wp-cli/wp-cli/pull/2715)]. * Takes all digits when running commands that use the comment id [[#2714](https://github.com/wp-cli/wp-cli/pull/2714), [#2901](https://github.com/wp-cli/wp-cli/pull/2901)]. * Only displays packages directory path when it exists [[#2773](https://github.com/wp-cli/wp-cli/pull/2773)]. * Bails early in theme commands if theme is broken or has error [[#2798](https://github.com/wp-cli/wp-cli/pull/2798)]. @@ -158,6 +158,6 @@ Bug fixes across the board: Contributors to this release: [andyexeter](https://github.com/andyexeter), [bordoni](https://github.com/bordoni), [danielbachhuber](https://github.com/danielbachhuber), [diggy](https://github.com/diggy), [enrico-sorcinelli](https://github.com/enrico-sorcinelli), [ernilambar](https://github.com/ernilambar), [geo4orce](https://github.com/geo4orce), [gedex](https://github.com/gedex), [gilbitron](https://github.com/gilbitron), [hideokamoto](https://github.com/hideokamoto), [apertureless](https://github.com/apertureless), [JRGould](https://github.com/JRGould), [johnbillion](https://github.com/johnbillion), [kkoppenhaver](https://github.com/kkoppenhaver), [kouratoras](https://github.com/kouratoras), [markjaquith](https://github.com/markjaquith), [miya0001](https://github.com/miya0001), [mustafauysal](https://github.com/mustafauysal), [NateWr](https://github.com/NateWr), [Nikschavan](https://github.com/Nikschavan), [ocean90](https://github.com/ocean90), [petenelson](https://github.com/petenelson), [phh](https://github.com/phh), [rachelbaker](https://github.com/rachelbaker), [PatelUtkarsh](https://github.com/PatelUtkarsh), [PeterDaveHello](https://github.com/PeterDaveHello), [robhenley](https://github.com/robhenley) [rodrigoprimo](https://github.com/rodrigoprimo), [roelveldhuizen](https://github.com/roelveldhuizen), [ShinichiNishikawa](https://github.com/ShinichiNishikawa), [shulard](https://github.com/shulard), [stephenharris](https://github.com/stephenharris), [stevenkword](https://github.com/stevenkword), [swissspidy](https://github.com/swissspidy), [taianunes](https://github.com/taianunes), [villevuor](https://github.com/villevuor), [voldemortensen](https://github.com/voldemortensen), [wesm87](https://github.com/wesm87), [8bitodyssey](https://github.com/8bitodyssey) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.24.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.24.0+is%3Aclosed) on Github. Back to work! diff --git a/_posts/2016-08-09-support-policy.md b/_posts/2016-08-09-support-policy.md index 6142fd6a..e59f4cde 100644 --- a/_posts/2016-08-09-support-policy.md +++ b/_posts/2016-08-09-support-policy.md @@ -10,7 +10,7 @@ Have a question about something related to WP-CLI? You might find an answer in o - [Common issues and their fixes](https://wp-cli.org/docs/common-issues/) - [Documentation portal](https://wp-cli.org/docs/) -- [Open or closed issues on GitHub](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [Open or closed issues on Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) - [runcommand Excerpts](https://runcommand.io/excerpts/) - [WordPress StackExchange forums](http://wordpress.stackexchange.com/questions/tagged/wp-cli) diff --git a/_posts/2016-08-09-version-0.24.1.md b/_posts/2016-08-09-version-0.24.1.md index 917b549c..3f0d5c91 100644 --- a/_posts/2016-08-09-version-0.24.1.md +++ b/_posts/2016-08-09-version-0.24.1.md @@ -8,6 +8,6 @@ Curious as to why you're getting a warning message when updating an option? Or w These two bugs, regressions from v0.24.0, are fixed in v0.24.1. -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.24.1) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.24.1) on Github. Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) diff --git a/_posts/2016-10-25-version-0.25.0.md b/_posts/2016-10-25-version-0.25.0.md index 7982485c..3b22c1be 100644 --- a/_posts/2016-10-25-version-0.25.0.md +++ b/_posts/2016-10-25-version-0.25.0.md @@ -152,4 +152,4 @@ Bug fixes across the board: Contributors to this release (pull requests, documentation, and package authors): [2ndkauboy](https://github.com/2ndkauboy), [aaemnnosttv](https://github.com/aaemnnosttv), [alessandrotesoro](https://github.com/alessandrotesoro), [anhskohbo](https://github.com/anhskohbo), [balbuf](https://github.com/balbuf), [BeAPI](https://github.com/BeAPI), [binarygary](https://github.com/binarygary), [bradp](https://github.com/bradp), [brightoak](https://github.com/brightoak), [danielbachhuber](https://github.com/danielbachhuber), [danilomaccioni](https://github.com/danilomaccioni), [diggy](https://github.com/diggy), [getshifter](https://github.com/getshifter), [eriktorsner](https://github.com/eriktorsner), [ernilambar](https://github.com/ernilambar), [fisele](https://github.com/fisele), [grappler](https://github.com/grappler), [guillaumemolter](https://github.com/guillaumemolter), [iandunn](https://github.com/iandunn), [johnbillion](https://github.com/johnbillion), [jorgeatorres](https://github.com/jorgeatorres), [kouratoras](https://github.com/kouratoras), [markri](https://github.com/markri), [mattgrshaw](https://github.com/mattgrshaw), [miya0001](https://github.com/miya0001), [mustafauysal](https://github.com/mustafauysal), [nyordanov](https://github.com/nyordanov), [ocean90](https://github.com/ocean90), [petenelson](https://github.com/petenelson), [polevaultweb](https://github.com/polevaultweb), [pressbooks](https://github.com/pressbooks), [rahulsprajapati](https://github.com/rahulsprajapati), [runcommand](https://github.com/runcommand), [rxnlabs](https://github.com/rxnlabs), [shulard](https://github.com/shulard), [swissspidy](https://github.com/swissspidy), [szepeviktor](https://github.com/szepeviktor), [taianunes](https://github.com/taianunes), [tnorthcutt](https://github.com/tnorthcutt), [trendwerk](https://github.com/trendwerk), [trepmal](https://github.com/trepmal), [veganista](https://github.com/veganista), [welaika](https://github.com/welaika) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.25.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.25.0+is%3Aclosed) on Github. diff --git a/_posts/2016-11-29-version-1.0.0.md b/_posts/2016-11-29-version-1.0.0.md index 0dd8ba7d..a12cb19d 100644 --- a/_posts/2016-11-29-version-1.0.0.md +++ b/_posts/2016-11-29-version-1.0.0.md @@ -97,4 +97,4 @@ Framework enhancements: Contributors to this release (pull requests, documentation, and package authors): [abea](https://github.com/abea), [anttiviljami](https://github.com/anttiviljami), [cobyan](https://github.com/cobyan), [danielbachhuber](https://github.com/danielbachhuber), [diggy](https://github.com/diggy), [ernilambar](https://github.com/ernilambar), [franz-josef-kaiser](https://github.com/franz-josef-kaiser), [greatislander](https://github.com/greatislander), [itspriddle](https://github.com/itspriddle), [miya0001](https://github.com/miya0001), [mmcev106](https://github.com/mmcev106), [mopquill](https://github.com/mopquill), [ocean90](https://github.com/ocean90), [pj-dave](https://github.com/pj-dave), [pkarjala](https://github.com/pkarjala), [richardbuff](https://github.com/richardbuff), [sommarnatt](https://github.com/sommarnatt), [szepeviktor](https://github.com/szepeviktor), [torounit](https://github.com/torounit) -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A1.0.0+is%3Aclosed) on GitHub. +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A1.0.0+is%3Aclosed) on Github. diff --git a/_posts/2016-12-12-the-big-question.md b/_posts/2016-12-12-the-big-question.md index 461b6eda..9dfd6fd8 100644 --- a/_posts/2016-12-12-the-big-question.md +++ b/_posts/2016-12-12-the-big-question.md @@ -29,7 +29,7 @@ So, dear reader, a question: how much is WP-CLI worth to you? Or, phrased another way, how much time does WP-CLI save you? -If the experiment goes well, then we're in business! Your purchase will support ongoing maintenance of WP-CLI, as well as development of new commands like [wp doctor](https://runcommand.io/wp/doctor/) and [wp profile](https://runcommand.io/wp/profile/), [improvements to the website and package index](https://wp-cli.org/docs/wish-list/), and so on. +If the experiment goes well, then we're in business! Your purchase will support ongoing maintenance of WP-CLI, as well as development of new commands like [wp doctor](https://runcommand.io/wp/doctor/) and [wp profile](https://runcommand.io/wp/profile/), [improvements to the website and package index](http://wp-cli.org/docs/wish-list/), and so on. If the experiment doesn't go well, then at least I can say I tried :) To avoid any risk with the investment above, a full refund will be made available to you should the campaign not reach its goal, before we look at other approaches to help with maintaining the project. diff --git a/_posts/2016-12-28-supporting-the-future-of-wp-cli.md b/_posts/2016-12-28-supporting-the-future-of-wp-cli.md index 41613db4..899f0113 100644 --- a/_posts/2016-12-28-supporting-the-future-of-wp-cli.md +++ b/_posts/2016-12-28-supporting-the-future-of-wp-cli.md @@ -10,9 +10,9 @@ wp-cli is a command-line interface that is deployed and relied upon by almost ev To that end there are two big announcements: -1. The website of wp-cli.org, the code / GitHub, Twitter, and such are all coming in under the WordPress.org umbrella and there will be a CLI Make site with a P2 and all of the resources that used to be under wp-cli.org. There is already #cli on Slack and that will continue. (Will live at [https://make.wordpress.org/cli](https://make.wordpress.org/cli).) +1. The website of wp-cli.org, the code / Github, Twitter, and such are all coming in under the WordPress.org umbrella and there will be a CLI Make site with a P2 and all of the resources that used to be under wp-cli.org. There is already #cli on Slack and that will continue. (Will live at [https://make.wordpress.org/cli](https://make.wordpress.org/cli).) -2. I’m going to be bringing together a number of companies in the WordPress ecosystem to solidify their financial support of runcommand so that Daniel and others can devote more time to making wp-cli better and better through 2017. This is a continuation of [the fundraising started a few weeks ago](https://wp-cli.org/blog/the-big-question.html). +2. I’m going to be bringing together a number of companies in the WordPress ecosystem to solidify their financial support of runcommand so that Daniel and others can devote more time to making wp-cli better and better through 2017. This is a continuation of [the fundraising started a few weeks ago](http://wp-cli.org/blog/the-big-question.html). This will all happen the first part of January, and I’m looking to a full and exciting year for wp-cli. Also big thanks to everyone who has chipped in, whether time or money, to support the project in the past. It has been one of the highest impact developments for WP in many years. diff --git a/_templates/cmd-list.mustache b/_templates/cmd-list.mustache new file mode 100644 index 00000000..0fc2e3e9 --- /dev/null +++ b/_templates/cmd-list.mustache @@ -0,0 +1,6 @@ +{{#subcommands}} + + {{name}} + {{description}} + +{{/subcommands}} diff --git a/_templates/internal-api-list.mustache b/_templates/internal-api-list.mustache new file mode 100644 index 00000000..ec56d775 --- /dev/null +++ b/_templates/internal-api-list.mustache @@ -0,0 +1,9 @@ + diff --git a/_templates/internal-api.mustache b/_templates/internal-api.mustache new file mode 100644 index 00000000..4be04f9c --- /dev/null +++ b/_templates/internal-api.mustache @@ -0,0 +1,61 @@ +--- +layout: default +title: {{full_name}}() +description: "{{phpdoc.short_description}}" +--- + +Docs » Internal API » {{category}} + +## {{full_name}}() + +{{phpdoc.short_description}} + +*** + +### Usage + + {{signature}} + +
    +{{#phpdoc.parameters.param}} +{{1}} ({{0}}) {{{2}}}
    +{{/phpdoc.parameters.param}} +{{#phpdoc.parameters.return}} +@return ({{0}}) {{2}}
    +{{/phpdoc.parameters.return}} +
    + +{{#phpdoc.long_description}} + +*** + +### Notes + +{{{phpdoc.long_description}}} + +{{/phpdoc.long_description}} + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + +{{#has_related}} + +*** + +### Related + + + +{{/has_related}} + diff --git a/_templates/subcmd-list.mustache b/_templates/subcmd-list.mustache new file mode 100644 index 00000000..0a7ca364 --- /dev/null +++ b/_templates/subcmd-list.mustache @@ -0,0 +1,36 @@ +--- +layout: default +title: 'wp {{synopsis}}' +display_global_parameters: true +--- + +{{{breadcrumbs}}} + +`wp {{synopsis}}` - {{description}} + +Quick links: Github issues + +
    + +{{{docs}}} + +{{#has-subcommands}} +### SUBCOMMANDS + + + + + + + + + + {{#subcommands}} + + + + + {{/subcommands}} + +
    NameDescription
    {{name}}{{description}}
    +{{/has-subcommands}} diff --git a/assets/css/stylesheet.css b/assets/css/stylesheet.css index f3ad52f7..d246ed31 100644 --- a/assets/css/stylesheet.css +++ b/assets/css/stylesheet.css @@ -1,4 +1,4 @@ -/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-spacing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} html { overflow-y: scroll; } @@ -10,11 +10,14 @@ body { body { margin: 0; padding: 0; + background: #f1f1f1; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - font-size: 18px; + + font-family: 'Open Sans', "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font: 16px; line-height: 1.6; color: #292929; + -webkit-font-smoothing: antialiased; } @@ -28,17 +31,15 @@ body { section { display: block; - margin: 0 0 40px 0; + margin: 0 0 20px 0; } h1, h2, h3, h4, h5, h6 { - margin: 2em 0 0.5em 0; + margin: 1em 0 0 0; color: #333; font-weight: normal; } -h1 { margin-top: 1em; } - h3, h4 { font-weight: 600; } @@ -102,12 +103,9 @@ nav ul li:before { } blockquote { - color: #666; - padding: 10px 20px; - margin: 1.5em 0; - border-left: 4px solid #ddd; - background: rgba(0,0,0,0.03); - border-radius: 0 4px 4px 0; + color: #888; + padding-left: 10px; + border-left: 1px dotted #666; } @@ -126,11 +124,7 @@ table { th, td { vertical-align: top; - padding: 12px 16px; -} - -tr:hover td { - background-color: #f9f9f9; + padding: 0.5em 1em; } th { @@ -177,15 +171,7 @@ a { transition-duration: 0.05s; transition-property: border, background, color; transition-timing-function: ease-in-out; - text-decoration-thickness: 1px; - text-underline-offset: 3px; -} - -:focus-visible { - outline: 2px solid #0074A2; - outline-offset: 2px; } - a:hover, a:active { color: #2EA2CC; } @@ -199,6 +185,7 @@ a:focus { code, pre { color: #f1f1f1; + text-shadow: 0 1px rgba(0,0,0,0.3); font-family: Consolas, "Liberation Mono", Courier, monospace; direction: ltr; text-align: left; @@ -287,46 +274,45 @@ img { */ header { - background: #000; + background: #292929; width: 100%; padding: 20px 0 10px 0; margin: 0 0 30px 0; } header h1 { - font-size: 17px; + font-size: 30px; + color: #fff; + line-height: 1.5; + margin: 0 0 0 0; + letter-spacing: 5px; + text-transform: uppercase; font-weight: 300; - color: #f5f5f5; - margin-top: 10px; - margin-bottom: 20px; -} - -@media (max-width: 970px) { - header h1 { - margin-left: 0; - } } -@media (max-width: 690px) { - /* Avoid collision with the language selector */ - header h1 { - padding-top: 40px; - } +header h1 a { + color: #fff; + text-decoration: none } -header h1 img { - vertical-align: middle; +header h1 a:hover, +header h1 a:active { + color: #F7F7F7; } -header h1 span { - margin-left: 10px; +header h2 { + font-size: 17px; + font-weight: 300; + color: #f5f5f5; + margin-top: 10px; + margin-bottom: 20px; } footer { clear: both; display: block; text-align: center; - font-size: 14px; + font-size: 10px; margin: 20px 10px 40px 10px; } @@ -359,7 +345,7 @@ footer { color: #b5e853; } -.main-nav ul li:nth-child(5) a { +.main-nav ul li:nth-child(6) a { background-color: rgba(122, 208, 58, 0.5); color: white; border-radius: 5px; @@ -433,8 +419,6 @@ footer { .main-nav .search:focus { width: 180px; - outline: none; - box-shadow: 0 0 0 2px rgba(122, 208, 58, 0.5); } .main-nav .btn-search { display: none; @@ -466,13 +450,6 @@ body.display-global-parameters #main_content { -webkit-font-smoothing: antialiased; } -@media (max-width: 970px) { - #main_content { - padding: 0; /* parent .container will provide needed spacement */ - margin: 0; - } -} - #main_content h1 { font-size: 30px; } @@ -578,20 +555,22 @@ body.configuration .global-parameters{ .btn { display: inline-block; - background: #333; - padding: 10px 24px; + background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.3), rgba(35, 35, 35, 0.3) 50%, rgba(10, 10, 10, 0.3) 50%, rgba(0, 0, 0, 0.3)); + padding: 8px 18px; border-radius: 50px; - border: none; - color: #fff; - font-family: inherit; + border: 2px solid rgba(0, 0, 0, 0.7); + border-bottom: 2px solid rgba(0, 0, 0, 0.7); + border-top: 2px solid rgba(0, 0, 0, 1); + color: rgba(255, 255, 255, 0.8); + font-family: Helvetica, Arial, sans-serif; font-weight: bold; - font-size: 14px; + font-size: 13px; text-decoration: none; - transition: background 0.2s ease; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); } .btn:hover { - background: #444; + background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.6), rgba(35, 35, 35, 0.6) 50%, rgba(10, 10, 10, 0.8) 50%, rgba(0, 0, 0, 0.8)); } .btn .icon { @@ -608,6 +587,9 @@ body.configuration .global-parameters{ } + + + /* Blog */ .hentry + .hentry { @@ -674,7 +656,7 @@ hr:after, padding-bottom: 1em; } -/* Announcement within posts */ +/* Accouncement within posts */ .announcement { padding: 0.3em 1em 0.5em 1em; margin-bottom: 1em; @@ -740,8 +722,14 @@ hr:after, } } +@media (max-width: 970px) { + header h1 { + margin-left: 0; + } +} + @media (max-width: 690px) { - .main-nav li:not(:nth-child(5)) a { + .main-nav li a { padding-left: 0; } @@ -750,91 +738,3 @@ hr:after, padding-right: 9px; } } - -@media (prefers-color-scheme: dark) { - body { - background: #121212; - color: #e0e0e0; - } - h1, h2, h3, h4, h5, h6 { - color: #ffffff !important; - } - a { - color: #4da6ff; - } - a:hover, a:active { - color: #80c1ff; - } - .global-parameters { - background: #1e1e1e; - color: #ccc; - } - .global-parameters code { - color: #4da6ff; - } - th, td, .horizontal th, .horizontal tr:nth-child(even) th, tr:nth-child(even) td { - background: #1e1e1e; - border-bottom: 1px solid #333; - } - code { - background: #2a2a2a; - color: #f1f1f1; - } - pre code { - border: 1px solid #333; - } - blockquote { - color: #ccc; - border-left-color: #444; - background: rgba(255,255,255,0.05); - } - .social-nav .rounded { - background: #333; - color: #ccc; - } - .social-nav .rounded:hover { - color: #7AD03A; - } - header { - background: #000; - } - header h1 { - color: #f5f5f5; - } - .header-link { - color: #888; - } - .header-link:hover { - color: #ffffff; - } - input, textarea, select, button { - background: #2a2a2a; - color: #fff; - border: 1px solid #444; - } - fieldset { - border-color: #444; - } - tr:hover td { - background-color: #252525 !important; - } - /* List separators and symbols */ - ul li:before { - color: #aaa; - } - hr:after, .hentry:after { - background: #444; - } - .hentry + .hentry:before { - background: #121212; - color: #666; - } - /* Sponsor logos with transparent backgrounds */ - a > img[src*="make.wordpress.org/cli/files"] { - background: #fff; - padding: 15px; - border-radius: 8px; - display: inline-block; - box-sizing: border-box; - } -} \ No newline at end of file diff --git a/assets/img/favicon.ico b/assets/img/favicon.ico new file mode 100644 index 00000000..558a8d43 Binary files /dev/null and b/assets/img/favicon.ico differ diff --git a/assets/img/favicon.jpg b/assets/img/favicon.jpg deleted file mode 100644 index 4f3163e1..00000000 Binary files a/assets/img/favicon.jpg and /dev/null differ diff --git a/assets/img/wp-cli-logo-inverted.png b/assets/img/wp-cli-logo-inverted.png deleted file mode 100644 index 86d13b54..00000000 Binary files a/assets/img/wp-cli-logo-inverted.png and /dev/null differ diff --git a/assets/img/wp-cli-logo.png b/assets/img/wp-cli-logo.png deleted file mode 100644 index e922c05f..00000000 Binary files a/assets/img/wp-cli-logo.png and /dev/null differ diff --git a/assets/img/wp-cli-og-image.png b/assets/img/wp-cli-og-image.png deleted file mode 100644 index b79dd474..00000000 Binary files a/assets/img/wp-cli-og-image.png and /dev/null differ diff --git a/behat-data/audio-with-400x300-cover.mp3 b/behat-data/audio-with-400x300-cover.mp3 deleted file mode 100644 index bb6922c7..00000000 Binary files a/behat-data/audio-with-400x300-cover.mp3 and /dev/null differ diff --git a/behat-data/audio-with-no-cover.mp3 b/behat-data/audio-with-no-cover.mp3 deleted file mode 100644 index 5f8ba9c4..00000000 Binary files a/behat-data/audio-with-no-cover.mp3 and /dev/null differ diff --git a/behat-data/video-400x300-with-cover.mp4 b/behat-data/video-400x300-with-cover.mp4 deleted file mode 100644 index 13a9073f..00000000 Binary files a/behat-data/video-400x300-with-cover.mp4 and /dev/null differ diff --git a/behat-data/video-400x300-with-no-cover.mp4 b/behat-data/video-400x300-with-no-cover.mp4 deleted file mode 100644 index 63e0ff9e..00000000 Binary files a/behat-data/video-400x300-with-no-cover.mp4 and /dev/null differ diff --git a/behat-data/white-150-square.jpg b/behat-data/white-150-square.jpg deleted file mode 100644 index eb600922..00000000 Binary files a/behat-data/white-150-square.jpg and /dev/null differ diff --git a/behat-data/white-160-square.bmp b/behat-data/white-160-square.bmp deleted file mode 100644 index 047b941c..00000000 Binary files a/behat-data/white-160-square.bmp and /dev/null differ diff --git a/br/index.md b/br/index.md index cda05582..c830afa0 100644 --- a/br/index.md +++ b/br/index.md @@ -1,114 +1,94 @@ --- layout: default -title: Interface para linha de comando para o WordPress -direction: ltr +title: Interface para linha de comando em WordPress --- -[WP-CLI](https://wp-cli.org/) é a interface em linha de comando para o [WordPress](https://br.wordpress.org/). Você pode atualizar plugins, configurar instalações multisite e muito mais, sem utilizar um navegador web. +[WP-CLI](https://wp-cli.org/) é um conjunto de linhas de comando para gerenciar instalações [WordPress](https://wordpress.org/). Você pode atualizar plugins, configurar instalações multisite e muito mais, sem utilizar um navegador web. -A manutenção contínua é possível graças aos seguintes patrocinadores: +Para manter-se atualizado, siga [@wpcli no Twitter](https://twitter.com/wpcli) ou [inscreva-se em nossa newsletter](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). - - - - - - +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Tempo médio para resolver um issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](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. - -[![Testing](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Tempo médio para resolver um issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](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 = << $cmd ) { + if ( in_array( $cmd['name'], array( 'website', 'api-dump' ) ) ) { + unset( $wp['subcommands'][ $k ] ); + } + } + $wp['subcommands'] = array_values( $wp['subcommands'] ); + + // generate main page + file_put_contents( '_includes/cmd-list.html', render( 'cmd-list.mustache', $wp ) ); + WP_CLI::log( 'Generated /commands/' ); + + foreach ( $wp['subcommands'] as $cmd ) { + gen_cmd_pages( $cmd ); + } + WP_CLI::success( 'Generated all command pages.' ); +} +WP_CLI::add_command( 'website generate-commands', '\WP_CLI_Org\generate_commands' ); + +/** + * Generate the /docs/ page. + * + * @when before_wp_load + */ +function generate_docs() { + $docs = array( + 'Guides' => array( + 'Installing' => array(), + 'Quick start' => array(), + ), + 'References' => array( + 'Global parameters' => array( + 'path' => '/config/', + 'title' => 'Global parameters', + 'description' => 'Variables defining how a command is executed, including which WordPress user the command is run as and which WordPress instance the command is run against.', + ), + 'Built-in commands' => array( + 'path' => '/commands/', + 'title' => 'Built-in commands', + 'description' => 'Commands included in every copy of WP-CLI.', + ), + 'Package index' => array( + 'path' => '/package-index/', + 'title' => 'Package index', + 'description' => 'Commands maintained and supported by the community.', + ), + 'Internal API' => array(), + ), + 'Contributing' => array(), + 'Misc' => array(), + ); + foreach( glob( __DIR__ . '/docs/*/index.md' ) as $file ) { + $contents = file_get_contents( $file ); + $parts = explode( '---', $contents ); + $header = $parts[1]; + preg_match( '#category:\s(.+)#', $header, $matches ); + if ( ! empty( $matches[1] ) && array_key_exists( $matches[1], $docs ) ) { + $category = $matches[1]; + } else { + $category = 'Misc'; + } + preg_match( '#title:\s(.+)#', $header, $matches ); + $title = ! empty( $matches[1] ) ? $matches[1] : ''; + preg_match( '#description:\s(.+)#', $header, $matches ); + $description = ! empty( $matches[1] ) ? $matches[1] : ''; + if ( ! isset( $docs[ $category ][ $title ] ) ) { + $docs[ $category ][ $title ] = array(); + } + $docs[ $category ][ $title ]['path'] = '/docs/' . basename( dirname( $file ) ) . '/'; + $docs[ $category ][ $title ]['title'] = $title; + $docs[ $category ][ $title ]['description'] = $description; + } + $out = ''; + foreach( $docs as $category => $cat_docs ) { + if ( empty( $cat_docs ) ) { + continue; + } + $cat_slug = strtolower( $category ); + $out .= '

    ' . $category . '

    ' . PHP_EOL . PHP_EOL; + $out .= '' . PHP_EOL . PHP_EOL; + } + + file_put_contents( '_includes/doc-list.html', $out ); + WP_CLI::success( 'Generated /docs/' ); +} +WP_CLI::add_command( 'website generate-docs', '\WP_CLI_Org\generate_docs' ); + +/** + * Generate the /docs/internal-apis/ page. + * + * @when before_wp_load + */ +function generate_internal_api_docs() { + $apis = invoke_wp_cli( 'wp api-dump' ); + $categories = array( + 'Registration' => array(), + 'Output' => array(), + 'Input' => array(), + 'Execution' => array(), + 'System' => array(), + 'Misc' => array(), + ); + + $prepare_api_slug = function( $full_name ) { + $replacements = array( + '()' => '', + '::' => '-', + '_' => '-', + '\\' => '-', + ); + return strtolower( str_replace( array_keys( $replacements ), array_values( $replacements ), $full_name ) ); + }; + + $prepare_code_block = function( $description ) { + return preg_replace_callback( '#```(.+)```#Us', function( $matches ) { + return str_replace( PHP_EOL, PHP_EOL . ' ', $matches[1] ); + }, $description ); + }; + + foreach( $apis as $api ) { + + $api['api_slug'] = $prepare_api_slug( $api['full_name'] ); + $api['phpdoc']['long_description'] = $prepare_code_block( $api['phpdoc']['long_description'] ); + + if ( ! empty( $api['phpdoc']['parameters']['category'][0][0] ) + && isset( $categories[ $api['phpdoc']['parameters']['category'][0][0] ] ) ) { + $categories[ $api['phpdoc']['parameters']['category'][0][0] ][] = $api; + } else { + $categories['Misc'][] = $api; + } + } + $out = '***' . PHP_EOL . PHP_EOL; + + foreach( $categories as $name => $apis ) { + $out .= '## ' . $name . PHP_EOL . PHP_EOL; + $out .= render( 'internal-api-list.mustache', array( 'apis' => $apis ) ); + foreach( $apis as $i => $api ) { + $api['category'] = $name; + $api['related'] = $apis; + $api['phpdoc']['parameters'] = array_map( function( $parameter ){ + foreach( $parameter as $key => $values ) { + if ( isset( $values[2] ) ) { + $values[2] = str_replace( array( PHP_EOL ), array( '
    ' ), $values[2] ); + $parameter[ $key ] = $values; + } + } + return $parameter; + }, $api['phpdoc']['parameters'] ); + unset( $api['related'][ $i ] ); + $api['related'] = array_values( $api['related'] ); + $api['has_related'] = ! empty( $api['related'] ); + $api_doc = render( 'internal-api.mustache', $api ); + $path = "docs/internal-api/{$api['api_slug']}"; + if ( ! is_dir( $path ) ) { + mkdir( $path ); + } + file_put_contents( "$path/index.md", $api_doc ); + } + $out .= PHP_EOL . PHP_EOL; + } + + file_put_contents( '_includes/internal-api-list.html', $out ); + WP_CLI::success( 'Generated /docs/internal-api/' ); +} +WP_CLI::add_command( 'website generate-internal-api-docs', '\WP_CLI_Org\generate_internal_api_docs' ); + +/** + * Dump the list of internal APIs, as JSON. + * + * Used to build user-facing docs of public APIs. + * + * @when before_wp_load + * + * @subcommand api-dump + */ +function api_dump() { + $apis = array(); + $functions = get_defined_functions(); + foreach( $functions['user'] as $function ) { + $reflection = new \ReflectionFunction( $function ); + $phpdoc = $reflection->getDocComment(); + if ( false === stripos( $phpdoc, '@access public' ) ) { + continue; + } + $apis[] = get_simple_representation( $reflection ); + } + $classes = get_declared_classes(); + foreach( $classes as $class ) { + if ( false === stripos( $class, 'WP_CLI' ) ) { + continue; + } + $reflection = new \ReflectionClass( $class ); + foreach( $reflection->getMethods() as $method ) { + $method_reflection = new \ReflectionMethod( $method->class, $method->name ); + $phpdoc = $method_reflection->getDocComment(); + if ( false === stripos( $phpdoc, '@access public' ) ) { + continue; + } + $apis[] = get_simple_representation( $method_reflection ); + } + } + echo json_encode( $apis ); +} +\WP_CLI::add_command( 'api-dump', '\WP_CLI_Org\api_dump' ); + +/** + * Get a simple representation of a function or method + * + * @param Reflection + * @return array + */ +function get_simple_representation( $reflection ) { + $signature = $reflection->getName(); + $parameters = array(); + foreach( $reflection->getParameters() as $parameter ) { + $parameter_signature = '$' . $parameter->getName(); + if ( $parameter->isOptional() ) { + $default_value = $parameter->getDefaultValue(); + if ( false === $default_value ) { + $parameter_signature .= ' = false'; + } else if ( array() === $default_value ) { + $parameter_signature .= ' = array()'; + } else if ( '' === $default_value ) { + $parameter_signature .= " = ''"; + } else if ( null === $default_value ) { + $parameter_signature .= ' = null'; + } else if ( true === $default_value ) { + $parameter_signature .= ' = true'; + } else { + $parameter_signature .= ' = ' . $default_value; + } + } + $parameters[] = $parameter_signature; + } + if ( ! empty( $parameters ) ) { + $signature = $signature . '( ' . implode( ', ', $parameters ) . ' )'; + } else { + $signature = $signature . '()'; + } + $phpdoc = $reflection->getDocComment(); + $type = strtolower( str_replace( 'Reflection', '', get_class( $reflection ) ) ); + $class = ''; + switch ( $type ) { + case 'function': + $full_name = $reflection->getName(); + break; + case 'method': + $separator = $reflection->isStatic() ? '::' : '->'; + $class = $reflection->class; + $full_name = $class . $separator . $reflection->getName(); + $signature = $class . $separator . $signature; + break; + } + return array( + 'phpdoc' => parse_docblock( $phpdoc ), + 'type' => $type, + 'signature' => $signature, + 'short_name' => $reflection->getShortName(), + 'full_name' => $full_name, + 'class' => $class, + ); +} + +/** + * Parse PHPDoc into a structured representation + */ +function parse_docblock( $docblock ) { + $ret = array( + 'description' => '', + 'parameters' => array(), + ); + $extra_line = ''; + $in_param = false; + foreach( preg_split("/(\r?\n)/", $docblock ) as $line ){ + if ( preg_match('/^(?=\s+?\*[^\/])(.+)/', $line, $matches ) ) { + $info = trim( $matches[1] ); + $info = preg_replace( '/^(\*\s+?)/', '', $info ); + if ( $in_param ) { + list( $param, $key ) = $in_param; + $ret['parameters'][ $param_name ][ $key ][2] .= PHP_EOL . $info; + if ( '}' === substr( $info, -1 ) ) { + $in_param = false; + } + } else if ( $info[0] !== "@" ) { + $ret['description'] .= PHP_EOL . "{$extra_line}{$info}"; + } else { + preg_match( '/@(\w+)/', $info, $matches ); + $param_name = $matches[1]; + $value = str_replace( "@$param_name ", '', $info ); + if ( ! isset( $ret['parameters'][ $param_name ] ) ) { + $ret['parameters'][ $param_name ] = array(); + } + $ret['parameters'][ $param_name ][] = preg_split( '/[\s]+/', $value, 3 ); + end( $ret['parameters'][ $param_name ] ); + $key = key( $ret['parameters'][ $param_name ] ); + reset( $ret['parameters'][ $param_name ] ); + if ( ! empty( $ret['parameters'][ $param_name ][ $key ][ 2 ] ) + && '{' === substr( $ret['parameters'][ $param_name ][ $key ][ 2 ] , -1 ) ) { + $in_param = array( $param_name, $key ); + } + } + $extra_line = ''; + } else { + $extra_line .= PHP_EOL; + } + } + $ret['description'] = str_replace( '\/', '/', trim( $ret['description'], PHP_EOL ) ); + $bits = explode( PHP_EOL, $ret['description'] ); + $ret['short_description'] = array_shift( $bits ); + $long_description = trim( implode( PHP_EOL, $bits ), PHP_EOL ); + $ret['long_description'] = $long_description; + return $ret; +} + +function gen_cmd_pages( $cmd, $parent = array() ) { + $parent[] = $cmd['name']; + + $binding = $cmd; + $binding['synopsis'] = implode( ' ', $parent ); + $binding['path'] = implode( '/', $parent ); + $path = '/commands/'; + $binding['breadcrumbs'] = '[Commands](' . $path . ')'; + foreach( $parent as $i => $p ) { + $path .= $p . '/'; + if ( $i < ( count( $parent ) - 1 ) ) { + $binding['breadcrumbs'] .= " » [{$p}]({$path})"; + } else { + $binding['breadcrumbs'] .= " » {$p}"; + } + } + $binding['has-subcommands'] = isset( $cmd['subcommands'] ) ? array(true) : false; + + if ( $cmd['longdesc'] ) { + $docs = $cmd['longdesc']; + $docs = htmlspecialchars( $docs, ENT_COMPAT, 'UTF-8' ); + + // decrease header level + $docs = preg_replace( '/^## /m', '### ', $docs ); + + // escape `--` so that it doesn't get converted into `—` + $docs = preg_replace( '/^(\[?)--/m', '\1\--', $docs ); + $docs = preg_replace( '/^\s\s--/m', ' \1\--', $docs ); + + // hack to prevent double encoding in code blocks + $docs = preg_replace( '/ < /', ' < ', $docs ); + $docs = preg_replace( '/ > /', ' > ', $docs ); + $docs = preg_replace( '/ <</', ' <<', $docs ); + $docs = preg_replace( '/"/', '"', $docs ); + + // Strip global parameters -> added in footer + $docs = preg_replace( '/#?## GLOBAL PARAMETERS.+/s', '', $docs ); + + $binding['docs'] = $docs; + $binding['github_issues_link'] = 'https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+label%3A' . urlencode( 'command:' . str_replace( ' ', '-', $binding['synopsis'] ) ) . '+sort%3Aupdated-desc'; + } + + $path = __DIR__ . "/commands/" . $binding['path']; + if ( !is_dir( $path ) ) { + mkdir( $path ); + } + file_put_contents( "$path/index.md", render( 'subcmd-list.mustache', $binding ) ); + WP_CLI::log( 'Generated /commands/' . $binding['path'] . '/' ); + + if ( !isset( $cmd['subcommands'] ) ) + return; + + foreach ( $cmd['subcommands'] as $subcmd ) { + gen_cmd_pages( $subcmd, $parent ); + } +} + function invoke_wp_cli( $cmd ) { ob_start(); system( "WP_CLI_CONFIG_PATH=/dev/null $cmd", $return_code ); @@ -67,3 +548,9 @@ function invoke_wp_cli( $cmd ) { return json_decode( $json, true ); } + +function render( $path, $binding ) { + $m = new Mustache_Engine; + $template = file_get_contents( __DIR__ . "/_templates/$path" ); + return $m->render( $template, $binding ); +} diff --git a/commands/blog/create/index.md b/commands/blog/create/index.md index 3502b1a0..6309a190 100644 --- a/commands/blog/create/index.md +++ b/commands/blog/create/index.md @@ -1,4 +1,5 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/create/ ---- \ No newline at end of file +layout: default +title: 'wp blog create' +--- +The `wp blog create` command has been renamed to [wp site create](/commands/site/create) in WP-CLI 0.11. diff --git a/commands/blog/delete/index.md b/commands/blog/delete/index.md index 312f171c..e0bd27f4 100644 --- a/commands/blog/delete/index.md +++ b/commands/blog/delete/index.md @@ -1,4 +1,5 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/delete/ ---- \ No newline at end of file +layout: default +title: 'wp blog delete' +--- +The `wp blog delete` command has been renamed to [wp site delete](/commands/site/delete) in WP-CLI 0.11. diff --git a/commands/blog/empty/index.md b/commands/blog/empty/index.md index 3017c434..e6219d29 100644 --- a/commands/blog/empty/index.md +++ b/commands/blog/empty/index.md @@ -1,4 +1,5 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/empty/ ---- \ No newline at end of file +layout: default +title: 'wp blog empty' +--- +The `wp blog empty` command has been renamed to [wp site empty](/commands/site/empty) in WP-CLI 0.11. diff --git a/commands/blog/index.md b/commands/blog/index.md index 39ca96ed..eaf889a0 100644 --- a/commands/blog/index.md +++ b/commands/blog/index.md @@ -1,4 +1,5 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/ ---- \ No newline at end of file +layout: default +title: 'wp blog' +--- +The `wp blog` command has been renamed to [wp site](/commands/site) in WP-CLI 0.11. diff --git a/commands/cache/add/index.md b/commands/cache/add/index.md index 8e39e41b..72617b6a 100644 --- a/commands/cache/add/index.md +++ b/commands/cache/add/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/add/ ---- \ No newline at end of file +layout: default +title: 'wp cache add' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » add + +`wp cache add` - Add a value to the object cache. + +Quick links: Github issues + +
    + +Errors if a value already exists for the key, which means the value can't +be added. + +### OPTIONS + +<key> +: Cache key. + +<value> +: Value to add to the key. + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +[<expiration>] +: Define how long to keep the value, in seconds. `0` means as long as possible. +\--- +default: 0 +\--- + +### EXAMPLES + + # Add cache. + $ wp cache add my_key my_group my_value 300 + Success: Added object 'my_key' in group 'my_value'. + + + diff --git a/commands/cache/decr/index.md b/commands/cache/decr/index.md index 2601c83f..d98fe096 100644 --- a/commands/cache/decr/index.md +++ b/commands/cache/decr/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/decr/ ---- \ No newline at end of file +layout: default +title: 'wp cache decr' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » decr + +`wp cache decr` - Decrement a value in the object cache. + +Quick links: Github issues + +
    + +Errors if the value can't be decremented. + +### OPTIONS + +<key> +: Cache key. + +[<offset>] +: The amount by which to decrement the item's value. +\--- +default: 1 +\--- + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +### EXAMPLES + + # Decrease cache value. + $ wp cache decr my_key 2 my_group + 48 + + + diff --git a/commands/cache/delete/index.md b/commands/cache/delete/index.md index 2b321377..1a562f2d 100644 --- a/commands/cache/delete/index.md +++ b/commands/cache/delete/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/delete/ ---- \ No newline at end of file +layout: default +title: 'wp cache delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » delete + +`wp cache delete` - Remove a value from the object cache. + +Quick links: Github issues + +
    + +Errors if the value can't be deleted. + +### OPTIONS + +<key> +: Cache key. + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +### EXAMPLES + + # Delete cache. + $ wp cache delete my_key my_group + Success: Object deleted. + + + diff --git a/commands/cache/flush/index.md b/commands/cache/flush/index.md index 7063e12c..7b967ce1 100644 --- a/commands/cache/flush/index.md +++ b/commands/cache/flush/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/flush/ ---- \ No newline at end of file +layout: default +title: 'wp cache flush' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » flush + +`wp cache flush` - Flush the object cache. + +Quick links: Github issues + +
    + +For WordPress multisite instances using a persistent object cache, +flushing the object cache will typically flush the cache for all sites. +Beware of the performance impact when flushing the object cache in +production. + +Errors if the object cache can't be flushed. + +### EXAMPLES + + # Flush cache. + $ wp cache flush + Success: The cache was flushed. + + + diff --git a/commands/cache/get/index.md b/commands/cache/get/index.md index 5fcfebff..6512625c 100644 --- a/commands/cache/get/index.md +++ b/commands/cache/get/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/get/ ---- \ No newline at end of file +layout: default +title: 'wp cache get' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » get + +`wp cache get` - Get a value from the object cache. + +Quick links: Github issues + +
    + +Errors if the value doesn't exist. + +### OPTIONS + +<key> +: Cache key. + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +___ + +### EXAMPLES + + # Get cache. + $ wp cache get my_key my_group + my_value + + + diff --git a/commands/cache/incr/index.md b/commands/cache/incr/index.md index 3cc26adc..3b0c37c0 100644 --- a/commands/cache/incr/index.md +++ b/commands/cache/incr/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/incr/ ---- \ No newline at end of file +layout: default +title: 'wp cache incr' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » incr + +`wp cache incr` - Increment a value in the object cache. + +Quick links: Github issues + +
    + +Errors if the value can't be incremented. + +### OPTIONS + +<key> +: Cache key. + +[<offset>] +: The amount by which to increment the item's value. +\--- +default: 1 +\--- + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +### EXAMPLES + + # Increase cache value. + $ wp cache incr my_key 2 my_group + 50 + + + diff --git a/commands/cache/index.md b/commands/cache/index.md index a08cf894..cf19501a 100644 --- a/commands/cache/index.md +++ b/commands/cache/index.md @@ -1,4 +1,76 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/ ---- \ No newline at end of file +layout: default +title: 'wp cache' +display_global_parameters: true +--- + +[Commands](/commands/) » cache + +`wp cache` - Manage the object cache. + +Quick links: Github issues + +
    + +Use a persistent object cache drop-in to persist cache values between requests. + +### EXAMPLES + + # Set cache. + $ wp cache set my_key my_value my_group 300 + Success: Set object 'my_key' in group 'my_group'. + + # Get cache. + $ wp cache get my_key my_group + my_value + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a value to the object cache.
    decrDecrement a value in the object cache.
    deleteRemove a value from the object cache.
    flushFlush the object cache.
    getGet a value from the object cache.
    incrIncrement a value in the object cache.
    replaceReplace a value in the object cache, if the value already exists.
    setSet a value to the object cache, regardless of whether it already exists.
    typeAttempts to determine which object cache is being used.
    diff --git a/commands/cache/replace/index.md b/commands/cache/replace/index.md index 920bf711..1f4362a6 100644 --- a/commands/cache/replace/index.md +++ b/commands/cache/replace/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/replace/ ---- \ No newline at end of file +layout: default +title: 'wp cache replace' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » replace + +`wp cache replace` - Replace a value in the object cache, if the value already exists. + +Quick links: Github issues + +
    + +Errors if the value can't be replaced. + +### OPTIONS + +<key> +: Cache key. + +<value> +: Value to replace. + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +[<expiration>] +: Define how long to keep the value, in seconds. `0` means as long as possible. +\--- +default: 0 +\--- + +### EXAMPLES + + # Replace cache. + $ wp cache replace my_key new_value my_group + Success: Replaced object 'my_key' in group 'my_group'. + + + diff --git a/commands/cache/set/index.md b/commands/cache/set/index.md index 28c99103..45778f34 100644 --- a/commands/cache/set/index.md +++ b/commands/cache/set/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/set/ ---- \ No newline at end of file +layout: default +title: 'wp cache set' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » set + +`wp cache set` - Set a value to the object cache, regardless of whether it already exists. + +Quick links: Github issues + +
    + +Errors if the value can't be set. + +### OPTIONS + +<key> +: Cache key. + +<value> +: Value to set on the key. + +[<group>] +: Method for grouping data within the cache which allows the same key to be used across groups. +\--- +default: default +\--- + +[<expiration>] +: Define how long to keep the value, in seconds. `0` means as long as possible. +\--- +default: 0 +\--- + +### EXAMPLES + + # Set cache. + $ wp cache set my_key my_value my_group 300 + Success: Set object 'my_key' in group 'my_group'. + + + diff --git a/commands/cache/type/index.md b/commands/cache/type/index.md index 0ed8cc83..3cec8c1d 100644 --- a/commands/cache/type/index.md +++ b/commands/cache/type/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/type/ ---- \ No newline at end of file +layout: default +title: 'wp cache type' +display_global_parameters: true +--- + +[Commands](/commands/) » [cache](/commands/cache/) » type + +`wp cache type` - Attempts to determine which object cache is being used. + +Quick links: Github issues + +
    + +Note that the guesses made by this function are based on the +WP_Object_Cache classes that define the 3rd party object cache extension. +Changes to those classes could render problems with this function's +ability to determine which object cache is being used. + +### EXAMPLES + + # Check cache type. + $ wp cache type + Default + + + diff --git a/commands/cap/add/index.md b/commands/cap/add/index.md index 9ec05e62..886ec996 100644 --- a/commands/cap/add/index.md +++ b/commands/cap/add/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/add/ ---- \ No newline at end of file +layout: default +title: 'wp cap add' +display_global_parameters: true +--- + +[Commands](/commands/) » [cap](/commands/cap/) » add + +`wp cap add` - Add capabilities to a given role. + +Quick links: Github issues + +
    + +### OPTIONS + +<role> +: Key for the role. + +<cap>... +: One or more capabilities to add. + +### EXAMPLES + + # Add 'spectate' capability to 'author' role. + $ wp cap add author spectate + Success: Added 1 capability to 'author' role. + + + diff --git a/commands/cap/index.md b/commands/cap/index.md index 9a3cd08f..08f3e7bd 100644 --- a/commands/cap/index.md +++ b/commands/cap/index.md @@ -1,4 +1,54 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/ ---- \ No newline at end of file +layout: default +title: 'wp cap' +display_global_parameters: true +--- + +[Commands](/commands/) » cap + +`wp cap` - Manage user capabilities. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Add 'spectate' capability to 'author' role. + $ wp cap add 'author' 'spectate' + Success: Added 1 capability to 'author' role. + + # Add all caps from 'editor' role to 'author' role. + $ wp cap list 'editor' | xargs wp cap add 'author' + Success: Added 24 capabilities to 'author' role. + + # Remove all caps from 'editor' role that also appear in 'author' role. + $ wp cap list 'author' | xargs wp cap remove 'editor' + Success: Removed 34 capabilities from 'editor' role. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd capabilities to a given role.
    listList capabilities for a given role.
    removeRemove capabilities from a given role.
    diff --git a/commands/cap/list/index.md b/commands/cap/list/index.md index cadf22f5..a3249375 100644 --- a/commands/cap/list/index.md +++ b/commands/cap/list/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/list/ ---- \ No newline at end of file +layout: default +title: 'wp cap list' +display_global_parameters: true +--- + +[Commands](/commands/) » [cap](/commands/cap/) » list + +`wp cap list` - List capabilities for a given role. + +Quick links: Github issues + +
    + +### OPTIONS + +<role> +: Key for the role. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: list +options: + - list + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + # Display alphabetical list of Contributor capabilities. + $ wp cap list 'contributor' | sort + delete_posts + edit_posts + level_0 + level_1 + read + + + diff --git a/commands/cap/remove/index.md b/commands/cap/remove/index.md index a88a4f31..c076c861 100644 --- a/commands/cap/remove/index.md +++ b/commands/cap/remove/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/remove/ ---- \ No newline at end of file +layout: default +title: 'wp cap remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [cap](/commands/cap/) » remove + +`wp cap remove` - Remove capabilities from a given role. + +Quick links: Github issues + +
    + +### OPTIONS + +<role> +: Key for the role. + +<cap>... +: One or more capabilities to remove. + +### EXAMPLES + + # Remove 'spectate' capability from 'author' role. + $ wp cap remove author spectate + Success: Removed 1 capability from 'author' role. + + + diff --git a/commands/cli/alias/index.md b/commands/cli/alias/index.md index 9a2df749..09bec99e 100644 --- a/commands/cli/alias/index.md +++ b/commands/cli/alias/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/alias/ ---- \ No newline at end of file +layout: default +title: 'wp cli alias' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » alias + +`wp cli alias` - List available WP-CLI aliases. + +Quick links: Github issues + +
    + +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 visibility in what +registered aliases you have available. + +### OPTIONS + +[\--format=<format>] +: Render output in a particular format. +\--- +default: yaml +options: + - yaml + - json +\--- + +### EXAMPLES + + # List all available aliases. + $ wp cli alias + --- + @all: Run command against every registered alias. + @prod: + ssh: runcommand@runcommand.io~/webapps/production + @dev: + ssh: vagrant@192.168.50.10/srv/www/runcommand.dev + @both: + - @prod + - @dev + + + diff --git a/commands/cli/check-update/index.md b/commands/cli/check-update/index.md index 6e7af947..338e7721 100644 --- a/commands/cli/check-update/index.md +++ b/commands/cli/check-update/index.md @@ -1,4 +1,62 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/check-update/ ---- \ No newline at end of file +layout: default +title: 'wp cli check-update' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » check-update + +`wp cli check-update` - Check to see if there is a newer version of WP-CLI available. + +Quick links: Github issues + +
    + +Queries the Github releases API. Returns available versions if there are +updates available, or success message if using the latest release. + +### OPTIONS + +[\--patch] +: Only list patch updates. + +[\--minor] +: Only list minor updates. + +[\--major] +: Only list major updates. + +[\--field=<field>] +: Prints the value of a single field for each update. + +[\--fields=<fields>] +: Limit the output to specific object fields. Defaults to version,update_type,package_url. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + # Check for update. + $ wp cli check-update + Success: WP-CLI is at the latest version. + + # Check for update and new version is available. + $ wp cli check-update + +---------+-------------+-------------------------------------------------------------------------------+ + | version | update_type | package_url | + +---------+-------------+-------------------------------------------------------------------------------+ + | 0.24.1 | patch | https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar | + +---------+-------------+-------------------------------------------------------------------------------+ + + + diff --git a/commands/cli/cmd-dump/index.md b/commands/cli/cmd-dump/index.md index 0b6dcf46..66492521 100644 --- a/commands/cli/cmd-dump/index.md +++ b/commands/cli/cmd-dump/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/cmd-dump/ ---- \ No newline at end of file +layout: default +title: 'wp cli cmd-dump' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » cmd-dump + +`wp cli cmd-dump` - Dump the list of installed commands, as JSON. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Dump the list of installed commands. + $ wp cli cmd-dump + {"name":"wp","description":"Manage WordPress through the command-line.","longdesc":"\n\n + diff --git a/commands/cli/completions/index.md b/commands/cli/completions/index.md index aaf88f6e..cb2599e0 100644 --- a/commands/cli/completions/index.md +++ b/commands/cli/completions/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/completions/ ---- \ No newline at end of file +layout: default +title: 'wp cli completions' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » completions + +`wp cli completions` - Generate tab completion strings. + +Quick links: Github issues + +
    + +### OPTIONS + +\--line=<line> +: The current command line to be executed. + +\--point=<point> +: The index to the current cursor position relative to the beginning of the command. + +### EXAMPLES + + # Generate tab completion strings. + $ wp cli completions --line='wp eva' --point=100 + eval + eval-file + + + diff --git a/commands/cli/index.md b/commands/cli/index.md index 030254ae..7dec2e0c 100644 --- a/commands/cli/index.md +++ b/commands/cli/index.md @@ -1,4 +1,77 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/ ---- \ No newline at end of file +layout: default +title: 'wp cli' +display_global_parameters: true +--- + +[Commands](/commands/) » cli + +`wp cli` - Manage WP-CLI itself. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Display the version currently installed. + $ wp cli version + WP-CLI 0.24.1 + + # Check for updates to WP-CLI. + $ wp cli check-update + Success: WP-CLI is at the latest version. + + # Update WP-CLI to the latest stable release. + $ wp cli update + You have version 0.24.0. Would you like to update to 0.24.1? [y/n] y + Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar... + New version works. Proceeding to replace. + Success: Updated WP-CLI to 0.24.1. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    aliasList available WP-CLI aliases.
    check-updateCheck to see if there is a newer version of WP-CLI available.
    cmd-dumpDump the list of installed commands, as JSON.
    completionsGenerate tab completion strings.
    infoPrint various details about the WP-CLI environment.
    param-dumpDump the list of global parameters, as JSON or in var_export format.
    updateUpdate WP-CLI to the latest release.
    versionPrint WP-CLI version.
    diff --git a/commands/cli/info/index.md b/commands/cli/info/index.md index 1aea9db2..85f7bbd3 100644 --- a/commands/cli/info/index.md +++ b/commands/cli/info/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/info/ ---- \ No newline at end of file +layout: default +title: 'wp cli info' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » info + +`wp cli info` - Print various details about the WP-CLI environment. + +Quick links: Github issues + +
    + +Helpful for diagnostic purposes, this command shares: + +* PHP binary used. +* PHP binary version. +* php.ini configuration file used (which is typically different than web). +* WP-CLI root dir: where WP-CLI is installed (if non-Phar install). +* WP-CLI global config: where the global config YAML file is located. +* 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. + +### OPTIONS + +[\--format=<format>] +: Render output in a particular format. +\--- +default: list +options: + - list + - json +\--- + +### EXAMPLES + + # Display various data about the CLI environment. + $ wp cli info + PHP binary: /usr/bin/php5 + PHP version: 5.5.9-1ubuntu4.16 + php.ini used: /etc/php5/cli/php.ini + WP-CLI root dir: phar://wp-cli.phar + WP-CLI packages dir: /home/person/.wp-cli/packages/ + WP-CLI global config: + WP-CLI project config: + WP-CLI version: 0.24.1 + + + diff --git a/commands/cli/param-dump/index.md b/commands/cli/param-dump/index.md index ceb354b3..dd71c077 100644 --- a/commands/cli/param-dump/index.md +++ b/commands/cli/param-dump/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/param-dump/ ---- \ No newline at end of file +layout: default +title: 'wp cli param-dump' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » param-dump + +`wp cli param-dump` - Dump the list of global parameters, as JSON or in var_export format. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--with-values] +: Display current values also. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: json +options: + - var_export + - json +\--- + +### EXAMPLES + + # Dump the list of global parameters. + $ wp cli param-dump --format=var_export + array ( + 'path' => + array ( + 'runtime' => '=<path>', + 'file' => '<path>', + 'synopsis' => '', + 'default' => NULL, + 'multiple' => false, + 'desc' => 'Path to the WordPress files.', + ), + 'url' => + array ( + + + diff --git a/commands/cli/update/index.md b/commands/cli/update/index.md index f1f62e51..01404897 100644 --- a/commands/cli/update/index.md +++ b/commands/cli/update/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/update/ ---- \ No newline at end of file +layout: default +title: 'wp cli update' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » update + +`wp cli update` - Update WP-CLI to the latest release. + +Quick links: Github issues + +
    + +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. + +Use `--nightly` to install the latest built version of the master branch. +While not recommended for production, nightly contains the latest and +greatest, and should be stable enough for development and staging +environments. + +Only works for the Phar installation mechanism. + +### OPTIONS + +[\--patch] +: Only perform patch updates. + +[\--minor] +: Only perform minor updates. + +[\--major] +: Only perform major updates. + +[\--stable] +: Update to the latest stable release. Skips update check. + +[\--nightly] +: Update to the latest built version of the master branch. Potentially unstable. + +[\--yes] +: Do not prompt for confirmation. + +### EXAMPLES + + # Update CLI. + $ wp cli update + You have version 0.24.0. Would you like to update to 0.24.1? [y/n] y + Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar... + New version works. Proceeding to replace. + Success: Updated WP-CLI to 0.24.1. + + + diff --git a/commands/cli/version/index.md b/commands/cli/version/index.md index e639b203..e2182e14 100644 --- a/commands/cli/version/index.md +++ b/commands/cli/version/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/version/ ---- \ No newline at end of file +layout: default +title: 'wp cli version' +display_global_parameters: true +--- + +[Commands](/commands/) » [cli](/commands/cli/) » version + +`wp cli version` - Print WP-CLI version. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Display CLI version. + $ wp cli version + WP-CLI 0.24.1 + + + diff --git a/commands/comment/approve/index.md b/commands/comment/approve/index.md index ff2d7673..879ae2a7 100644 --- a/commands/comment/approve/index.md +++ b/commands/comment/approve/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/approve/ ---- \ No newline at end of file +layout: default +title: 'wp comment approve' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » approve + +`wp comment approve` - Approve a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to approve. + +### EXAMPLES + + # Approve comment. + $ wp comment approve 1337 + Success: Approved comment 1337. + + + diff --git a/commands/comment/count/index.md b/commands/comment/count/index.md index 9a7e66f5..600431c2 100644 --- a/commands/comment/count/index.md +++ b/commands/comment/count/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/count/ ---- \ No newline at end of file +layout: default +title: 'wp comment count' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » count + +`wp comment count` - Count comments, on whole blog or on a given post. + +Quick links: Github issues + +
    + +### OPTIONS + +[<post-id>] +: The ID of the post to count comments in. + +### EXAMPLES + + # Count comments on whole blog. + $ wp comment count + approved: 33 + spam: 3 + trash: 1 + post-trashed: 0 + all: 34 + moderated: 1 + total_comments: 37 + + # Count comments in a post. + $ wp comment count 42 + approved: 19 + spam: 0 + trash: 0 + post-trashed: 0 + all: 19 + moderated: 0 + total_comments: 19 + + + diff --git a/commands/comment/create/index.md b/commands/comment/create/index.md index ca315bf5..a669bdb2 100644 --- a/commands/comment/create/index.md +++ b/commands/comment/create/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/create/ ---- \ No newline at end of file +layout: default +title: 'wp comment create' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » create + +`wp comment create` - Create a new comment. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: Associative args for the new comment. See wp_insert_comment(). + +[\--porcelain] +: Output just the new comment id. + +### EXAMPLES + + # Create comment. + $ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli" + Success: Created comment 932. + + + diff --git a/commands/comment/delete/index.md b/commands/comment/delete/index.md index 9a5c9c4f..e44e2362 100644 --- a/commands/comment/delete/index.md +++ b/commands/comment/delete/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/delete/ ---- \ No newline at end of file +layout: default +title: 'wp comment delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » delete + +`wp comment delete` - Delete a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of comments to delete. + +[\--force] +: Skip the trash bin. + +### EXAMPLES + + # Delete comment. + $ wp comment delete 1337 --force + Success: Deleted comment 1337. + + # Delete multiple comments. + $ wp comment delete 1337 2341 --force + Success: Deleted comment 1337. + Success: Deleted comment 2341. + + + diff --git a/commands/comment/exists/index.md b/commands/comment/exists/index.md index 94f93bb4..01b31ac0 100644 --- a/commands/comment/exists/index.md +++ b/commands/comment/exists/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/exists/ ---- \ No newline at end of file +layout: default +title: 'wp comment exists' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » exists + +`wp comment exists` - Verify whether a comment exists. + +Quick links: Github issues + +
    + +Displays a success message if the comment does exist. + +### OPTIONS + +<id> +: The ID of the comment to check. + +### EXAMPLES + + # Check whether comment exists. + $ wp comment exists 1337 + Success: Comment with ID 1337 exists. + + + diff --git a/commands/comment/generate/index.md b/commands/comment/generate/index.md index 39debe61..90a6018b 100644 --- a/commands/comment/generate/index.md +++ b/commands/comment/generate/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/generate/ ---- \ No newline at end of file +layout: default +title: 'wp comment generate' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » generate + +`wp comment generate` - Generate some number of new dummy comments. + +Quick links: Github issues + +
    + +Creates a specified number of new comments with dummy data. + +### OPTIONS + +[\--count=<number>] +: How many comments to generate? +\--- +default: 100 +\--- + +[\--post_id=<post-id>] +: Assign comments to a specific post. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: progress +options: + - progress + - ids +\--- + +### EXAMPLES + + # Generate comments for the given post. + $ wp comment generate --format=ids --count=3 --post_id=123 + 138 139 140 + + # Add meta to every generated comment. + $ wp comment generate --format=ids --count=3 | xargs -d ' ' -I % wp comment meta add % foo bar + Success: Added custom field. + Success: Added custom field. + Success: Added custom field. + + + diff --git a/commands/comment/get/index.md b/commands/comment/get/index.md index 63ca9405..cfa28bd0 100644 --- a/commands/comment/get/index.md +++ b/commands/comment/get/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/get/ ---- \ No newline at end of file +layout: default +title: 'wp comment get' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » get + +`wp comment get` - Get data of a single comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The comment to get. + +[\--field=<field>] +: Instead of returning the whole comment, 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 comment. + $ wp comment get 21 --field=content + Thanks for all the comments, everyone! + + + diff --git a/commands/comment/index.md b/commands/comment/index.md index c1b96fc4..97695ee7 100644 --- a/commands/comment/index.md +++ b/commands/comment/index.md @@ -1,4 +1,115 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/ ---- \ No newline at end of file +layout: default +title: 'wp comment' +display_global_parameters: true +--- + +[Commands](/commands/) » comment + +`wp comment` - Manage comments. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create a new comment. + $ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli" + Success: Created comment 932. + + # Update an existing comment. + $ wp comment update 123 --comment_author='That Guy' + Success: Updated comment 123. + + # Delete an existing comment. + $ wp comment delete 1337 --force + Success: Deleted comment 1337. + + # Delete all spam comments. + $ wp comment delete $(wp comment list --status=spam --format=ids) + Success: Deleted comment 264. + Success: Deleted comment 262. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    approveApprove a comment.
    countCount comments, on whole blog or on a given post.
    createCreate a new comment.
    deleteDelete a comment.
    existsVerify whether a comment exists.
    generateGenerate some number of new dummy comments.
    getGet data of a single comment.
    listGet a list of comments.
    metaManage comment custom fields.
    recountRecalculate the comment_count value for one or more posts.
    spamMark a comment as spam.
    statusGet status of a comment.
    trashTrash a comment.
    unapproveUnapprove a comment.
    unspamUnmark a comment as spam.
    untrashUntrash a comment.
    updateUpdate one or more comments.
    diff --git a/commands/comment/list/index.md b/commands/comment/list/index.md index 316c0dcf..e8aa1cb4 100644 --- a/commands/comment/list/index.md +++ b/commands/comment/list/index.md @@ -1,4 +1,90 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/list/ ---- \ No newline at end of file +layout: default +title: 'wp comment list' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » list + +`wp comment list` - Get a list of comments. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: One or more args to pass to WP_Comment_Query. + +[\--field=<field>] +: Prints the value of a single field for each comment. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - ids + - csv + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each comment: + +* comment_ID +* comment_post_ID +* comment_date +* comment_approved +* comment_author +* comment_author_email + +These fields are optionally available: + +* comment_author_url +* comment_author_IP +* comment_date_gmt +* comment_content +* comment_karma +* comment_agent +* comment_type +* comment_parent +* user_id +* url + +### EXAMPLES + + # List comment IDs. + $ wp comment list --field=ID + 22 + 23 + 24 + + # List comments of a post. + $ wp comment list --post_id=1 --fields=ID,comment_date,comment_author + +------------+---------------------+----------------+ + | comment_ID | comment_date | comment_author | + +------------+---------------------+----------------+ + | 1 | 2015-06-20 09:00:10 | Mr WordPress | + +------------+---------------------+----------------+ + + # List approved comments. + $ wp comment list --number=3 --status=approve --fields=ID,comment_date,comment_author + +------------+---------------------+----------------+ + | comment_ID | comment_date | comment_author | + +------------+---------------------+----------------+ + | 1 | 2015-06-20 09:00:10 | Mr WordPress | + | 30 | 2013-03-14 12:35:07 | John Doe | + | 29 | 2013-03-14 11:56:08 | Jane Doe | + +------------+---------------------+----------------+ + + + diff --git a/commands/comment/meta/add/index.md b/commands/comment/meta/add/index.md index edb127d4..0bc10b58 100644 --- a/commands/comment/meta/add/index.md +++ b/commands/comment/meta/add/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta add' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » [meta](/commands/comment/meta/) » add + +`wp comment meta add` - Add a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/comment/meta/delete/index.md b/commands/comment/meta/delete/index.md index 0f699649..afea2b7b 100644 --- a/commands/comment/meta/delete/index.md +++ b/commands/comment/meta/delete/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » [meta](/commands/comment/meta/) » delete + +`wp comment meta delete` - Delete a meta field. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +[<key>] +: The name of the meta field to delete. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + +[\--all] +: Delete all meta for the object. + + + diff --git a/commands/comment/meta/get/index.md b/commands/comment/meta/get/index.md index 6458617e..f8955400 100644 --- a/commands/comment/meta/get/index.md +++ b/commands/comment/meta/get/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta get' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » [meta](/commands/comment/meta/) » get + +`wp comment meta get` - Get meta field value. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<key> +: The name of the meta field to get. + +[\--format=<format>] +: Accepted values: table, json. Default: table + + + diff --git a/commands/comment/meta/index.md b/commands/comment/meta/index.md index b5c7ea6b..345cc2a1 100644 --- a/commands/comment/meta/index.md +++ b/commands/comment/meta/index.md @@ -1,4 +1,68 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » meta + +`wp comment meta` - Manage comment custom fields. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set comment meta + $ wp comment meta set 123 description "Mary is a WordPress developer." + Success: Updated custom field 'description'. + + # Get comment meta + $ wp comment meta get 123 description + Mary is a WordPress developer. + + # Update comment meta + $ wp comment meta update 123 description "Mary is an awesome WordPress developer." + Success: Updated custom field 'description'. + + # Delete comment meta + $ wp comment meta delete 123 description + Success: Deleted custom field. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a meta field.
    deleteDelete a meta field.
    getGet meta field value.
    listList all metadata associated with an object.
    updateUpdate a meta field.
    diff --git a/commands/comment/meta/list/index.md b/commands/comment/meta/list/index.md index f9a62856..4a8b0e2c 100644 --- a/commands/comment/meta/list/index.md +++ b/commands/comment/meta/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta list' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » [meta](/commands/comment/meta/) » list + +`wp comment meta list` - List all metadata associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +[\--keys=<keys>] +: Limit output to metadata of specific keys. + +[\--fields=<fields>] +: Limit the output to specific row fields. Defaults to id,meta_key,meta_value. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + + + diff --git a/commands/comment/meta/update/index.md b/commands/comment/meta/update/index.md index e6748ec3..4767e07c 100644 --- a/commands/comment/meta/update/index.md +++ b/commands/comment/meta/update/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta update' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » [meta](/commands/comment/meta/) » update + +`wp comment meta update` - Update a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/comment/recount/index.md b/commands/comment/recount/index.md index f1395902..a46df792 100644 --- a/commands/comment/recount/index.md +++ b/commands/comment/recount/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/recount/ ---- \ No newline at end of file +layout: default +title: 'wp comment recount' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » recount + +`wp comment recount` - Recalculate the comment_count value for one or more posts. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: IDs for one or more posts to update. + +### EXAMPLES + + # Recount comment for the post. + $ wp comment recount 123 + Updated post 123 comment count to 67. + + + diff --git a/commands/comment/spam/index.md b/commands/comment/spam/index.md index a0c34585..18e26880 100644 --- a/commands/comment/spam/index.md +++ b/commands/comment/spam/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/spam/ ---- \ No newline at end of file +layout: default +title: 'wp comment spam' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » spam + +`wp comment spam` - Mark a comment as spam. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to mark as spam. + +### EXAMPLES + + # Spam comment. + $ wp comment spam 1337 + Success: Marked as spam comment 1337. + + + diff --git a/commands/comment/status/index.md b/commands/comment/status/index.md index 9f1c5e3f..8273029a 100644 --- a/commands/comment/status/index.md +++ b/commands/comment/status/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/status/ ---- \ No newline at end of file +layout: default +title: 'wp comment status' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » status + +`wp comment status` - Get status of a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the comment to check. + +### EXAMPLES + + # Get status of comment. + $ wp comment status 1337 + approved + + + diff --git a/commands/comment/trash/index.md b/commands/comment/trash/index.md index d6489354..ef6a1cfb 100644 --- a/commands/comment/trash/index.md +++ b/commands/comment/trash/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/trash/ ---- \ No newline at end of file +layout: default +title: 'wp comment trash' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » trash + +`wp comment trash` - Trash a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to trash. + +### EXAMPLES + + # Trash comment. + $ wp comment trash 1337 + Success: Trashed comment 1337. + + + diff --git a/commands/comment/unapprove/index.md b/commands/comment/unapprove/index.md index 5006dfb3..552b8481 100644 --- a/commands/comment/unapprove/index.md +++ b/commands/comment/unapprove/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/unapprove/ ---- \ No newline at end of file +layout: default +title: 'wp comment unapprove' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » unapprove + +`wp comment unapprove` - Unapprove a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to unapprove. + +### EXAMPLES + + # Unapprove comment. + $ wp comment unapprove 1337 + Success: Unapproved comment 1337. + + + diff --git a/commands/comment/unspam/index.md b/commands/comment/unspam/index.md index 115f0194..4896ef0d 100644 --- a/commands/comment/unspam/index.md +++ b/commands/comment/unspam/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/unspam/ ---- \ No newline at end of file +layout: default +title: 'wp comment unspam' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » unspam + +`wp comment unspam` - Unmark a comment as spam. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to unmark as spam. + +### EXAMPLES + + # Unspam comment. + $ wp comment unspam 1337 + Success: Unspammed comment 1337. + + + diff --git a/commands/comment/untrash/index.md b/commands/comment/untrash/index.md index 623aec36..b93e2fd6 100644 --- a/commands/comment/untrash/index.md +++ b/commands/comment/untrash/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/untrash/ ---- \ No newline at end of file +layout: default +title: 'wp comment untrash' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » untrash + +`wp comment untrash` - Untrash a comment. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: The IDs of the comments to untrash. + +### EXAMPLES + + # Untrash comment. + $ wp comment untrash 1337 + Success: Untrashed comment 1337. + + + diff --git a/commands/comment/update/index.md b/commands/comment/update/index.md index 735eefde..97a191ab 100644 --- a/commands/comment/update/index.md +++ b/commands/comment/update/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/update/ ---- \ No newline at end of file +layout: default +title: 'wp comment update' +display_global_parameters: true +--- + +[Commands](/commands/) » [comment](/commands/comment/) » update + +`wp comment update` - Update one or more comments. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of comments to update. + +\--<field>=<value> +: One or more fields to update. See wp_update_comment(). + +### EXAMPLES + + # Update comment. + $ wp comment update 123 --comment_author='That Guy' + Success: Updated comment 123. + + + diff --git a/commands/core/check-update/index.md b/commands/core/check-update/index.md index e140a369..90c1ebe5 100644 --- a/commands/core/check-update/index.md +++ b/commands/core/check-update/index.md @@ -1,4 +1,54 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/check-update/ ---- \ No newline at end of file +layout: default +title: 'wp core check-update' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » check-update + +`wp core check-update` - Check for WordPress updates via Version Check API. + +Quick links: Github issues + +
    + +Lists the most recent versions when there are updates available, +or success message when up to date. + +### OPTIONS + +[\--minor] +: Compare only the first two parts of the version number. + +[\--major] +: Compare only the first part of the version number. + +[\--field=<field>] +: Prints the value of a single field for each update. + +[\--fields=<fields>] +: Limit the output to specific object fields. Defaults to version,update_type,package_url. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - count + - json + - yaml +\--- + +### EXAMPLES + + $ wp core check-update + +---------+-------------+-------------------------------------------------------------+ + | version | update_type | package_url | + +---------+-------------+-------------------------------------------------------------+ + | 4.5.2 | major | https://downloads.wordpress.org/release/wordpress-4.5.2.zip | + +---------+-------------+-------------------------------------------------------------+ + + + diff --git a/commands/core/config/index.md b/commands/core/config/index.md index 8549546c..910214f9 100644 --- a/commands/core/config/index.md +++ b/commands/core/config/index.md @@ -1,4 +1,86 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/config/ ---- \ No newline at end of file +layout: default +title: 'wp core config' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » config + +`wp core config` - Generate a wp-config.php file. + +Quick links: Github issues + +
    + +Creates a new wp-config.php with database constants, and verifies that +the database constants are correct. + +### OPTIONS + +\--dbname=<dbname> +: Set the database name. + +\--dbuser=<dbuser> +: Set the database user. + +[\--dbpass=<dbpass>] +: Set the database user password. + +[\--dbhost=<dbhost>] +: Set the database host. +\--- +default: localhost +\--- + +[\--dbprefix=<dbprefix>] +: Set the database table prefix. +\--- +default: wp_ +\--- + +[\--dbcharset=<dbcharset>] +: Set the database charset. +\--- +default: utf8 +\--- + +[\--dbcollate=<dbcollate>] +: Set the database collation. +\--- +default: +\--- + +[\--locale=<locale>] +: Set the WPLANG constant. Defaults to $wp_local_package variable. + +[\--extra-php] +: If set, the command copies additional PHP code into wp-config.php from STDIN. + +[\--skip-salts] +: If set, keys and salts won't be generated, but should instead be passed via `--extra-php`. + +[\--skip-check] +: If set, the database connection is not checked. + +[\--force] +: Overwrites existing files, if present. + +### EXAMPLES + + # Standard wp-config.php file + $ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO + Success: Generated 'wp-config.php' file. + + # Enable WP_DEBUG and WP_DEBUG_LOG + $ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php <[Commands](/commands/) » [core](/commands/core/) » download + +`wp core download` - Download core WordPress files. + +Quick links: Github issues + +
    + +Downloads and extracts WordPress core files to the specified path. Uses +an archive file stored in cache if WordPress has been previously +downloaded. + +### OPTIONS + +[\--path=<path>] +: Specify the path in which to install WordPress. + +[\--locale=<locale>] +: Select which language you want to download. + +[\--version=<version>] +: Select which version you want to download. Accepts a version number, 'latest' or 'nightly' + +[\--force] +: Overwrites existing files, if present. + +### EXAMPLES + + $ wp core download --locale=nl_NL + Downloading WordPress 4.5.2 (nl_NL)... + md5 hash verified: c5366d05b521831dd0b29dfc386e56a5 + Success: WordPress downloaded. + + + diff --git a/commands/core/index.md b/commands/core/index.md index f66842ad..d19041a8 100644 --- a/commands/core/index.md +++ b/commands/core/index.md @@ -1,4 +1,92 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/ ---- \ No newline at end of file +layout: default +title: 'wp core' +display_global_parameters: true +--- + +[Commands](/commands/) » core + +`wp core` - Download, install, update and manage a WordPress install. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Download WordPress core + $ wp core download --locale=nl_NL + Downloading WordPress 4.5.2 (nl_NL)... + md5 hash verified: c5366d05b521831dd0b29dfc386e56a5 + Success: WordPress downloaded. + + # Install WordPress + $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com + Success: WordPress installed successfully. + + # Display the WordPress version + $ wp core version + 4.5.2 + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    check-updateCheck for WordPress updates via Version Check API.
    configGenerate a wp-config.php file.
    downloadDownload core WordPress files.
    installRuns the standard WordPress installation process.
    is-installedCheck if WordPress is installed.
    languageManage core language.
    multisite-convertTransform a single-site install into a WordPress multisite install.
    multisite-installInstall WordPress multisite from scratch.
    updateUpdate WordPress to a newer version.
    update-dbRun the WordPress database update procedure.
    verify-checksumsVerify WordPress files against WordPress.org's checksums.
    versionDisplay the WordPress version.
    diff --git a/commands/core/install-network/index.md b/commands/core/install-network/index.md index 8f496b90..14d8ec06 100644 --- a/commands/core/install-network/index.md +++ b/commands/core/install-network/index.md @@ -1,4 +1,5 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/install-network/ ---- \ No newline at end of file +layout: default +title: 'wp core install-network' +--- +The `wp core install-network` command has been renamed to [wp core multisite-convert](/commands/core/multisite-convert) in WP-CLI 0.11. diff --git a/commands/core/install/index.md b/commands/core/install/index.md index df7a3a4e..3545d0ca 100644 --- a/commands/core/install/index.md +++ b/commands/core/install/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/install/ ---- \ No newline at end of file +layout: default +title: 'wp core install' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » install + +`wp core install` - Runs the standard WordPress installation process. + +Quick links: Github issues + +
    + +Creates the WordPress tables in the database using the URL, title, and +default admin user details provided. Performs the famous 5 minute install +in seconds or less. + +Note: if you've installed WordPress in a subdirectory, then you'll need +to `wp option update siteurl` after `wp core install`. For instance, if +WordPress is installed in the `/wp` directory and your domain is wp.dev, +then you'll need to run `wp option update siteurl http://wp.dev/wp` for +your WordPress install to function properly. + +Note: When using custom user tables (e.g. `CUSTOM_USER_TABLE`), the admin +email and password are ignored if the user_login already exists. If the +user_login doesn't exist, a new user will be created. + +### OPTIONS + +\--url=<url> +: The address of the new site. + +\--title=<site-title> +: The title of the new site. + +\--admin_user=<username> +: The name of the admin user. + +[\--admin_password=<password>] +: The password for the admin user. Defaults to randomly generated string. + +\--admin_email=<email> +: The email address for the admin user. + +[\--skip-email] +: Don't send an email notification to the new admin user. + +### EXAMPLES + + # Install WordPress in 5 seconds + $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com + Success: WordPress installed successfully. + + # Install WordPress without disclosing admin_password to bash history + $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_email=info@example.com --prompt=admin_password < admin_password.txt + + + diff --git a/commands/core/is-installed/index.md b/commands/core/is-installed/index.md index 42222529..89bea87a 100644 --- a/commands/core/is-installed/index.md +++ b/commands/core/is-installed/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp core is-installed' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » is-installed + +`wp core is-installed` - Check if WordPress is installed. + +Quick links: Github issues + +
    + +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. + +[\--network] +: Check if this is a multisite install. + +### EXAMPLES + + # Check whether WordPress is installed; exit status 0 if installed, otherwise 1 + $ wp core is-installed + $ echo $? + 1 + + # Bash script for checking whether WordPress is installed or not + if ! $(wp core is-installed); then + wp core install + fi + + + diff --git a/commands/core/language/activate/index.md b/commands/core/language/activate/index.md index 381a62fc..fb35815a 100644 --- a/commands/core/language/activate/index.md +++ b/commands/core/language/activate/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/activate/ ---- \ No newline at end of file +layout: default +title: 'wp core language activate' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » [language](/commands/core/language/) » activate + +`wp core language activate` - Activate a given language. + +Quick links: Github issues + +
    + +<language> +: Language code to activate. + +### EXAMPLES + + $ wp core language activate ja + Success: Language activated. + + + diff --git a/commands/core/language/index.md b/commands/core/language/index.md index 49fd5b91..366a35c2 100644 --- a/commands/core/language/index.md +++ b/commands/core/language/index.md @@ -1,4 +1,72 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/ ---- \ No newline at end of file +layout: default +title: 'wp core language' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » language + +`wp core language` - Manage core language. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Install language + $ wp core language install nl_NL + Success: Language installed. + + # Activate language + $ wp core language activate nl_NL + Success: Language activated. + + # Uninstall language + $ wp core language uninstall nl_NL + Success: Language uninstalled. + + # List installed languages + $ wp core language list --status=installed + +----------+--------------+-------------+-----------+-----------+---------------------+ + | language | english_name | native_name | status | update | updated | + +----------+--------------+-------------+-----------+-----------+---------------------+ + | nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 | + +----------+--------------+-------------+-----------+-----------+---------------------+ + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    activateActivate a given language.
    installInstall a given language.
    listList all available languages.
    uninstallUninstall a given language.
    updateUpdate installed languages.
    diff --git a/commands/core/language/install/index.md b/commands/core/language/install/index.md index 351f9981..f5c590e0 100644 --- a/commands/core/language/install/index.md +++ b/commands/core/language/install/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/install/ ---- \ No newline at end of file +layout: default +title: 'wp core language install' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » [language](/commands/core/language/) » install + +`wp core language install` - Install a given language. + +Quick links: Github issues + +
    + +Downloads the language pack from WordPress.org. + +<language> +: Language code to install. + +[\--activate] +: If set, the language will be activated immediately after install. + +### EXAMPLES + + # Install the Japanese language. + $ wp core language install ja + Success: Language installed. + + + diff --git a/commands/core/language/list/index.md b/commands/core/language/list/index.md index fdcf14d7..7050b0db 100644 --- a/commands/core/language/list/index.md +++ b/commands/core/language/list/index.md @@ -1,4 +1,55 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/list/ ---- \ No newline at end of file +layout: default +title: 'wp core language list' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » [language](/commands/core/language/) » list + +`wp core language list` - List all available languages. + +Quick links: Github issues + +
    + +[\--field=<field>] +: Display the value of a single field + +[\--<field>=<value>] +: Filter results by key=value pairs. + +[\--fields=<fields>] +: Limit the output to specific fields. + +[\--format=<format>] +: Accepted values: table, csv, json. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each translation: + +* language +* english_name +* native_name +* status +* update +* updated + +These fields are optionally available: + +* version +* package + +### EXAMPLES + + # List language,english_name,status fields of available languages. + $ wp core language list --fields=language,english_name,status + +----------------+-------------------------+-------------+ + | language | english_name | status | + +----------------+-------------------------+-------------+ + | ar | Arabic | uninstalled | + | ary | Moroccan Arabic | uninstalled | + | az | Azerbaijani | uninstalled | + + + diff --git a/commands/core/language/uninstall/index.md b/commands/core/language/uninstall/index.md index 3f3af547..c44f0e59 100644 --- a/commands/core/language/uninstall/index.md +++ b/commands/core/language/uninstall/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/uninstall/ ---- \ No newline at end of file +layout: default +title: 'wp core language uninstall' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » [language](/commands/core/language/) » uninstall + +`wp core language uninstall` - Uninstall a given language. + +Quick links: Github issues + +
    + +<language> +: Language code to uninstall. + +### EXAMPLES + + $ wp core language uninstall ja + Success: Language uninstalled. + + + diff --git a/commands/core/language/update/index.md b/commands/core/language/update/index.md index c9b24b05..b3f559b7 100644 --- a/commands/core/language/update/index.md +++ b/commands/core/language/update/index.md @@ -1,4 +1,32 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/update/ ---- \ No newline at end of file +layout: default +title: 'wp core language update' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » [language](/commands/core/language/) » update + +`wp core language update` - Update installed languages. + +Quick links: Github issues + +
    + +Updates installed languages for core, plugins and themes. + +[\--dry-run] +: Preview which translations would be updated. + +### EXAMPLES + + $ wp core language update + Updating 'Japanese' translation for Akismet 3.1.11... + Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/ja.zip... + Translation updated successfully. + Updating 'Japanese' translation for Twenty Fifteen 1.5... + Downloading translation from https://downloads.wordpress.org/translation/theme/twentyfifteen/1.5/ja.zip... + Translation updated successfully. + Success: Updated 2/2 translations. + + + diff --git a/commands/core/multisite-convert/index.md b/commands/core/multisite-convert/index.md index ae58e516..aa5a7f14 100644 --- a/commands/core/multisite-convert/index.md +++ b/commands/core/multisite-convert/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/multisite-convert/ ---- \ No newline at end of file +layout: default +title: 'wp core multisite-convert' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » multisite-convert + +`wp core multisite-convert` - Transform a single-site install into a WordPress multisite install. + +Quick links: Github issues + +
    + +Creates the multisite database tables, and adds the multisite constants +to wp-config.php. + +For those using WordPress with Apache, remember to update the `.htaccess` +file with the appropriate multisite rewrite rules. + +### OPTIONS + +[\--title=<network-title>] +: The title of the new network. + +[\--base=<url-path>] +: Base path after the domain name that each site url will start with. +\--- +default: / +\--- + +[\--subdomains] +: If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'. + +### EXAMPLES + + $ wp core multisite-convert + Set up multisite database tables. + Added multisite constants to wp-config.php. + Success: Network installed. Don't forget to set up rewrite rules. + + + diff --git a/commands/core/multisite-install/index.md b/commands/core/multisite-install/index.md index 24524dd4..1a7de1c0 100644 --- a/commands/core/multisite-install/index.md +++ b/commands/core/multisite-install/index.md @@ -1,4 +1,62 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/multisite-install/ ---- \ No newline at end of file +layout: default +title: 'wp core multisite-install' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » multisite-install + +`wp core multisite-install` - Install WordPress multisite from scratch. + +Quick links: Github issues + +
    + +Creates the WordPress tables in the database using the URL, title, and +default admin user details provided. Then, creates the multisite tables +in the database and adds multisite constants to the wp-config.php. + +### OPTIONS + +[\--url=<url>] +: The address of the new site. + +[\--base=<url-path>] +: Base path after the domain name that each site url in the network will start with. +\--- +default: / +\--- + +[\--subdomains] +: If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'. + +\--title=<site-title> +: The title of the new site. + +\--admin_user=<username> +: The name of the admin user. +\--- +default: admin +\--- + +[\--admin_password=<password>] +: The password for the admin user. Defaults to randomly generated string. + +\--admin_email=<email> +: The email address for the admin user. + +[\--skip-email] +: Don't send an email notification to the new admin user. + +### EXAMPLES + + $ wp core multisite-install --title="Welcome to the WordPress" \ + > --admin_user="admin" --admin_password="password" \ + > --admin_email="user@example.com" + Single site database tables already present. + Set up multisite database tables. + Added multisite constants to wp-config.php. + Success: Network installed. Don't forget to set up rewrite rules. + + + diff --git a/commands/core/update-db/index.md b/commands/core/update-db/index.md index 3a1b2654..03ad4f71 100644 --- a/commands/core/update-db/index.md +++ b/commands/core/update-db/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/update-db/ ---- \ No newline at end of file +layout: default +title: 'wp core update-db' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » update-db + +`wp core update-db` - Run the WordPress database update procedure. + +Quick links: Github issues + +
    + +[\--network] +: Update databases for all sites on a network + +[\--dry-run] +: Compare database versions without performing the update. + +### EXAMPLES + + # 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 + $ 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 + + + diff --git a/commands/core/update/index.md b/commands/core/update/index.md index e3e875bb..32cae750 100644 --- a/commands/core/update/index.md +++ b/commands/core/update/index.md @@ -1,4 +1,69 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/update/ ---- \ No newline at end of file +layout: default +title: 'wp core update' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » update + +`wp core update` - Update WordPress to a newer version. + +Quick links: Github issues + +
    + +Defaults to updating WordPress to the latest version. + +If you see "Error: Another update is currently in progress.", you may +need to run `wp option delete core_updater.lock` after verifying another +update isn't actually running. + +### OPTIONS + +[<zip>] +: Path to zip file to use, instead of downloading from wordpress.org. + +[\--minor] +: Only perform updates for minor releases (e.g. update from WP 4.3 to 4.3.3 instead of 4.4.2). + +[\--version=<version>] +: Update to a specific version, instead of to the latest version. Alternatively accepts 'nightly'. + +[\--force] +: Update even when installed WP version is greater than the requested version. + +[\--locale=<locale>] +: Select which language you want to download. + +### EXAMPLES + + # Update WordPress + $ wp core update + Updating to version 4.5.2 (en_US)... + Downloading update from https://downloads.wordpress.org/release/wordpress-4.5.2-no-content.zip... + Unpacking the update... + Cleaning up files... + No files found that need cleaned 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 ()... + 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 + $ wp core update --version=3.1 --force + Updating to version 3.1 (en_US)... + Downloading update from https://wordpress.org/wordpress-3.1.zip... + Unpacking the update... + Warning: Failed to fetch checksums. Please cleanup files manually. + Success: WordPress updated successfully. + + + diff --git a/commands/core/verify-checksums/index.md b/commands/core/verify-checksums/index.md index f9cbb898..f75575ed 100644 --- a/commands/core/verify-checksums/index.md +++ b/commands/core/verify-checksums/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/verify-checksums/ ---- \ No newline at end of file +layout: default +title: 'wp core verify-checksums' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » verify-checksums + +`wp core verify-checksums` - Verify WordPress files against WordPress.org's checksums. + +Quick links: Github issues + +
    + +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. + +### OPTIONS + +[\--version=<version>] +: Verify checksums against a specific version of WordPress. + +[\--locale=<locale>] +: Verify checksums against a specific locale of WordPress. + +### EXAMPLES + + # Verify checksums + $ wp core verify-checksums + Success: WordPress install verifies against checksums. + + # Verify checksums for given WordPress version + $ wp core verify-checksums --version=4.0 + Success: WordPress install verifies against checksums. + + # Verify checksums for given locale + $ wp core verify-checksums --locale=en_US + Success: WordPress install verifies against checksums. + + # Verify checksums for given locale + $ wp core verify-checksums --locale=ja + Warning: File doesn't verify against checksum: wp-includes/version.php + Warning: File doesn't verify against checksum: readme.html + Warning: File doesn't verify against checksum: wp-config-sample.php + Error: WordPress install doesn't verify against checksums. + + + diff --git a/commands/core/version/index.md b/commands/core/version/index.md index f872eb73..06020740 100644 --- a/commands/core/version/index.md +++ b/commands/core/version/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/version/ ---- \ No newline at end of file +layout: default +title: 'wp core version' +display_global_parameters: true +--- + +[Commands](/commands/) » [core](/commands/core/) » version + +`wp core version` - Display the WordPress version. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--extra] +: Show extended version information. + +### EXAMPLES + + # Display the WordPress version + $ wp core version + 4.5.2 + + # Display WordPress version along with other information + $ wp core version --extra + WordPress version: 4.5.2 + Database revision: 36686 + TinyMCE version: 4.310 (4310-20160418) + Package language: en_US + + + diff --git a/commands/cron/event/delete/index.md b/commands/cron/event/delete/index.md index 4b18d472..b50b17d7 100644 --- a/commands/cron/event/delete/index.md +++ b/commands/cron/event/delete/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/delete/ ---- \ No newline at end of file +layout: default +title: 'wp cron event delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » [event](/commands/cron/event/) » delete + +`wp cron event delete` - Delete the next scheduled cron event for the given hook. + +Quick links: Github issues + +
    + +### OPTIONS + +<hook> +: The hook name. + +### EXAMPLES + + # Delete the next scheduled cron event + $ wp cron event delete cron_test + Success: Deleted 2 instances of the cron event 'cron_test'. + + + diff --git a/commands/cron/event/index.md b/commands/cron/event/index.md index 37737729..84722089 100644 --- a/commands/cron/event/index.md +++ b/commands/cron/event/index.md @@ -1,4 +1,64 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/ ---- \ No newline at end of file +layout: default +title: 'wp cron event' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » event + +`wp cron event` - Manage WP-Cron events. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Schedule a new cron event + $ wp cron event schedule cron_test + Success: Scheduled event with hook 'cron_test' for 2016-05-31 10:19:16 GMT. + + # Run all cron events due right now + $ wp cron event run --due-now + Success: Executed a total of 2 cron events. + + # Delete the next scheduled cron event + $ wp cron event delete cron_test + Success: Deleted 2 instances of the cron event 'cron_test'. + + # List scheduled cron events in JSON + $ wp cron event list --fields=hook,next_run --format=json + [{"hook":"wp_version_check","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_plugins","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_themes","next_run":"2016-05-31 10:15:14"}] + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    deleteDelete the next scheduled cron event for the given hook.
    listList scheduled cron events.
    runRun the next scheduled cron event for the given hook.
    scheduleSchedule a new cron event.
    diff --git a/commands/cron/event/list/index.md b/commands/cron/event/list/index.md index 1bc661af..aa4c7670 100644 --- a/commands/cron/event/list/index.md +++ b/commands/cron/event/list/index.md @@ -1,4 +1,72 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/list/ ---- \ No newline at end of file +layout: default +title: 'wp cron event list' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » [event](/commands/cron/event/) » list + +`wp cron event list` - List scheduled cron events. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--<field>=<value>] +: Filter by one or more fields. + +[\--field=<field>] +: Prints the value of a single field for each event. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - ids + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each cron event: +* hook +* next_run_gmt +* next_run_relative +* recurrence + +These fields are optionally available: +* time +* sig +* args +* schedule +* interval +* next_run + +### EXAMPLES + + # List scheduled cron events + $ wp cron event list + +-------------------+---------------------+---------------------+------------+ + | hook | next_run_gmt | next_run_relative | recurrence | + +-------------------+---------------------+---------------------+------------+ + | wp_version_check | 2016-05-31 22:15:13 | 11 hours 57 minutes | 12 hours | + | wp_update_plugins | 2016-05-31 22:15:13 | 11 hours 57 minutes | 12 hours | + | wp_update_themes | 2016-05-31 22:15:14 | 11 hours 57 minutes | 12 hours | + +-------------------+---------------------+---------------------+------------+ + + # List scheduled cron events in JSON + $ wp cron event list --fields=hook,next_run --format=json + [{"hook":"wp_version_check","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_plugins","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_themes","next_run":"2016-05-31 10:15:14"}] + + + diff --git a/commands/cron/event/run/index.md b/commands/cron/event/run/index.md index a5e53006..db612ee7 100644 --- a/commands/cron/event/run/index.md +++ b/commands/cron/event/run/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/run/ ---- \ No newline at end of file +layout: default +title: 'wp cron event run' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » [event](/commands/cron/event/) » run + +`wp cron event run` - Run the next scheduled cron event for the given hook. + +Quick links: Github issues + +
    + +### OPTIONS + +[<hook>...] +: One or more hooks to run. + +[\--due-now] +: Run all hooks due right now. + +[\--all] +: Run all hooks. + +### EXAMPLES + + # Run all cron events due right now + $ wp cron event run --due-now + Success: Executed a total of 2 cron events. + + + diff --git a/commands/cron/event/schedule/index.md b/commands/cron/event/schedule/index.md index f817198b..040f4e8a 100644 --- a/commands/cron/event/schedule/index.md +++ b/commands/cron/event/schedule/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/schedule/ ---- \ No newline at end of file +layout: default +title: 'wp cron event schedule' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » [event](/commands/cron/event/) » schedule + +`wp cron event schedule` - Schedule a new cron event. + +Quick links: Github issues + +
    + +### OPTIONS + +<hook> +: The hook name. + +[<next-run>] +: A Unix timestamp or an English textual datetime description compatible with `strtotime()`. Defaults to now. + +[<recurrence>] +: How often the event should recur. See `wp cron schedule list` for available schedule names. Defaults to no recurrence. + +[\--<field>=<value>] +: Associative args for the event. + +### EXAMPLES + + # Schedule a new cron event + $ wp cron event schedule cron_test + Success: Scheduled event with hook 'cron_test' for 2016-05-31 10:19:16 GMT. + + # Schedule new cron event with hourly recurrence + $ wp cron event schedule cron_test now hourly + Success: Scheduled event with hook 'cron_test' for 2016-05-31 10:20:32 GMT. + + # Schedule new cron event and pass associative arguments + $ wp cron event schedule cron_test '+1 hour' --foo=1 --bar=2 + Success: Scheduled event with hook 'cron_test' for 2016-05-31 11:21:35 GMT. + + + diff --git a/commands/cron/index.md b/commands/cron/index.md index ab003276..db7db4f5 100644 --- a/commands/cron/index.md +++ b/commands/cron/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/ ---- \ No newline at end of file +layout: default +title: 'wp cron' +display_global_parameters: true +--- + +[Commands](/commands/) » cron + +`wp cron` - Manage WP-Cron events and schedules. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Test WP Cron spawning system + $ wp cron test + Success: WP-Cron spawning is working as expected. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    eventManage WP-Cron events.
    scheduleManage WP-Cron schedules.
    testTest the WP Cron spawning system and report back its status.
    diff --git a/commands/cron/schedule/index.md b/commands/cron/schedule/index.md index 1d0728c2..0b1cf0dd 100644 --- a/commands/cron/schedule/index.md +++ b/commands/cron/schedule/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/schedule/ ---- \ No newline at end of file +layout: default +title: 'wp cron schedule' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » schedule + +`wp cron schedule` - Manage WP-Cron schedules. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List available cron schedules + $ wp cron schedule list + +------------+-------------+----------+ + | name | display | interval | + +------------+-------------+----------+ + | hourly | Once Hourly | 3600 | + | twicedaily | Twice Daily | 43200 | + | daily | Once Daily | 86400 | + +------------+-------------+----------+ + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
    NameDescription
    listList available cron schedules.
    diff --git a/commands/cron/schedule/list/index.md b/commands/cron/schedule/list/index.md index 88ba00e3..aa555fa9 100644 --- a/commands/cron/schedule/list/index.md +++ b/commands/cron/schedule/list/index.md @@ -1,4 +1,62 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/schedule/list/ ---- \ No newline at end of file +layout: default +title: 'wp cron schedule list' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » [schedule](/commands/cron/schedule/) » list + +`wp cron schedule list` - List available cron schedules. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--field=<field>] +: Prints the value of a single field for each schedule. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - ids + - json + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each cron schedule: + +* name +* display +* interval + +There are no additional fields. + +### EXAMPLES + + # List available cron schedules + $ wp cron schedule list + +------------+-------------+----------+ + | name | display | interval | + +------------+-------------+----------+ + | hourly | Once Hourly | 3600 | + | twicedaily | Twice Daily | 43200 | + | daily | Once Daily | 86400 | + +------------+-------------+----------+ + + # List id of available cron schedule + $ wp cron schedule list --fields=name --format=ids + hourly twicedaily daily + + + diff --git a/commands/cron/test/index.md b/commands/cron/test/index.md index d14bef75..cf9a552e 100644 --- a/commands/cron/test/index.md +++ b/commands/cron/test/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/test/ ---- \ No newline at end of file +layout: default +title: 'wp cron test' +display_global_parameters: true +--- + +[Commands](/commands/) » [cron](/commands/cron/) » test + +`wp cron test` - Test the WP Cron spawning system and report back its status. + +Quick links: Github issues + +
    + +This command tests the spawning system by performing the following steps: + +* Checks to see if the `DISABLE_WP_CRON` constant is set; errors if true +because WP-Cron is disabled. +* Checks to see if the `ALTERNATE_WP_CRON` constant is set; warns if true. +* Attempts to spawn WP-Cron over HTTP; warns if non 200 response code is +returned. + +### EXAMPLES + + # Cron test runs successfully. + $ wp cron test + Success: WP-Cron spawning is working as expected. + + + diff --git a/commands/db/check/index.md b/commands/db/check/index.md index 836e72bb..d8d320b8 100644 --- a/commands/db/check/index.md +++ b/commands/db/check/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/check/ ---- \ No newline at end of file +layout: default +title: 'wp db check' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » check + +`wp db check` - Check the current status of the database. + +Quick links: Github issues + +
    + +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. + +### EXAMPLES + + $ wp db check + Success: Database checked. + + + diff --git a/commands/db/cli/index.md b/commands/db/cli/index.md index 3e83634c..d9d0e69b 100644 --- a/commands/db/cli/index.md +++ b/commands/db/cli/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/cli/ ---- \ No newline at end of file +layout: default +title: 'wp db cli' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » cli + +`wp db cli` - Open a MySQL console using credentials from wp-config.php + +Quick links: Github issues + +
    + +### OPTIONS + +[\--database=<database>] +: Use a specific database. Defaults to DB_NAME. + +[\--default-character-set=<character-set>] +: Use a specific character set. Defaults to DB_CHARSET when defined. + +[\--<field>=<value>] +: Extra arguments to pass to the MySQL executable. + +### EXAMPLES + + # Open MySQL console + $ wp db cli + mysql> + + + diff --git a/commands/db/create/index.md b/commands/db/create/index.md index c502d99b..7c389423 100644 --- a/commands/db/create/index.md +++ b/commands/db/create/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/create/ ---- \ No newline at end of file +layout: default +title: 'wp db create' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » create + +`wp db create` - Create a new database. + +Quick links: Github issues + +
    + +Runs `CREATE_DATABASE` SQL statement using `DB_HOST`, `DB_NAME`, +`DB_USER` and `DB_PASSWORD` database credentials specified in +wp-config.php. + +### EXAMPLES + + $ wp db create + Success: Database created. + + + diff --git a/commands/db/drop/index.md b/commands/db/drop/index.md index 69957c56..26027c2f 100644 --- a/commands/db/drop/index.md +++ b/commands/db/drop/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/drop/ ---- \ No newline at end of file +layout: default +title: 'wp db drop' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » drop + +`wp db drop` - Delete the existing database. + +Quick links: Github issues + +
    + +Runs `DROP_DATABASE` SQL statement using `DB_HOST`, `DB_NAME`, +`DB_USER` and `DB_PASSWORD` database credentials specified in +wp-config.php. + +### OPTIONS + +[\--yes] +: Answer yes to the confirmation message. + +### EXAMPLES + + $ wp db drop --yes + Success: Database dropped. + + + diff --git a/commands/db/export/index.md b/commands/db/export/index.md index c05d048e..5badecc5 100644 --- a/commands/db/export/index.md +++ b/commands/db/export/index.md @@ -1,4 +1,51 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/export/ ---- \ No newline at end of file +layout: default +title: 'wp db export' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » export + +`wp db export` - Exports the database to a file or to STDOUT. + +Quick links: Github issues + +
    + +Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and +`DB_PASSWORD` database credentials specified in wp-config.php. + +### OPTIONS + +[<file>] +: The name of the SQL file to export. If '-', then outputs to STDOUT. If omitted, it will be '{dbname}.sql'. + +[\--<field>=<value>] +: Extra arguments to pass to mysqldump + +[\--tables=<tables>] +: The comma separated list of specific tables to export. Excluding this parameter will export all tables in the database. + +[\--porcelain] +: Output filename for the exported database. + +### EXAMPLES + + # Export database with drop query included + $ wp db export --add-drop-table + Success: Exported to 'wordpress_dbase.sql'. + + # Export certain tables + $ wp db export --tables=wp_options,wp_users + Success: Exported to 'wordpress_dbase.sql'. + + # Export all tables matching a wildcard + $ wp db export --tables=$(wp db tables 'wp_user*' --format=csv) + Success: Exported to 'wordpress_dbase.sql'. + + # Export all tables matching prefix + $ wp db export --tables=$(wp db tables --all-tables-with-prefix --format=csv) + Success: Exported to 'wordpress_dbase.sql'. + + + diff --git a/commands/db/import/index.md b/commands/db/import/index.md index 74b6bd5f..b73b741d 100644 --- a/commands/db/import/index.md +++ b/commands/db/import/index.md @@ -1,4 +1,32 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/import/ ---- \ No newline at end of file +layout: default +title: 'wp db import' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » import + +`wp db import` - Import a database from a file or from STDIN. + +Quick links: Github issues + +
    + +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 + +[<file>] +: The name of the SQL file to import. If '-', then reads from STDIN. If omitted, it will look for '{dbname}.sql'. + +### EXAMPLES + + # Import MySQL from a file. + $ wp db import wordpress_dbase.sql + Success: Imported from 'wordpress_dbase.sql'. + + + diff --git a/commands/db/index.md b/commands/db/index.md index 9eb8483c..bad105ff 100644 --- a/commands/db/index.md +++ b/commands/db/index.md @@ -1,4 +1,89 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/ ---- \ No newline at end of file +layout: default +title: 'wp db' +display_global_parameters: true +--- + +[Commands](/commands/) » db + +`wp db` - Perform basic database operations using credentials stored in wp-config.php + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create a new database. + $ wp db create + Success: Database created. + + # Drop an existing database. + $ wp db drop --yes + Success: Database dropped. + + # Reset the current database. + $ wp db reset --yes + Success: Database reset. + + # Execute a SQL query stored in a file. + $ wp db query < debug.sql + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    checkCheck the current status of the database.
    cliOpen a MySQL console using credentials from wp-config.php
    createCreate a new database.
    dropDelete the existing database.
    exportExports the database to a file or to STDOUT.
    importImport a database from a file or from STDIN.
    optimizeOptimize the database.
    queryExecute a SQL query against the database.
    repairRepair the database.
    resetRemove all tables from the database.
    tablesList the database tables.
    diff --git a/commands/db/optimize/index.md b/commands/db/optimize/index.md index 13c258c7..3dd82952 100644 --- a/commands/db/optimize/index.md +++ b/commands/db/optimize/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/optimize/ ---- \ No newline at end of file +layout: default +title: 'wp db optimize' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » optimize + +`wp db optimize` - Optimize the database. + +Quick links: Github issues + +
    + +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. + +### EXAMPLES + + $ wp db optimize + Success: Database optimized. + + + diff --git a/commands/db/query/index.md b/commands/db/query/index.md index 7cbfb232..0c07dea5 100644 --- a/commands/db/query/index.md +++ b/commands/db/query/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/query/ ---- \ No newline at end of file +layout: default +title: 'wp db query' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » query + +`wp db query` - Execute a SQL query against the database. + +Quick links: Github issues + +
    + +Executes an arbitrary SQL query using `DB_HOST`, `DB_NAME`, `DB_USER` + and `DB_PASSWORD` database credentials specified in wp-config.php. + +### OPTIONS + +[<sql>] +: A SQL query. If not passed, will try to read from STDIN. + +[\--<field>=<value>] +: Extra arguments to pass to mysql. + +### EXAMPLES + + # Execute a query stored in a file + $ wp db query < debug.sql + + # Check all tables in the database + $ wp db query "CHECK TABLE $(wp db tables | paste -s -d',');" + +---------------------------------------+-------+----------+----------+ + | Table | Op | Msg_type | Msg_text | + +---------------------------------------+-------+----------+----------+ + | wordpress_dbase.wp_users | check | status | OK | + | wordpress_dbase.wp_usermeta | check | status | OK | + | wordpress_dbase.wp_posts | check | status | OK | + | wordpress_dbase.wp_comments | check | status | OK | + | wordpress_dbase.wp_links | check | status | OK | + | wordpress_dbase.wp_options | check | status | OK | + | wordpress_dbase.wp_postmeta | check | status | OK | + | wordpress_dbase.wp_terms | check | status | OK | + | wordpress_dbase.wp_term_taxonomy | check | status | OK | + | wordpress_dbase.wp_term_relationships | check | status | OK | + | wordpress_dbase.wp_termmeta | check | status | OK | + | wordpress_dbase.wp_commentmeta | check | status | OK | + +---------------------------------------+-------+----------+----------+ + + # Pass extra arguments through to MySQL + $ wp db query 'SELECT * FROM wp_options WHERE option_name="home"' --skip-column-names + +---+------+------------------------------+-----+ + | 2 | home | http://wordpress-develop.dev | yes | + +---+------+------------------------------+-----+ + + + diff --git a/commands/db/repair/index.md b/commands/db/repair/index.md index 4bb09152..ddc86677 100644 --- a/commands/db/repair/index.md +++ b/commands/db/repair/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/repair/ ---- \ No newline at end of file +layout: default +title: 'wp db repair' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » repair + +`wp db repair` - Repair the database. + +Quick links: Github issues + +
    + +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. + +### EXAMPLES + + $ wp db repair + Success: Database repaired. + + + diff --git a/commands/db/reset/index.md b/commands/db/reset/index.md index ea4e3970..7c4d2399 100644 --- a/commands/db/reset/index.md +++ b/commands/db/reset/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/reset/ ---- \ No newline at end of file +layout: default +title: 'wp db reset' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » reset + +`wp db reset` - Remove all tables from the database. + +Quick links: Github issues + +
    + +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 + +[\--yes] +: Answer yes to the confirmation message. + +### EXAMPLES + + $ wp db reset --yes + Success: Database reset. + + + diff --git a/commands/db/tables/index.md b/commands/db/tables/index.md index d35d47d1..a41bbd0c 100644 --- a/commands/db/tables/index.md +++ b/commands/db/tables/index.md @@ -1,4 +1,62 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/tables/ ---- \ No newline at end of file +layout: default +title: 'wp db tables' +display_global_parameters: true +--- + +[Commands](/commands/) » [db](/commands/db/) » tables + +`wp db tables` - List the database tables. + +Quick links: Github issues + +
    + +Defaults to all tables registered to the $wpdb database handler. + +### OPTIONS + +[<table>...] +: List tables based on wildcard search, e.g. 'wp_*_options' or 'wp_post?'. + +[\--scope=<scope>] +: Can be all, global, ms_global, blog, or old tables. Defaults to all. + +[\--network] +: List all the tables in a multisite install. Overrides --scope=<scope>. + +[\--all-tables-with-prefix] +: List all tables that match the table prefix even if not registered on $wpdb. Overrides --network. + +[\--all-tables] +: List all tables in the database, regardless of the prefix, and even if not registered on $wpdb. Overrides --all-tables-with-prefix. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: list +options: + - list + - csv +\--- + +### EXAMPLES + + # List tables for a single site, without shared tables like 'wp_users' + $ wp db tables --scope=blog --url=sub.example.com + wp_3_posts + wp_3_comments + wp_3_options + wp_3_postmeta + wp_3_terms + wp_3_term_taxonomy + wp_3_term_relationships + wp_3_termmeta + wp_3_commentmeta + + # Export only tables for a single site + $ wp db export --tables=$(wp db tables --url=sub.example.com --format=csv) + Success: Exported to wordpress_dbase.sql + + + diff --git a/commands/eval-file/index.md b/commands/eval-file/index.md index 99da8219..dcd65a3e 100644 --- a/commands/eval-file/index.md +++ b/commands/eval-file/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/eval-file/ ---- \ No newline at end of file +layout: default +title: 'wp eval-file' +display_global_parameters: true +--- + +[Commands](/commands/) » eval-file + +`wp eval-file` - Load and execute a PHP file. + +Quick links: Github issues + +
    + +### OPTIONS + +<file> +: The path to the PHP file to execute. + +[<arg>...] +: One or more arguments to pass to the file. They are placed in the $args variable. + +[\--skip-wordpress] +: Load and execute file without loading WordPress. + + + diff --git a/commands/eval/index.md b/commands/eval/index.md index 133cbdfa..7511ec0e 100644 --- a/commands/eval/index.md +++ b/commands/eval/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/eval/ ---- \ No newline at end of file +layout: default +title: 'wp eval' +display_global_parameters: true +--- + +[Commands](/commands/) » eval + +`wp eval` - Execute arbitrary PHP code. + +Quick links: Github issues + +
    + +### OPTIONS + +<php-code> +: The code to execute, as a string. + +[\--skip-wordpress] +: Execute code without loading WordPress. + +### EXAMPLES + + # Display WordPress content directory. + $ wp eval 'echo WP_CONTENT_DIR;' + /var/www/wordpress/wp-content + + # Generate a random number. + $ wp eval 'echo rand();' --skip-wordpress + 479620423 + + + diff --git a/commands/export/index.md b/commands/export/index.md index 03d5c2bf..74ad5aa4 100644 --- a/commands/export/index.md +++ b/commands/export/index.md @@ -1,4 +1,92 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/export/ ---- \ No newline at end of file +layout: default +title: 'wp export' +display_global_parameters: true +--- + +[Commands](/commands/) » export + +`wp export` - Export WordPress content to a WXR file. + +Quick links: Github issues + +
    + +Generates one or more WXR files containing authors, terms, posts, +comments, and attachments. WXR files do not include site configuration +(options) or the attachment files themselves. + +### OPTIONS + +[\--dir=<dirname>] +: Full path to directory where WXR export files should be stored. Defaults +to current working directory. + +[\--skip_comments] +: Don't include comments in the WXR export file. + +[\--max_file_size=<MB>] +: A single export file should have this many megabytes. +\--- +default: 15 +\--- + +### FILTERS + +[\--start_date=<date>] +: Export only posts published after this date, in format YYYY-MM-DD. + +[\--end_date=<date>] +: Export only posts published before this date, in format YYYY-MM-DD. + +[\--post_type=<post-type>] +: Export only posts with this post_type. Separate multiple post types with a +comma. +\--- +default: any +\--- + +[\--post_type__not_in=<post-type>] +: Export all post types except those identified. Separate multiple post types +with a comma. Defaults to none. + +[\--post__in=<pid>] +: Export all posts specified as a comma- or space-separated list of IDs. + +[\--start_id=<pid>] +: Export only posts with IDs greater than or equal to this post ID. + +[\--author=<author>] +: Export only posts by this author. Can be either user login or user ID. + +[\--category=<name>] +: Export only posts in this category. + +[\--post_status=<status>] +: Export only posts with this status. + +[\--filename_format=<format>] +: Use a custom format for export filenames. Defaults to '{site}.wordpress.{date}.{n}.xml'. + +### EXAMPLES + + # Export posts published by the user between given start and end date + $ wp export --dir=/tmp/ --user=admin --post_type=post --start_date=2011-01-01 --end_date=2011-12-31 + Starting export process... + Writing to file /tmp/staging.wordpress.2016-05-24.000.xml + Success: All done with export. + + # Export posts by IDs + $ wp export --dir=/tmp/ --post__in=123,124,125 + Starting export process... + Writing to file /tmp/staging.wordpress.2016-05-24.000.xml + Success: All done with export. + + # Export a random subset of content + $ wp export --post__in="$(wp post list --post_type=post --orderby=rand --posts_per_page=8 --format=ids)" + Starting export process... + Writing to file /var/www/example.com/public_html/staging.wordpress.2016-05-24.000.xml + Success: All done with export. + + + diff --git a/commands/help/index.md b/commands/help/index.md index 572ea263..67655a6a 100644 --- a/commands/help/index.md +++ b/commands/help/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/help/ ---- \ No newline at end of file +layout: default +title: 'wp help' +display_global_parameters: true +--- + +[Commands](/commands/) » help + +`wp help` - Get help on WP-CLI, or on a specific command. + +Quick links: Github issues + +
    + +### OPTIONS + +[<command>...] +: Get help on a specific command. + +### EXAMPLES + + # get help for `core` command + wp help core + + # get help for `core download` subcommand + wp help core download + + + diff --git a/commands/import/index.md b/commands/import/index.md index f5dc2038..89e90a47 100644 --- a/commands/import/index.md +++ b/commands/import/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/import/ ---- \ No newline at end of file +layout: default +title: 'wp import' +display_global_parameters: true +--- + +[Commands](/commands/) » import + +`wp import` - Import content from a WXR file. + +Quick links: Github issues + +
    + +Provides a command line interface to the WordPress Importer plugin, for +performing data migrations. + +### OPTIONS + +<file>... +: Path to one or more valid WXR files for importing. Directories are also accepted. + +\--authors=<authors> +: How the author mapping should be handled. Options are 'create', 'mapping.csv', or 'skip'. The first will create any non-existent users from the WXR file. The second will read author mapping associations from a CSV, or create a CSV for editing if the file path doesn't exist. The CSV requires two columns, and a header row like "old_user_login,new_user_login". The last option will skip any author mapping. + +[\--skip=<data-type>] +: Skip importing specific data. Supported options are: 'attachment' and 'image_resize' (skip time-consuming thumbnail generation). + +### EXAMPLES + + # Import content from a WXR file + $ wp import example.wordpress.2016-06-21.xml --authors=create + Starting the import process... + Processing post #1 ("Hello world!") (post_type: post) + -- 1 of 1 + -- Tue, 21 Jun 2016 05:31:12 +0000 + -- Imported post as post_id #1 + Success: Finished importing from 'example.wordpress.2016-06-21.xml' file. + + + diff --git a/commands/index.html b/commands/index.html new file mode 100644 index 00000000..01f0b957 --- /dev/null +++ b/commands/index.html @@ -0,0 +1,19 @@ +--- +layout: default +title: Built-in Commands +display_global_parameters: true +--- + + + + + + + + + + {% include cmd-list.html %} + +
    CommandDescription
    + +

    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 + +
    + +### OPTIONS + +<file>... +: Path to file or files to be imported. Supports the glob(3) capabilities of the current shell. + If file is recognized as a URL (for example, with a scheme of http or ftp), the file will be + downloaded to a temp file before being sideloaded. + +[\--post_id=<post_id>] +: ID of the post to attach the imported files to. + +[\--title=<title>] +: Attachment title (post title field). + +[\--caption=<caption>] +: Caption for attachent (post excerpt field). + +[\--alt=<alt_text>] +: Alt text for image (saved as post meta). + +[\--desc=<description>] +: "Description" field (post content) of attachment post. + +[\--featured_image] +: If set, set the imported image as the Featured Image of the post its attached to. + +[\--porcelain] +: Output just the new attachment ID. + +### EXAMPLES + + # Import all jpgs in the current user's "Pictures" directory, not attached to any post. + $ wp media import ~/Pictures/**\/*.jpg + Imported file '/home/person/Pictures/beautiful-youg-girl-in-ivy.jpg' as attachment ID 1751. + Imported file '/home/person/Pictures/fashion-girl.jpg' as attachment ID 1752. + Success: Imported 2 of 2 images. + + # Import a local image and set it to be the post thumbnail for a post. + $ wp media import ~/Downloads/image.png --post_id=123 --title="A downloaded picture" --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. + + # Import a local image, but set it as the featured image for all posts. + # 1. Import the image and get its attachment ID. + # 2. Assign the attachment ID as the featured image for all posts. + $ ATTACHMENT_ID="$(wp media import ~/Downloads/image.png --porcelain)" + $ wp post list --post_type=post --format=ids | xargs -d ' ' -I % wp post meta add % _thumbnail_id $ATTACHMENT_ID + Success: Added custom field. + Success: Added custom field. + + # Import an image from the web. + $ wp media import http://s.wordpress.org/style/images/wp-header-logo.png --title='The WordPress logo' --alt="Semantic personal publishing" + Imported file 'http://s.wordpress.org/style/images/wp-header-logo.png' as attachment ID 1755. + Success: Imported 1 of 1 images. + + + diff --git a/commands/media/index.md b/commands/media/index.md index 3d6aaba6..5add73fb 100644 --- a/commands/media/index.md +++ b/commands/media/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/ ---- \ No newline at end of file +layout: default +title: 'wp media' +display_global_parameters: true +--- + +[Commands](/commands/) » media + +`wp media` - Manage attachments. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Re-generate all thumbnails, without confirmation. + $ wp media regenerate --yes + Found 3 images to regenerate. + 1/3 Regenerated thumbnails for "Sydney Harbor Bridge" (ID 760). + 2/3 Regenerated thumbnails for "Boardwalk" (ID 757). + 3/3 Regenerated thumbnails for "Sunburst Over River" (ID 756). + Success: Regenerated 3 of 3 images. + + # 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. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + +
    NameDescription
    importCreate attachments from local files or URLs.
    regenerateRegenerate thumbnails for one or more attachments.
    diff --git a/commands/media/regenerate/index.md b/commands/media/regenerate/index.md index 421570e0..a443d695 100644 --- a/commands/media/regenerate/index.md +++ b/commands/media/regenerate/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/regenerate/ ---- \ No newline at end of file +layout: default +title: 'wp media regenerate' +display_global_parameters: true +--- + +[Commands](/commands/) » [media](/commands/media/) » regenerate + +`wp media regenerate` - Regenerate thumbnails for one or more attachments. + +Quick links: Github issues + +
    + +### OPTIONS + +[<attachment-id>...] +: One or more IDs of the attachments to regenerate. + +[\--skip-delete] +: Skip deletion of the original thumbnails. If your thumbnails are linked from sources outside your control, it's likely best to leave them around. Defaults to false. + +[\--only-missing] +: Only generate thumbnails for images missing image sizes. + +[\--yes] +: Answer yes to the confirmation message. Confirmation only shows when no IDs passed as arguments. + +### EXAMPLES + + # Regenerate thumbnails for given attachment IDs. + $ wp media regenerate 123 124 125 + Found 3 images to regenerate. + 1/3 Regenerated thumbnails for "Vertical Image" (ID 123). + 2/3 Regenerated thumbnails for "Horizontal Image" (ID 124). + 3/3 Regenerated thumbnails for "Beautiful Picture" (ID 125). + Success: Regenerated 3 of 3 images. + + # Regenerate all thumbnails, without confirmation. + $ wp media regenerate --yes + Found 3 images to regenerate. + 1/3 Regenerated thumbnails for "Sydney Harbor Bridge" (ID 760). + 2/3 Regenerated thumbnails for "Boardwalk" (ID 757). + 3/3 Regenerated thumbnails for "Sunburst Over River" (ID 756). + Success: Regenerated 3 of 3 images. + + # Re-generate all thumbnails that have IDs between 1000 and 2000. + $ seq 1000 2000 | xargs wp media regenerate + Found 4 images to regenerate. + 1/4 Regenerated thumbnails for "Vertical Featured Image" (ID 1027). + 2/4 Regenerated thumbnails for "Horizontal Featured Image" (ID 1022). + 3/4 Regenerated thumbnails for "Unicorn Wallpaper" (ID 1045). + 4/4 Regenerated thumbnails for "I Am Worth Loving Wallpaper" (ID 1023). + Success: Regenerated 4 of 4 images. + + + diff --git a/commands/menu/create/index.md b/commands/menu/create/index.md index 328f015f..e969d684 100644 --- a/commands/menu/create/index.md +++ b/commands/menu/create/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/create/ ---- \ No newline at end of file +layout: default +title: 'wp menu create' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » create + +`wp menu create` - Create a new menu. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu-name> +: A descriptive name for the menu. + +[\--porcelain] +: Output just the new menu id. + +### EXAMPLES + + $ wp menu create "My Menu" + Success: Created menu 200. + + + diff --git a/commands/menu/delete/index.md b/commands/menu/delete/index.md index a82ae40d..8b000231 100644 --- a/commands/menu/delete/index.md +++ b/commands/menu/delete/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/delete/ ---- \ No newline at end of file +layout: default +title: 'wp menu delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » delete + +`wp menu delete` - Delete one or more menus. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu>... +: The name, slug, or term ID for the menu(s). + +### EXAMPLES + + $ wp menu delete "My Menu" + Success: 1 menu deleted. + + + diff --git a/commands/menu/index.md b/commands/menu/index.md index ef050659..822644ee 100644 --- a/commands/menu/index.md +++ b/commands/menu/index.md @@ -1,4 +1,71 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/ ---- \ No newline at end of file +layout: default +title: 'wp menu' +display_global_parameters: true +--- + +[Commands](/commands/) » menu + +`wp menu` - List, create, assign, and delete menus. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create a new menu + $ wp menu create "My Menu" + Success: Created menu 200. + + # List existing menus + $ wp menu list + +---------+----------+----------+-----------+-------+ + | term_id | name | slug | locations | count | + +---------+----------+----------+-----------+-------+ + | 200 | My Menu | my-menu | | 0 | + | 177 | Top Menu | top-menu | primary | 7 | + +---------+----------+----------+-----------+-------+ + + # Create a new menu link item + $ wp menu item add-custom my-menu Apple http://apple.com --porcelain + 1922 + + # Assign the 'my-menu' menu to the 'primary' location + $ wp menu location assign my-menu primary + Success: Assigned location to menu. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    createCreate a new menu.
    deleteDelete one or more menus.
    itemList, add, and delete items associated with a menu.
    listGet a list of menus.
    locationManage a menu's assignment to locations.
    diff --git a/commands/menu/item/add-custom/index.md b/commands/menu/item/add-custom/index.md index 50474c1b..e0024f90 100644 --- a/commands/menu/item/add-custom/index.md +++ b/commands/menu/item/add-custom/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/add-custom/ ---- \ No newline at end of file +layout: default +title: 'wp menu item add-custom' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » add-custom + +`wp menu item add-custom` - Add a custom menu item. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +<title> +: Title for the link. + +<link> +: Target URL for the link. + +[\--description=<description>] +: Set a custom description for the menu item. + +[\--attr-title=<attr-title>] +: Set a custom title attribute for the menu item. + +[\--target=<target>] +: Set a custom link target for the menu item. + +[\--classes=<classes>] +: Set a custom link classes for the menu item. + +[\--position=<position>] +: Specify the position of this menu item. + +[\--parent-id=<parent-id>] +: Make this menu item a child of another menu item. + +[\--porcelain] +: Output just the new menu item id. + +### EXAMPLES + + $ wp menu item add-custom sidebar-menu Apple http://apple.com + Success: Menu item added. + + + diff --git a/commands/menu/item/add-post/index.md b/commands/menu/item/add-post/index.md index 9f20940e..b29908f5 100644 --- a/commands/menu/item/add-post/index.md +++ b/commands/menu/item/add-post/index.md @@ -1,4 +1,56 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/add-post/ ---- \ No newline at end of file +layout: default +title: 'wp menu item add-post' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » add-post + +`wp menu item add-post` - Add a post as a menu item. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +<post-id> +: Post ID to add to the menu. + +[\--title=<title>] +: Set a custom title for the menu item. + +[\--link=<link>] +: Set a custom url for the menu item. + +[\--description=<description>] +: Set a custom description for the menu item. + +[\--attr-title=<attr-title>] +: Set a custom title attribute for the menu item. + +[\--target=<target>] +: Set a custom link target for the menu item. + +[\--classes=<classes>] +: Set a custom link classes for the menu item. + +[\--position=<position>] +: Specify the position of this menu item. + +[\--parent-id=<parent-id>] +: Make this menu item a child of another menu item. + +[\--porcelain] +: Output just the new menu item id. + +### EXAMPLES + + $ wp menu item add-post sidebar-menu 33 --title="Custom Test Post" + Success: Menu item added. + + + diff --git a/commands/menu/item/add-term/index.md b/commands/menu/item/add-term/index.md index da0b9d23..8c307ee8 100644 --- a/commands/menu/item/add-term/index.md +++ b/commands/menu/item/add-term/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/add-term/ ---- \ No newline at end of file +layout: default +title: 'wp menu item add-term' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » add-term + +`wp menu item add-term` - Add a taxonomy term as a menu item. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +<taxonomy> +: Taxonomy of the term to be added. + +<term-id> +: Term ID of the term to be added. + +[\--title=<title>] +: Set a custom title for the menu item. + +[\--link=<link>] +: Set a custom url for the menu item. + +[\--description=<description>] +: Set a custom description for the menu item. + +[\--attr-title=<attr-title>] +: Set a custom title attribute for the menu item. + +[\--target=<target>] +: Set a custom link target for the menu item. + +[\--classes=<classes>] +: Set a custom link classes for the menu item. + +[\--position=<position>] +: Specify the position of this menu item. + +[\--parent-id=<parent-id>] +: Make this menu item a child of another menu item. + +[\--porcelain] +: Output just the new menu item id. + +### EXAMPLES + + $ wp menu item add-term sidebar-menu post_tag 24 + Success: Menu item added. + + + diff --git a/commands/menu/item/delete/index.md b/commands/menu/item/delete/index.md index 7c748e70..7b0e1048 100644 --- a/commands/menu/item/delete/index.md +++ b/commands/menu/item/delete/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/delete/ ---- \ No newline at end of file +layout: default +title: 'wp menu item delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » delete + +`wp menu item delete` - Delete one or more items from a menu. + +Quick links: Github issues + +
    + +### OPTIONS + +<db-id>... +: Database ID for the menu item(s). + +### EXAMPLES + + $ wp menu item delete 45 + Success: 1 menu item deleted. + + + diff --git a/commands/menu/item/index.md b/commands/menu/item/index.md index f09f1f86..f34caffe 100644 --- a/commands/menu/item/index.md +++ b/commands/menu/item/index.md @@ -1,4 +1,68 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/ ---- \ No newline at end of file +layout: default +title: 'wp menu item' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » item + +`wp menu item` - List, add, and delete items associated with a menu. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Add an existing post to an existing menu + $ wp menu item add-post sidebar-menu 33 --title="Custom Test Post" + Success: Menu item added. + + # Create a new menu link item + $ wp menu item add-custom sidebar-menu Apple http://apple.com + Success: Menu item added. + + # Delete menu item + $ wp menu item delete 45 + Success: 1 menu item deleted. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    add-customAdd a custom menu item.
    add-postAdd a post as a menu item.
    add-termAdd a taxonomy term as a menu item.
    deleteDelete one or more items from a menu.
    listGet a list of items associated with a menu.
    updateUpdate a menu item.
    diff --git a/commands/menu/item/list/index.md b/commands/menu/item/list/index.md index 0713b338..d39ec53c 100644 --- a/commands/menu/item/list/index.md +++ b/commands/menu/item/list/index.md @@ -1,4 +1,70 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu item list' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » list + +`wp menu item list` - Get a list of items associated with a menu. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - ids + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each menu item: + +* db_id +* type +* title +* link +* position + +These fields are optionally available: + +* menu_item_parent +* object_id +* object +* type +* type_label +* target +* attr_title +* description +* classes +* xfn + +### EXAMPLES + + $ wp menu item list main-menu + +-------+-----------+-------------+---------------------------------+----------+ + | db_id | type | title | link | position | + +-------+-----------+-------------+---------------------------------+----------+ + | 5 | custom | Home | http://example.com | 1 | + | 6 | post_type | Sample Page | http://example.com/sample-page/ | 2 | + +-------+-----------+-------------+---------------------------------+----------+ + + + diff --git a/commands/menu/item/update/index.md b/commands/menu/item/update/index.md index 01b68582..3972cee0 100644 --- a/commands/menu/item/update/index.md +++ b/commands/menu/item/update/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/update/ ---- \ No newline at end of file +layout: default +title: 'wp menu item update' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [item](/commands/menu/item/) » update + +`wp menu item update` - Update a menu item. + +Quick links: Github issues + +
    + +### OPTIONS + +<db-id> +: Database ID for the menu item. + +[\--title=<title>] +: Set a custom title for the menu item. + +[\--link=<link>] +: Set a custom url for the menu item. + +[\--description=<description>] +: Set a custom description for the menu item. + +[\--attr-title=<attr-title>] +: Set a custom title attribute for the menu item. + +[\--target=<target>] +: Set a custom link target for the menu item. + +[\--classes=<classes>] +: Set a custom link classes for the menu item. + +[\--position=<position>] +: Specify the position of this menu item. + +[\--parent-id=<parent-id>] +: Make this menu item a child of another menu item. + +### EXAMPLES + + $ wp menu item update 45 --title=WordPress --link='http://wordpress.org' --target=_blank --position=2 + Success: Menu item updated. + + + diff --git a/commands/menu/list/index.md b/commands/menu/list/index.md index fded4a73..75dd1c28 100644 --- a/commands/menu/list/index.md +++ b/commands/menu/list/index.md @@ -1,4 +1,62 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu list' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » list + +`wp menu list` - Get a list of menus. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - ids + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each menu: + +* term_id +* name +* slug +* count + +These fields are optionally available: + +* term_group +* term_taxonomy_id +* taxonomy +* description +* parent +* locations + +### EXAMPLES + + $ wp menu list + +---------+----------+----------+-----------+-------+ + | term_id | name | slug | locations | count | + +---------+----------+----------+-----------+-------+ + | 200 | My Menu | my-menu | | 0 | + | 177 | Top Menu | top-menu | primary | 7 | + +---------+----------+----------+-----------+-------+ + + + diff --git a/commands/menu/location/assign/index.md b/commands/menu/location/assign/index.md index 9c746201..68000690 100644 --- a/commands/menu/location/assign/index.md +++ b/commands/menu/location/assign/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/assign/ ---- \ No newline at end of file +layout: default +title: 'wp menu location assign' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [location](/commands/menu/location/) » assign + +`wp menu location assign` - Assign a location to a menu. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +<location> +: Location's slug. + +### EXAMPLES + + $ wp menu location assign primary-menu primary + Success: Assigned location to menu. + + + diff --git a/commands/menu/location/index.md b/commands/menu/location/index.md index c66f02e5..c261b752 100644 --- a/commands/menu/location/index.md +++ b/commands/menu/location/index.md @@ -1,4 +1,61 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/ ---- \ No newline at end of file +layout: default +title: 'wp menu location' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » location + +`wp menu location` - Manage a menu's assignment to locations. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List available menu locations + $ wp menu location list + +----------+-------------------+ + | location | description | + +----------+-------------------+ + | primary | Primary Menu | + | social | Social Links Menu | + +----------+-------------------+ + + # Assign the 'primary-menu' menu to the 'primary' location + $ wp menu location assign primary-menu primary + Success: Assigned location to menu. + + # Remove the 'primary-menu' menu from the 'primary' location + $ wp menu location remove primary-menu primary + Success: Removed location from menu. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    assignAssign a location to a menu.
    listList locations for the current theme.
    removeRemove a location from a menu.
    diff --git a/commands/menu/location/list/index.md b/commands/menu/location/list/index.md index 6d1e3701..ffe112c3 100644 --- a/commands/menu/location/list/index.md +++ b/commands/menu/location/list/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu location list' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [location](/commands/menu/location/) » list + +`wp menu location list` - List locations for the current theme. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml + - ids +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each location: + +* name +* description + +### EXAMPLES + + $ wp menu location list + +----------+-------------------+ + | location | description | + +----------+-------------------+ + | primary | Primary Menu | + | social | Social Links Menu | + +----------+-------------------+ + + + diff --git a/commands/menu/location/remove/index.md b/commands/menu/location/remove/index.md index fb4ceb5a..3f547937 100644 --- a/commands/menu/location/remove/index.md +++ b/commands/menu/location/remove/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/remove/ ---- \ No newline at end of file +layout: default +title: 'wp menu location remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [menu](/commands/menu/) » [location](/commands/menu/location/) » remove + +`wp menu location remove` - Remove a location from a menu. + +Quick links: Github issues + +
    + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu. + +<location> +: Location's slug. + +### EXAMPLES + + $ wp menu location remove primary-menu primary + Success: Removed location from menu. + + + diff --git a/commands/network/index.md b/commands/network/index.md index 3c879aac..13a77cdc 100644 --- a/commands/network/index.md +++ b/commands/network/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/ ---- \ No newline at end of file +layout: default +title: 'wp network' +display_global_parameters: true +--- + +[Commands](/commands/) » network + +`wp network` - + +Quick links: Github issues + +
    + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
    NameDescription
    metaManage network custom fields.
    diff --git a/commands/network/meta/add/index.md b/commands/network/meta/add/index.md index 860053db..5f2c2aa0 100644 --- a/commands/network/meta/add/index.md +++ b/commands/network/meta/add/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp network meta add' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » [meta](/commands/network/meta/) » add + +`wp network meta add` - Add a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/network/meta/delete/index.md b/commands/network/meta/delete/index.md index 01f0800c..5c17e072 100644 --- a/commands/network/meta/delete/index.md +++ b/commands/network/meta/delete/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp network meta delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » [meta](/commands/network/meta/) » delete + +`wp network meta delete` - Delete a meta field. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +[<key>] +: The name of the meta field to delete. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + +[\--all] +: Delete all meta for the object. + + + diff --git a/commands/network/meta/get/index.md b/commands/network/meta/get/index.md index 16932de1..253a5c02 100644 --- a/commands/network/meta/get/index.md +++ b/commands/network/meta/get/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp network meta get' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » [meta](/commands/network/meta/) » get + +`wp network meta get` - Get meta field value. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<key> +: The name of the meta field to get. + +[\--format=<format>] +: Accepted values: table, json. Default: table + + + diff --git a/commands/network/meta/index.md b/commands/network/meta/index.md index cdeaca95..48cab1ef 100644 --- a/commands/network/meta/index.md +++ b/commands/network/meta/index.md @@ -1,4 +1,58 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/ ---- \ No newline at end of file +layout: default +title: 'wp network meta' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » meta + +`wp network meta` - Manage network custom fields. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Get a list of super-admins + $ wp network meta get 1 site_admins + array ( + 0 => 'supervisor', + ) + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a meta field.
    deleteDelete a meta field.
    getGet meta field value.
    listList all metadata associated with an object.
    updateUpdate a meta field.
    diff --git a/commands/network/meta/list/index.md b/commands/network/meta/list/index.md index a3fed3c7..58a3c681 100644 --- a/commands/network/meta/list/index.md +++ b/commands/network/meta/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp network meta list' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » [meta](/commands/network/meta/) » list + +`wp network meta list` - List all metadata associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +[\--keys=<keys>] +: Limit output to metadata of specific keys. + +[\--fields=<fields>] +: Limit the output to specific row fields. Defaults to id,meta_key,meta_value. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + + + diff --git a/commands/network/meta/update/index.md b/commands/network/meta/update/index.md index b22e3a32..51178f56 100644 --- a/commands/network/meta/update/index.md +++ b/commands/network/meta/update/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp network meta update' +display_global_parameters: true +--- + +[Commands](/commands/) » [network](/commands/network/) » [meta](/commands/network/meta/) » update + +`wp network meta update` - Update a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/option/add/index.md b/commands/option/add/index.md index 403f7920..788141dd 100644 --- a/commands/option/add/index.md +++ b/commands/option/add/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/add/ ---- \ No newline at end of file +layout: default +title: 'wp option add' +display_global_parameters: true +--- + +[Commands](/commands/) » [option](/commands/option/) » add + +`wp option add` - Add a new option value. + +Quick links: Github issues + +
    + +Errors if the option already exists. + +### OPTIONS + +<key> +: The name of the option to add. + +[<value>] +: The value of the option to add. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +[\--autoload=<autoload>] +: Should this option be automatically loaded. +\--- +options: + - 'yes' + - 'no' +\--- + +### EXAMPLES + + # Create an option by reading a JSON file. + $ wp option add my_option --format=json < config.json + Success: Added 'my_option' option. + + + diff --git a/commands/option/delete/index.md b/commands/option/delete/index.md index d471a9c3..818503d7 100644 --- a/commands/option/delete/index.md +++ b/commands/option/delete/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/delete/ ---- \ No newline at end of file +layout: default +title: 'wp option delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [option](/commands/option/) » delete + +`wp option delete` - Delete an option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: Key for the option. + +### EXAMPLES + + # Delete an option. + $ wp option delete my_option + Success: Deleted 'my_option' option. + + + diff --git a/commands/option/get/index.md b/commands/option/get/index.md index 56bd6852..ba068fd5 100644 --- a/commands/option/get/index.md +++ b/commands/option/get/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/get/ ---- \ No newline at end of file +layout: default +title: 'wp option get' +display_global_parameters: true +--- + +[Commands](/commands/) » [option](/commands/option/) » get + +`wp option get` - Get the value for an option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: Key for the option. + +[\--format=<format>] +: Get value in a particular format. +\--- +default: var_export +options: + - var_export + - json + - yaml +\--- + +### EXAMPLES + + # Get option. + $ wp option get home + http://example.com + + # Get option in JSON format. + $ wp option get active_plugins --format=json + {"0":"dynamically-dynamic-sidebar\/dynamically-dynamic-sidebar.php","1":"monster-widget\/monster-widget.php","2":"show-current-template\/show-current-template.php","3":"theme-check\/theme-check.php","5":"wordpress-importer\/wordpress-importer.php"} + + + diff --git a/commands/option/index.md b/commands/option/index.md index 637929ff..de99888f 100644 --- a/commands/option/index.md +++ b/commands/option/index.md @@ -1,4 +1,66 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/ ---- \ No newline at end of file +layout: default +title: 'wp option' +display_global_parameters: true +--- + +[Commands](/commands/) » option + +`wp option` - Manage options. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Get site URL. + $ wp option get siteurl + http://example.com + + # Add option. + $ wp option add my_option foobar + Success: Added 'my_option' option. + + # Update option. + $ wp option update my_option '{"foo": "bar"}' --format=json + Success: Updated 'my_option' option. + + # Delete option. + $ wp option delete my_option + Success: Deleted 'my_option' option. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a new option value.
    deleteDelete an option.
    getGet the value for an option.
    listList options and their values.
    updateUpdate an option value.
    diff --git a/commands/option/list/index.md b/commands/option/list/index.md index 926ae1b4..80720569 100644 --- a/commands/option/list/index.md +++ b/commands/option/list/index.md @@ -1,4 +1,90 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/list/ ---- \ No newline at end of file +layout: default +title: 'wp option list' +display_global_parameters: true +--- + +[Commands](/commands/) » [option](/commands/option/) » list + +`wp option list` - List options and their values. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--search=<pattern>] +: Use wildcards ( * and ? ) to match option name. + +[\--exclude=<pattern>] +: Pattern to exclude. Use wildcards ( * and ? ) to match option name. + +[\--autoload=<value>] +: Match only autoload options when value is on, and only not-autoload option when off. + +[\--transients] +: List only transients. Use `--no-transients` to ignore all transients. + +[\--field=<field>] +: Prints the value of a single field. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: The serialization format for the value. total_bytes displays the total size of matching options in bytes. +\--- +default: table +options: + - table + - json + - csv + - count + - yaml + - total_bytes +\--- + +### AVAILABLE FIELDS + +This field will be displayed by default for each matching option: + +* option_name +* option_value + +These fields are optionally available: + +* autoload +* size_bytes + +### EXAMPLES + + # Get the total size of all autoload options. + $ wp option list --autoload=on --format=total_bytes + 33198 + + # Find biggest transients. + $ wp option list --search="*_transient_*" --fields=option_name,size_bytes | sort -n -k 2 | tail + option_name size_bytes + _site_transient_timeout_theme_roots 10 + _site_transient_theme_roots 76 + _site_transient_update_themes 181 + _site_transient_update_core 808 + _site_transient_update_plugins 6645 + + # List all options begining with "i2f_". + $ wp option list --search="i2f_*" + +-------------+--------------+ + | option_name | option_value | + +-------------+--------------+ + | i2f_version | 0.1.0 | + +-------------+--------------+ + + # Delete all options begining with "theme_mods_". + $ wp option list --search="theme_mods_*" --field=option_name | xargs -I % wp option delete % + Success: Deleted 'theme_mods_twentysixteen' option. + Success: Deleted 'theme_mods_twentyfifteen' option. + Success: Deleted 'theme_mods_twentyfourteen' option. + + + diff --git a/commands/option/update/index.md b/commands/option/update/index.md index d9f799f0..14eeac24 100644 --- a/commands/option/update/index.md +++ b/commands/option/update/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/update/ ---- \ No newline at end of file +layout: default +title: 'wp option update' +display_global_parameters: true +--- + +[Commands](/commands/) » [option](/commands/option/) » update + +`wp option update` - Update an option value. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: The name of the option to update. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--autoload=<autoload>] +: Requires WP 4.2. Should this option be automatically loaded. +\--- +options: + - 'yes' + - 'no' +\--- + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Update an option by reading from a file. + $ wp option update my_option < value.txt + Success: Updated 'my_option' option. + + # Update one option on multiple sites using xargs. + $ wp site list --field=url | xargs -n1 -I {} sh -c 'wp --url={} option update my_option my_value' + Success: Updated 'my_option' option. + Success: Updated 'my_option' option. + + + diff --git a/commands/package/browse/index.md b/commands/package/browse/index.md index b0ad5d4f..7a5b41c3 100644 --- a/commands/package/browse/index.md +++ b/commands/package/browse/index.md @@ -1,4 +1,66 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/browse/ ---- \ No newline at end of file +layout: default +title: 'wp package browse' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » browse + +`wp package browse` - Browse WP-CLI packages available for installation. + +Quick links: Github issues + +
    + +Lists packages available for installation from the [Package Index](http://wp-cli.org/package-index/). + +### OPTIONS + +[\--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 + - ids + - json + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each package: + +* name +* description +* authors +* version + +There are no optionally available fields. + +### EXAMPLES + + $ wp package browse --format=yaml + --- + 10up/mu-migration: + name: 10up/mu-migration + description: A set of WP-CLI commands to support the migration of single WordPress instances to multisite + authors: Nícholas André + version: dev-master, dev-develop + aaemnnosttv/wp-cli-dotenv-command: + name: aaemnnosttv/wp-cli-dotenv-command + description: Dotenv commands for WP-CLI + authors: Evan Mattson + version: v0.1, v0.1-beta.1, v0.2, dev-master, dev-dev, dev-develop, dev-tests/behat + aaemnnosttv/wp-cli-http-command: + name: aaemnnosttv/wp-cli-http-command + description: WP-CLI command for using the WordPress HTTP API + authors: Evan Mattson + version: dev-master + + + diff --git a/commands/package/index.md b/commands/package/index.md index ebb25bcf..2b3515a5 100644 --- a/commands/package/index.md +++ b/commands/package/index.md @@ -1,4 +1,96 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/ ---- \ No newline at end of file +layout: default +title: 'wp package' +display_global_parameters: true +--- + +[Commands](/commands/) » package + +`wp package` - Manage WP-CLI packages. + +Quick links: Github issues + +
    + +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. + +Installable packages are listed in the +[Package Index](http://wp-cli.org/package-index/). + +Learn how to create your own command from the +[Commands Cookbook](http://wp-cli.org/docs/commands-cookbook/) + +### EXAMPLES + + # List installed packages + $ wp package list + +-----------------------+------------------------------------------+---------+------------+ + | name | description | authors | version | + +-----------------------+------------------------------------------+---------+------------+ + | wp-cli/server-command | Start a development server for WordPress | | dev-master | + +-----------------------+------------------------------------------+---------+------------+ + + # Install the latest development version of the package + $ wp package install wp-cli/server-command + Installing package wp-cli/server-command (dev-master) + Updating /home/person/.wp-cli/packages/composer.json to require the package... + Using Composer to install the package... + --- + Loading composer repositories with package information + Updating dependencies + Resolving dependencies through SAT + Dependency resolution completed in 0.005 seconds + Analyzed 732 packages to resolve dependencies + Analyzed 1034 rules to resolve dependencies + - Installing package + Writing lock file + Generating autoload files + --- + Success: Package installed. + + # 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. + Success: Uninstalled package. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    browseBrowse WP-CLI packages available for installation.
    installInstall a WP-CLI package.
    listList installed WP-CLI packages.
    pathGet the path to an installed WP-CLI package, or the package directory.
    uninstallUninstall a WP-CLI package.
    updateUpdate all installed WP-CLI packages to their latest version.
    diff --git a/commands/package/install/index.md b/commands/package/install/index.md index ff315b55..c0a141e7 100644 --- a/commands/package/install/index.md +++ b/commands/package/install/index.md @@ -1,4 +1,67 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/install/ ---- \ No newline at end of file +layout: default +title: 'wp package install' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » install + +`wp package install` - Install a WP-CLI package. + +Quick links: Github issues + +
    + +Packages are required to be a valid Composer package, and can be +specified as: + +* Package name from WP-CLI's package index. +* Git URL accessible by the current shell user. +* Path to a directory on the local machine. +* Local or remote .zip file. + +When installing a local directory, WP-CLI simply registers a +reference to the directory. If you move or delete the directory, WP-CLI's +reference breaks. + +When installing a .zip file, WP-CLI extracts the package to +`~/.wp-cli/packages/local/<package-name>`. + +### OPTIONS + +<name|git|path|zip> +: Name, git URL, directory path, or .zip file for the package to install. +Names can optionally include a version constraint +(e.g. wp-cli/server-command:@stable). + +### EXAMPLES + + # Install the latest development version from the package index. + $ wp package install wp-cli/server-command + Installing package wp-cli/server-command (dev-master) + Updating /home/person/.wp-cli/packages/composer.json to require the package... + Using Composer to install the package... + --- + Loading composer repositories with package information + Updating dependencies + Resolving dependencies through SAT + Dependency resolution completed in 0.005 seconds + Analyzed 732 packages to resolve dependencies + Analyzed 1034 rules to resolve dependencies + - Installing package + Writing lock file + Generating autoload files + --- + Success: Package installed. + + # Install the latest stable version. + $ wp package install wp-cli/server-command:@stable + + # Install a package hosted at a git URL. + $ wp package install git@github.com:runcommand/hook.git + + # Install a package in a .zip file. + $ wp package install google-sitemap-generator-cli.zip + + + diff --git a/commands/package/list/index.md b/commands/package/list/index.md index 0df19ed1..439e6d34 100644 --- a/commands/package/list/index.md +++ b/commands/package/list/index.md @@ -1,4 +1,56 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/list/ ---- \ No newline at end of file +layout: default +title: 'wp package list' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » list + +`wp package list` - List installed WP-CLI packages. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--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 + - ids + - json + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each package: + +* name +* authors +* version +* update +* update_version + +These fields are optionally available: + +* description + +### EXAMPLES + + $ wp package list + +-----------------------+------------------------------------------+---------+------------+ + | name | description | authors | version | + +-----------------------+------------------------------------------+---------+------------+ + | wp-cli/server-command | Start a development server for WordPress | | dev-master | + +-----------------------+------------------------------------------+---------+------------+ + + + diff --git a/commands/package/path/index.md b/commands/package/path/index.md index a29adb9d..3de7cd68 100644 --- a/commands/package/path/index.md +++ b/commands/package/path/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/path/ ---- \ No newline at end of file +layout: default +title: 'wp package path' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » path + +`wp package path` - Get the path to an installed WP-CLI package, or the package directory. + +Quick links: Github issues + +
    + +If you want to contribute to a package, this is a great way to jump to it. + +### OPTIONS + +[<name>] +: Name of the package to get the directory for. + +### EXAMPLES + + # Get package path + $ wp package path + /home/person/.wp-cli/packages/ + + # Change directory to package path + $ cd $(wp package path) && pwd + /home/vagrant/.wp-cli/packages + + + diff --git a/commands/package/uninstall/index.md b/commands/package/uninstall/index.md index 847871ae..1ee0ce50 100644 --- a/commands/package/uninstall/index.md +++ b/commands/package/uninstall/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/uninstall/ ---- \ No newline at end of file +layout: default +title: 'wp package uninstall' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » uninstall + +`wp package uninstall` - Uninstall a WP-CLI package. + +Quick links: Github issues + +
    + +### OPTIONS + +<name> +: Name of the package to uninstall. + +### EXAMPLES + + $ 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. + Success: Uninstalled package. + + + diff --git a/commands/package/update/index.md b/commands/package/update/index.md index 33f5b728..f4e4545f 100644 --- a/commands/package/update/index.md +++ b/commands/package/update/index.md @@ -1,4 +1,32 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/update/ ---- \ No newline at end of file +layout: default +title: 'wp package update' +display_global_parameters: true +--- + +[Commands](/commands/) » [package](/commands/package/) » update + +`wp package update` - Update all installed WP-CLI packages to their latest version. + +Quick links: Github issues + +
    + +### EXAMPLES + + $ wp package update + Using Composer to update packages... + --- + Loading composer repositories with package information + Updating dependencies + Resolving dependencies through SAT + Dependency resolution completed in 0.074 seconds + Analyzed 1062 packages to resolve dependencies + Analyzed 22383 rules to resolve dependencies + Writing lock file + Generating autoload files + --- + Success: Packages updated. + + + diff --git a/commands/plugin/activate/index.md b/commands/plugin/activate/index.md index 0fd2b1f1..b4dd1328 100644 --- a/commands/plugin/activate/index.md +++ b/commands/plugin/activate/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/activate/ ---- \ No newline at end of file +layout: default +title: 'wp plugin activate' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » activate + +`wp plugin activate` - Activate a plugin. + +Quick links: Github issues + +
    + +### OPTIONS + +[<plugin>...] +: One or more plugins to activate. + +[\--all] +: If set, all plugins will be activated. + +[\--network] +: If set, the plugin will be activated for the entire multisite network. + +### EXAMPLES + + # Activate plugin + $ wp plugin activate hello-dolly + Plugin 'hello-dolly' activated. + Success: Activated 1 of 1 plugins. + + # Activate plugin in entire multisite network + $ wp plugin activate hello-dolly --network + Plugin 'hello-dolly' network activated. + Success: Network activated 1 of 1 plugins. + + + diff --git a/commands/plugin/deactivate/index.md b/commands/plugin/deactivate/index.md index 05aaf682..e2b20773 100644 --- a/commands/plugin/deactivate/index.md +++ b/commands/plugin/deactivate/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/deactivate/ ---- \ No newline at end of file +layout: default +title: 'wp plugin deactivate' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » deactivate + +`wp plugin deactivate` - Deactivate a plugin. + +Quick links: Github issues + +
    + +### OPTIONS + +[<plugin>...] +: One or more plugins to deactivate. + +[\--uninstall] +: Uninstall the plugin after deactivation. + +[\--all] +: If set, all plugins will be deactivated. + +[\--network] +: If set, the plugin will be deactivated for the entire multisite network. + +### EXAMPLES + + # Deactivate plugin + $ wp plugin deactivate hello-dolly + Plugin 'hello-dolly' deactivated. + Success: Deactivated 1 of 1 plugins. + + + diff --git a/commands/plugin/delete/index.md b/commands/plugin/delete/index.md index 4d0e9541..988e04da 100644 --- a/commands/plugin/delete/index.md +++ b/commands/plugin/delete/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/delete/ ---- \ No newline at end of file +layout: default +title: 'wp plugin delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » delete + +`wp plugin delete` - Delete plugin files without deactivating or uninstalling. + +Quick links: Github issues + +
    + +### OPTIONS + +<plugin>... +: One or more plugins to delete. + +### EXAMPLES + + # Delete plugin + $ wp plugin delete hello + Deleted 'hello' plugin. + Success: Deleted 1 of 1 plugins. + + # Delete inactive plugins + $ wp plugin delete $(wp plugin list --status=inactive --field=name) + Deleted 'tinymce-templates' plugin. + Success: Deleted 1 of 1 plugins. + + + diff --git a/commands/plugin/get/index.md b/commands/plugin/get/index.md index dec04a29..68c9ec65 100644 --- a/commands/plugin/get/index.md +++ b/commands/plugin/get/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/get/ ---- \ No newline at end of file +layout: default +title: 'wp plugin get' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » get + +`wp plugin get` - Get details about an installed plugin. + +Quick links: Github issues + +
    + +### OPTIONS + +<plugin> +: The plugin to get. + +[\--field=<field>] +: Instead of returning the whole plugin, 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 + + $ 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"} + + + diff --git a/commands/plugin/index.md b/commands/plugin/index.md index eb0260a9..74429844 100644 --- a/commands/plugin/index.md +++ b/commands/plugin/index.md @@ -1,4 +1,109 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/ ---- \ No newline at end of file +layout: default +title: 'wp plugin' +display_global_parameters: true +--- + +[Commands](/commands/) » plugin + +`wp plugin` - Manage plugins. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Activate plugin + $ wp plugin activate hello-dolly + Plugin 'hello-dolly' activated. + Success: Activated 1 of 1 plugins. + + # Deactivate plugin + $ wp plugin deactivate hello-dolly + Plugin 'hello-dolly' deactivated. + Success: Deactivated 1 of 1 plugins. + + # Delete plugin + $ wp plugin delete hello-dolly + Deleted 'hello-dolly' plugin. + Success: Deleted 1 of 1 plugins. + + # Install the latest version from wordpress.org and activate + $ wp plugin install bbpress --activate + Installing bbPress (2.5.9) + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.2.5.9.zip... + Using cached file '/home/vagrant/.wp-cli/cache/plugin/bbpress-2.5.9.zip'... + Unpacking the package... + Installing the plugin... + Plugin installed successfully. + Activating 'bbpress'... + Plugin 'bbpress' activated. + Success: Installed 1 of 1 plugins. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    activateActivate a plugin.
    deactivateDeactivate a plugin.
    deleteDelete plugin files without deactivating or uninstalling.
    getGet details about an installed plugin.
    installInstall a plugin.
    is-installedCheck if the plugin is installed.
    listGet a list of plugins.
    pathGet the path to a plugin or to the plugin directory.
    searchSearch the WordPress.org plugin directory.
    statusSee the status of one or all plugins.
    toggleToggle a plugin's activation state.
    uninstallUninstall a plugin.
    updateUpdate one or more plugins.
    diff --git a/commands/plugin/install/index.md b/commands/plugin/install/index.md index 7682ff48..0289351c 100644 --- a/commands/plugin/install/index.md +++ b/commands/plugin/install/index.md @@ -1,4 +1,92 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/install/ ---- \ No newline at end of file +layout: default +title: 'wp plugin install' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » install + +`wp plugin install` - Install a plugin. + +Quick links: Github issues + +
    + +### OPTIONS + +<plugin|zip|url>... +: A plugin slug, the path to a local zip file, or URL to a remote zip file. + +[\--version=<version>] +: If set, get that particular version from wordpress.org, instead of the +stable version. + +[\--force] +: If set, the command will overwrite any installed version of the plugin, without prompting +for confirmation. + +[\--activate] +: If set, the plugin will be activated immediately after install. + +[\--activate-network] +: If set, the plugin will be network activated immediately after install + +### EXAMPLES + + # Install the latest version from wordpress.org and activate + $ wp plugin install bbpress --activate + Installing bbPress (2.5.9) + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.2.5.9.zip... + Using cached file '/home/vagrant/.wp-cli/cache/plugin/bbpress-2.5.9.zip'... + Unpacking the package... + Installing the plugin... + Plugin installed successfully. + Activating 'bbpress'... + Plugin 'bbpress' activated. + Success: Installed 1 of 1 plugins. + + # Install the development version from wordpress.org + $ wp plugin install bbpress --version=dev + Installing bbPress (Development Version) + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.zip... + Unpacking the package... + Installing the plugin... + Plugin installed successfully. + Success: Installed 1 of 1 plugins. + + # Install from a local zip file + $ wp plugin install ../my-plugin.zip + Unpacking the package... + Installing the plugin... + Plugin installed successfully. + Success: Installed 1 of 1 plugins. + + # Install from a remote zip file + $ wp plugin install http://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef + Downloading install package from http://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef + Unpacking the package... + Installing the plugin... + Plugin installed successfully. + Success: Installed 1 of 1 plugins. + + # Update from a remote zip file + $ wp plugin install https://github.com/envato/wp-envato-market/archive/master.zip --force + Downloading install package from https://github.com/envato/wp-envato-market/archive/master.zip + Unpacking the package... + Installing the plugin... + Renamed Github-based project from 'wp-envato-market-master' to 'wp-envato-market'. + Plugin updated successfully + Success: Installed 1 of 1 plugins. + + # Forcefully re-install all installed plugins + $ wp plugin install $(wp plugin list --field=name) --force + Installing Akismet (3.1.11) + Downloading install package from https://downloads.wordpress.org/plugin/akismet.3.1.11.zip... + Unpacking the package... + Installing the plugin... + Removing the old version of the plugin... + Plugin updated successfully + Success: Installed 1 of 1 plugins. + + + diff --git a/commands/plugin/is-installed/index.md b/commands/plugin/is-installed/index.md index d1cdedca..a776ebb6 100644 --- a/commands/plugin/is-installed/index.md +++ b/commands/plugin/is-installed/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp plugin is-installed' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » is-installed + +`wp plugin is-installed` - Check if the plugin is installed. + +Quick links: Github issues + +
    + +Returns exit code 0 when installed, 1 when uninstalled. + +### OPTIONS + +<plugin> +: The plugin to check. + +### EXAMPLES + + # Check whether plugin is installed; exit status 0 if installed, otherwise 1 + $ wp plugin is-installed hello-dolly + $ echo $? + 1 + + + diff --git a/commands/plugin/list/index.md b/commands/plugin/list/index.md index 40959e92..7c871891 100644 --- a/commands/plugin/list/index.md +++ b/commands/plugin/list/index.md @@ -1,4 +1,77 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/list/ ---- \ No newline at end of file +layout: default +title: 'wp plugin list' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » list + +`wp plugin list` - Get a list of plugins. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: Filter results based on the value of a field. + +[\--field=<field>] +: Prints the value of a single field for each plugin. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - count + - json + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each plugin: + +* name +* status +* update +* version + +These fields are optionally available: + +* update_version +* update_package +* update_id +* title +* description + +### EXAMPLES + + # List active plugins on the site. + $ wp plugin list --status=active --format=json + [{"name":"dynamic-hostname","status":"active","update":"none","version":"0.4.2"},{"name":"tinymce-templates","status":"active","update":"none","version":"4.4.3"},{"name":"wp-multibyte-patch","status":"active","update":"none","version":"2.4"},{"name":"wp-total-hacks","status":"active","update":"none","version":"2.0.1"}] + + # List plugins on each site in a network. + $ wp site list --field=url | xargs -I % wp plugin list --url=% + +---------+----------------+--------+---------+ + | name | status | update | version | + +---------+----------------+--------+---------+ + | akismet | active-network | none | 3.1.11 | + | hello | inactive | none | 1.6 | + +---------+----------------+--------+---------+ + +---------+----------------+--------+---------+ + | name | status | update | version | + +---------+----------------+--------+---------+ + | akismet | active-network | none | 3.1.11 | + | hello | inactive | none | 1.6 | + +---------+----------------+--------+---------+ + + + diff --git a/commands/plugin/path/index.md b/commands/plugin/path/index.md index 22e187e0..7e450b8d 100644 --- a/commands/plugin/path/index.md +++ b/commands/plugin/path/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/path/ ---- \ No newline at end of file +layout: default +title: 'wp plugin path' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » path + +`wp plugin path` - Get the path to a plugin or to the plugin directory. + +Quick links: Github issues + +
    + +### OPTIONS + +[<plugin>] +: The plugin to get the path to. If not set, will return the path to the +plugins directory. + +[\--dir] +: If set, get the path to the closest parent directory, instead of the +plugin file. + +### EXAMPLES + + $ cd $(wp plugin path) && pwd + /var/www/wordpress/wp-content/plugins + + + diff --git a/commands/plugin/search/index.md b/commands/plugin/search/index.md index 9ddf89b7..5ec28ead 100644 --- a/commands/plugin/search/index.md +++ b/commands/plugin/search/index.md @@ -1,4 +1,85 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/search/ ---- \ No newline at end of file +layout: default +title: 'wp plugin search' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » search + +`wp plugin search` - Search the WordPress.org plugin directory. + +Quick links: Github issues + +
    + +Displays plugins in the WordPress.org plugin directory matching a given +search query. + +### OPTIONS + +<search> +: The string to search for. + +[\--page=<page>] +: Optional page to display. +\--- +default: 1 +\--- + +[\--per-page=<per-page>] +: Optional number of results to display. +\--- +default: 10 +\--- + +[\--field=<field>] +: Prints the value of a single field for each plugin. + +[\--fields=<fields>] +: Ask for specific fields from the API. Defaults to name,slug,author_profile,rating. Acceptable values: + + **name**: Plugin Name + **slug**: Plugin Slug + **version**: Current Version Number + **author**: Plugin Author + **author_profile**: Plugin Author Profile + **contributors**: Plugin Contributors + **requires**: Plugin Minimum Requirements + **tested**: Plugin Tested Up To + **compatibility**: Plugin Compatible With + **rating**: Plugin Rating + **num_ratings**: Number of Plugin Ratings + **homepage**: Plugin Author's Homepage + **description**: Plugin's Description + **short_description**: Plugin's Short Description + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - count + - json + - yaml +\--- + +### EXAMPLES + + $ wp plugin search dsgnwrks --per-page=20 --format=json + Success: Showing 3 of 3 plugins. + [{"name":"DsgnWrks Instagram Importer Debug","slug":"dsgnwrks-instagram-importer-debug","rating":0},{"name":"DsgnWrks Instagram Importer","slug":"dsgnwrks-instagram-importer","rating":84},{"name":"DsgnWrks Twitter Importer","slug":"dsgnwrks-twitter-importer","rating":80}] + + $ wp plugin search dsgnwrks --fields=name,version,slug,rating,num_ratings + Success: Showing 3 of 3 plugins. + +-----------------------------------+---------+-----------------------------------+--------+-------------+ + | name | version | slug | rating | num_ratings | + +-----------------------------------+---------+-----------------------------------+--------+-------------+ + | DsgnWrks Instagram Importer Debug | 0.1.6 | dsgnwrks-instagram-importer-debug | 0 | 0 | + | DsgnWrks Instagram Importer | 1.3.7 | dsgnwrks-instagram-importer | 84 | 23 | + | DsgnWrks Twitter Importer | 1.1.1 | dsgnwrks-twitter-importer | 80 | 1 | + +-----------------------------------+---------+-----------------------------------+--------+-------------+ + + + diff --git a/commands/plugin/status/index.md b/commands/plugin/status/index.md index 31358b56..b362844e 100644 --- a/commands/plugin/status/index.md +++ b/commands/plugin/status/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/status/ ---- \ No newline at end of file +layout: default +title: 'wp plugin status' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » status + +`wp plugin status` - See the status of one or all plugins. + +Quick links: Github issues + +
    + +### OPTIONS + +[<plugin>] +: A particular plugin to show the status for. + +### EXAMPLES + + # Displays status of all plugins + $ wp plugin status + 5 installed plugins: + I akismet 3.1.11 + I easy-digital-downloads 2.5.16 + A theme-check 20160523.1 + I wen-logo-slider 2.0.3 + M ns-pack 1.0.0 + Legend: I = Inactive, A = Active, M = Must Use + + # Displays status of a plugin + $ wp plugin status theme-check + Plugin theme-check details: + Name: Theme Check + Status: Active + Version: 20160523.1 + Author: Otto42, pross + Description: A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool! + + + diff --git a/commands/plugin/toggle/index.md b/commands/plugin/toggle/index.md index bbb60ac7..720eda9d 100644 --- a/commands/plugin/toggle/index.md +++ b/commands/plugin/toggle/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/toggle/ ---- \ No newline at end of file +layout: default +title: 'wp plugin toggle' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » toggle + +`wp plugin toggle` - Toggle a plugin's activation state. + +Quick links: Github issues + +
    + +If the plugin is active, then it will be deactivated. If the plugin is +inactive, then it will be activated. + +### OPTIONS + +<plugin>... +: One or more plugins to toggle. + +[\--network] +: If set, the plugin will be toggled for the entire multisite network. + +### EXAMPLES + + # Akismet is currently activated + $ wp plugin toggle akismet + Plugin 'akismet' deactivated. + Success: Toggled 1 of 1 plugins. + + # Akismet is currently deactivated + $ wp plugin toggle akismet + Plugin 'akismet' activated. + Success: Toggled 1 of 1 plugins. + + + diff --git a/commands/plugin/uninstall/index.md b/commands/plugin/uninstall/index.md index faac3fb8..c990c02a 100644 --- a/commands/plugin/uninstall/index.md +++ b/commands/plugin/uninstall/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/uninstall/ ---- \ No newline at end of file +layout: default +title: 'wp plugin uninstall' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » uninstall + +`wp plugin uninstall` - Uninstall a plugin. + +Quick links: Github issues + +
    + +### OPTIONS + +<plugin>... +: One or more plugins to uninstall. + +[\--deactivate] +: Deactivate the plugin before uninstalling. Default behavior is to warn and skip if the plugin is active. + +[\--skip-delete] +: If set, the plugin files will not be deleted. Only the uninstall procedure +will be run. + +### EXAMPLES + + $ wp plugin uninstall hello + Uninstalled and deleted 'hello' plugin. + Success: Installed 1 of 1 plugins. + + + diff --git a/commands/plugin/update-all/index.md b/commands/plugin/update-all/index.md index 8f851dc4..49c6f8a4 100644 --- a/commands/plugin/update-all/index.md +++ b/commands/plugin/update-all/index.md @@ -1,4 +1,6 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/update-all/ ---- \ No newline at end of file +layout: default +title: 'wp plugin update-all' +--- + +`wp plugin update-all` is an alias for [wp plugin update --all](/commands/plugin/update/). diff --git a/commands/plugin/update/index.md b/commands/plugin/update/index.md index 851eaaba..bba5c96a 100644 --- a/commands/plugin/update/index.md +++ b/commands/plugin/update/index.md @@ -1,4 +1,65 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/update/ ---- \ No newline at end of file +layout: default +title: 'wp plugin update' +display_global_parameters: true +--- + +[Commands](/commands/) » [plugin](/commands/plugin/) » update + +`wp plugin update` - Update one or more plugins. + +Quick links: Github issues + +
    + +### OPTIONS + +[<plugin>...] +: One or more plugins to update. + +[\--all] +: If set, all plugins that have updates will be updated. + +[\--format=<format>] +: Output summary as table or summary. Defaults to table. + +[\--version=<version>] +: If set, the plugin will be updated to the specified version. + +[\--dry-run] +: Preview which plugins would be updated. + +### EXAMPLES + + $ wp plugin update bbpress --version=dev + Installing bbPress (Development Version) + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.zip... + Unpacking the package... + Installing the plugin... + Removing the old version of the plugin... + Plugin updated successfully. + Success: Updated 1 of 2 plugins. + + $ wp plugin update --all + Enabling Maintenance mode... + Downloading update from https://downloads.wordpress.org/plugin/akismet.3.1.11.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the plugin... + Plugin updated successfully. + Downloading update from https://downloads.wordpress.org/plugin/nginx-champuru.3.2.0.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the plugin... + Plugin updated successfully. + Disabling Maintenance mode... + +------------------------+-------------+-------------+---------+ + | name | old_version | new_version | status | + +------------------------+-------------+-------------+---------+ + | akismet | 3.1.3 | 3.1.11 | Updated | + | nginx-cache-controller | 3.1.1 | 3.2.0 | Updated | + +------------------------+-------------+-------------+---------+ + Success: Updated 2 of 2 plugins. + + + diff --git a/commands/post-type/get/index.md b/commands/post-type/get/index.md index 00ea191e..19b7796e 100644 --- a/commands/post-type/get/index.md +++ b/commands/post-type/get/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/get/ ---- \ No newline at end of file +layout: default +title: 'wp post-type get' +display_global_parameters: true +--- + +[Commands](/commands/) » [post-type](/commands/post-type/) » get + +`wp post-type get` - Get details about a registered post type. + +Quick links: Github issues + +
    + +### OPTIONS + +<post-type> +: Post type slug + +[\--field=<field>] +: Instead of returning the whole taxonomy, 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 details about the 'page' post type. + $ wp post-type get page --fields=name,label,hierarchical --format=json + {"name":"page","label":"Pages","hierarchical":true} + + + diff --git a/commands/post-type/index.md b/commands/post-type/index.md index 21f74bdc..e1e3ce15 100644 --- a/commands/post-type/index.md +++ b/commands/post-type/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/ ---- \ No newline at end of file +layout: default +title: 'wp post-type' +display_global_parameters: true +--- + +[Commands](/commands/) » post-type + +`wp post-type` - Manage post types. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Get details about a post type + $ wp post-type get page --fields=name,label,hierarchical --format=json + {"name":"page","label":"Pages","hierarchical":true} + + # List post types with 'post' capability type + $ wp post-type list --capability_type=post --fields=name,public + +---------------+--------+ + | name | public | + +---------------+--------+ + | post | 1 | + | attachment | 1 | + | revision | | + | nav_menu_item | | + +---------------+--------+ + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + +
    NameDescription
    getGet details about a registered post type.
    listList registered post types.
    diff --git a/commands/post-type/list/index.md b/commands/post-type/list/index.md index cd697686..9ca65487 100644 --- a/commands/post-type/list/index.md +++ b/commands/post-type/list/index.md @@ -1,4 +1,74 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/list/ ---- \ No newline at end of file +layout: default +title: 'wp post-type list' +display_global_parameters: true +--- + +[Commands](/commands/) » [post-type](/commands/post-type/) » list + +`wp post-type list` - List registered post types. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: Filter by one or more fields (see get_post_types() first parameter for a list of available fields). + +[\--field=<field>] +: Prints the value of a single field for each post type. + +[\--fields=<fields>] +: Limit the output to specific post type fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* name +* label +* description +* hierarchical +* public +* capability_type + +There are no optionally available fields. + +### EXAMPLES + + # List registered post types + $ wp post-type list --format=csv + name,label,description,hierarchical,public,capability_type + post,Posts,,,1,post + page,Pages,,1,1,page + attachment,Media,,,1,post + revision,Revisions,,,,post + nav_menu_item,"Navigation Menu Items",,,,post + + # List post types with 'post' capability type + $ wp post-type list --capability_type=post --fields=name,public + +---------------+--------+ + | name | public | + +---------------+--------+ + | post | 1 | + | attachment | 1 | + | revision | | + | nav_menu_item | | + +---------------+--------+ + + + diff --git a/commands/post/create/index.md b/commands/post/create/index.md index f68570ef..6d552548 100644 --- a/commands/post/create/index.md +++ b/commands/post/create/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/create/ ---- \ No newline at end of file +layout: default +title: 'wp post create' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » create + +`wp post create` - Create a new post. + +Quick links: Github issues + +
    + +### OPTIONS + +[<file>] +: Read post content from <file>. If this value is present, the + `--post_content` argument will be ignored. + + Passing `-` as the filename will cause post content to + be read from STDIN. + +[\--<field>=<value>] +: Associative args for the new post. See wp_insert_post(). + +[\--edit] +: Immediately open system's editor to write or edit post content. + + If content is read from a file, from STDIN, or from the `--post_content` + argument, that text will be loaded into the editor. + +[\--porcelain] +: Output just the new post id. + +### EXAMPLES + + # Create post and schedule for future + $ wp post create --post_type=page --post_title='A future post' --post_status=future --post_date='2020-12-01 07:00:00' + Success: Created post 1921. + + # Create post with content from given file + $ wp post create ./post-content.txt --post_category=201,345 --post_title='Post from file' + Success: Created post 1922. + + + diff --git a/commands/post/delete/index.md b/commands/post/delete/index.md index 5a66451a..f911cc07 100644 --- a/commands/post/delete/index.md +++ b/commands/post/delete/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/delete/ ---- \ No newline at end of file +layout: default +title: 'wp post delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » delete + +`wp post delete` - Delete an existing post. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of posts to delete. + +[\--force] +: Skip the trash bin. + +[\--defer-term-counting] +: Recalculate term count in batch, for a performance boost. + +### EXAMPLES + + # Delete post skipping trash + $ wp post delete 123 --force + Success: Deleted post 123. + + # Delete all pages + $ wp post delete $(wp post list --post_type='page' --format=ids) + Success: Trashed post 1164. + Success: Trashed post 1186. + + # Delete all posts in the trash + $ wp post delete $(wp post list --post_status=trash --format=ids) + Success: Trashed post 1268. + Success: Trashed post 1294. + + + diff --git a/commands/post/edit/index.md b/commands/post/edit/index.md index 738c4ca5..b896367e 100644 --- a/commands/post/edit/index.md +++ b/commands/post/edit/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/edit/ ---- \ No newline at end of file +layout: default +title: 'wp post edit' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » edit + +`wp post edit` - Launch system editor to edit post content. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the post to edit. + +### EXAMPLES + + # Launch system editor to edit post + $ wp post edit 123 + + + diff --git a/commands/post/generate/index.md b/commands/post/generate/index.md index 88f61c8f..b9448be6 100644 --- a/commands/post/generate/index.md +++ b/commands/post/generate/index.md @@ -1,4 +1,84 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/generate/ ---- \ No newline at end of file +layout: default +title: 'wp post generate' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » generate + +`wp post generate` - Generate some posts. + +Quick links: Github issues + +
    + +Creates a specified number of new posts with dummy data. + +### OPTIONS + +[\--count=<number>] +: How many posts to generate? +\--- +default: 100 +\--- + +[\--post_type=<type>] +: The type of the generated posts. +\--- +default: post +\--- + +[\--post_status=<status>] +: The status of the generated posts. +\--- +default: publish +\--- + +[\--post_author=<login>] +: The author of the generated posts. +\--- +default: +\--- + +[\--post_date=<yyyy-mm-dd>] +: The date of the generated posts. Default: current date + +[\--post_content] +: If set, the command reads the post_content from STDIN. + +[\--max_depth=<number>] +: For hierarchical post types, generate child posts down to a certain depth. +\--- +default: 1 +\--- + +[\--format=<format>] +: Render output in a particular format. +\--- +default: progress +options: + - progress + - ids +\--- + +### EXAMPLES + + # Generate posts. + $ wp post generate --count=10 --post_type=page --post_date=1999-01-04 + Generating posts 100% [================================================] 0:01 / 0:04 + + # Generate posts with fetched content. + $ curl http://loripsum.net/api/5 | wp post generate --post_content --count=10 + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 100 2509 100 2509 0 0 616 0 0:00:04 0:00:04 --:--:-- 616 + Generating posts 100% [================================================] 0:01 / 0:04 + + # Add meta to every generated posts. + $ wp post generate --format=ids | xargs -d ' ' -I % wp post meta add % foo bar + Success: Added custom field. + Success: Added custom field. + Success: Added custom field. + + + diff --git a/commands/post/get/index.md b/commands/post/get/index.md index 7df99292..392c84c4 100644 --- a/commands/post/get/index.md +++ b/commands/post/get/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/get/ ---- \ No newline at end of file +layout: default +title: 'wp post get' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » get + +`wp post get` - Get details about a post. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the post to get. + +[\--field=<field>] +: Instead of returning the whole post, 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 + + # Save the post content to a file + $ wp post get 123 --field=content > file.txt + + + diff --git a/commands/post/index.md b/commands/post/index.md index 7ee724b9..9a24580b 100644 --- a/commands/post/index.md +++ b/commands/post/index.md @@ -1,4 +1,78 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/ ---- \ No newline at end of file +layout: default +title: 'wp post' +display_global_parameters: true +--- + +[Commands](/commands/) » post + +`wp post` - Manage posts. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create a new post. + $ wp post create --post_type=post --post_title='A sample post' + Success: Created post 123. + + # Update an existing post. + $ wp post update 123 --post_status=draft + Success: Updated post 123. + + # Delete an existing post. + $ wp post delete 123 + Success: Trashed post 123. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    createCreate a new post.
    deleteDelete an existing post.
    editLaunch system editor to edit post content.
    generateGenerate some posts.
    getGet details about a post.
    listGet a list of posts.
    metaManage post custom fields.
    termManage post terms.
    updateUpdate one or more existing posts.
    diff --git a/commands/post/list/index.md b/commands/post/list/index.md index f7a8663e..0e1c38a4 100644 --- a/commands/post/list/index.md +++ b/commands/post/list/index.md @@ -1,4 +1,107 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/list/ ---- \ No newline at end of file +layout: default +title: 'wp post list' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » list + +`wp post list` - Get a list of posts. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: One or more args to pass to WP_Query. + +[\--field=<field>] +: Prints the value of a single field for each post. + +[\--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 +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each post: + +* ID +* post_title +* post_name +* post_date +* post_status + +These fields are optionally available: + +* post_author +* post_date_gmt +* post_content +* post_excerpt +* comment_status +* ping_status +* post_password +* to_ping +* pinged +* post_modified +* post_modified_gmt +* post_content_filtered +* post_parent +* guid +* menu_order +* post_type +* post_mime_type +* comment_count +* filter +* url + +### EXAMPLES + + # List post + $ wp post list --field=ID + 568 + 829 + 1329 + 1695 + + # List posts in JSON + $ wp post list --post_type=post --posts_per_page=5 --format=json + [{"ID":1,"post_title":"Hello world!","post_name":"hello-world","post_date":"2015-06-20 09:00:10","post_status":"publish"},{"ID":1178,"post_title":"Markup: HTML Tags and Formatting","post_name":"markup-html-tags-and-formatting","post_date":"2013-01-11 20:22:19","post_status":"draft"}] + + # List all pages + $ wp post list --post_type=page --fields=post_title,post_status + +-------------+-------------+ + | post_title | post_status | + +-------------+-------------+ + | Sample Page | publish | + +-------------+-------------+ + + # List ids of all pages and posts + $ wp post list --post_type=page,post --format=ids + 15 25 34 37 198 + + # List given posts + $ wp post list --post__in=1,3 + +----+--------------+-------------+---------------------+-------------+ + | ID | post_title | post_name | post_date | post_status | + +----+--------------+-------------+---------------------+-------------+ + | 3 | Lorem Ipsum | lorem-ipsum | 2016-06-01 14:34:36 | publish | + | 1 | Hello world! | hello-world | 2016-06-01 14:31:12 | publish | + +----+--------------+-------------+---------------------+-------------+ + + + diff --git a/commands/post/meta/add/index.md b/commands/post/meta/add/index.md index 34e2171c..fbcfd1e4 100644 --- a/commands/post/meta/add/index.md +++ b/commands/post/meta/add/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp post meta add' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [meta](/commands/post/meta/) » add + +`wp post meta add` - Add a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/post/meta/delete/index.md b/commands/post/meta/delete/index.md index efdddaed..079d58bf 100644 --- a/commands/post/meta/delete/index.md +++ b/commands/post/meta/delete/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp post meta delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [meta](/commands/post/meta/) » delete + +`wp post meta delete` - Delete a meta field. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +[<key>] +: The name of the meta field to delete. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + +[\--all] +: Delete all meta for the object. + + + diff --git a/commands/post/meta/get/index.md b/commands/post/meta/get/index.md index cf7fe2db..cca1cf18 100644 --- a/commands/post/meta/get/index.md +++ b/commands/post/meta/get/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp post meta get' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [meta](/commands/post/meta/) » get + +`wp post meta get` - Get meta field value. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<key> +: The name of the meta field to get. + +[\--format=<format>] +: Accepted values: table, json. Default: table + + + diff --git a/commands/post/meta/index.md b/commands/post/meta/index.md index 33a9e9f8..cb0ef06a 100644 --- a/commands/post/meta/index.md +++ b/commands/post/meta/index.md @@ -1,4 +1,68 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/ ---- \ No newline at end of file +layout: default +title: 'wp post meta' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » meta + +`wp post meta` - Manage post custom fields. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set post meta + $ wp post meta set 123 _wp_page_template about.php + Success: Updated custom field '_wp_page_template'. + + # Get post meta + $ wp post meta get 123 _wp_page_template + about.php + + # Update post meta + $ wp post meta update 123 _wp_page_template contact.php + Success: Updated custom field '_wp_page_template'. + + # Delete post meta + $ wp post meta delete 123 _wp_page_template + Success: Deleted custom field. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a meta field.
    deleteDelete a meta field.
    getGet meta field value.
    listList all metadata associated with an object.
    updateUpdate a meta field.
    diff --git a/commands/post/meta/list/index.md b/commands/post/meta/list/index.md index 6ce03bbd..e73d1295 100644 --- a/commands/post/meta/list/index.md +++ b/commands/post/meta/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp post meta list' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [meta](/commands/post/meta/) » list + +`wp post meta list` - List all metadata associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +[\--keys=<keys>] +: Limit output to metadata of specific keys. + +[\--fields=<fields>] +: Limit the output to specific row fields. Defaults to id,meta_key,meta_value. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + + + diff --git a/commands/post/meta/update/index.md b/commands/post/meta/update/index.md index 777e1b71..baafb16b 100644 --- a/commands/post/meta/update/index.md +++ b/commands/post/meta/update/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp post meta update' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [meta](/commands/post/meta/) » update + +`wp post meta update` - Update a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/post/term/add/index.md b/commands/post/term/add/index.md index 254f552d..5d6c9333 100644 --- a/commands/post/term/add/index.md +++ b/commands/post/term/add/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/add/ ---- \ No newline at end of file +layout: default +title: 'wp post term add' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [term](/commands/post/term/) » add + +`wp post term add` - Add a term to an object. + +Quick links: Github issues + +
    + +Append the term to the existing set of terms on the object. + +<id> +: The ID of the object. + +<taxonomy> +: The name of the taxonomy type to be added. + +<term>... +: The slug of the term or terms to be added. + + + diff --git a/commands/post/term/index.md b/commands/post/term/index.md index 5b3e7d6f..39c2c1f4 100644 --- a/commands/post/term/index.md +++ b/commands/post/term/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/ ---- \ No newline at end of file +layout: default +title: 'wp post term' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » term + +`wp post term` - Manage post terms. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set post terms + $ wp post term set 123 test category + Success: Set terms. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a term to an object.
    listList all terms associated with an object.
    removeRemove a term from an object.
    setSet object terms.
    diff --git a/commands/post/term/list/index.md b/commands/post/term/list/index.md index 18c8993a..7486ec48 100644 --- a/commands/post/term/list/index.md +++ b/commands/post/term/list/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/list/ ---- \ No newline at end of file +layout: default +title: 'wp post term list' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [term](/commands/post/term/) » list + +`wp post term list` - List all terms associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +<taxonomy>... +: One or more taxonomies to list. + +[\--fields=<fields>] +: Limit the output to specific row fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* term_id +* name +* slug +* taxonomy + +These fields are optionally available: + +* term_taxonomy_id +* description +* term_group +* parent +* count + + + diff --git a/commands/post/term/remove/index.md b/commands/post/term/remove/index.md index e9130d5b..e1908f3c 100644 --- a/commands/post/term/remove/index.md +++ b/commands/post/term/remove/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/remove/ ---- \ No newline at end of file +layout: default +title: 'wp post term remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [term](/commands/post/term/) » remove + +`wp post term remove` - Remove a term from an object. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<taxonomy> +: The name of the term's taxonomy. + +<term>... +: The name of the term or terms to be removed from the object. + + + diff --git a/commands/post/term/set/index.md b/commands/post/term/set/index.md index b166638c..f59c66dd 100644 --- a/commands/post/term/set/index.md +++ b/commands/post/term/set/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/set/ ---- \ No newline at end of file +layout: default +title: 'wp post term set' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » [term](/commands/post/term/) » set + +`wp post term set` - Set object terms. + +Quick links: Github issues + +
    + +Replaces existing terms on the object. + +<id> +: The ID of the object. + +<taxonomy> +: The name of the taxonomy type to be updated. + +<term>... +: The slug of the term or terms to be updated. + + + diff --git a/commands/post/update/index.md b/commands/post/update/index.md index 2dbb9b18..b33488a7 100644 --- a/commands/post/update/index.md +++ b/commands/post/update/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/update/ ---- \ No newline at end of file +layout: default +title: 'wp post update' +display_global_parameters: true +--- + +[Commands](/commands/) » [post](/commands/post/) » update + +`wp post update` - Update one or more existing posts. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of posts to update. + +[<file>] +: Read post content from <file>. If this value is present, the + `--post_content` argument will be ignored. + + Passing `-` as the filename will cause post content to + be read from STDIN. + +\--<field>=<value> +: One or more fields to update. See wp_update_post(). + +[\--defer-term-counting] +: Recalculate term count in batch, for a performance boost. + +### EXAMPLES + + $ wp post update 123 --post_name=something --post_status=draft + Success: Updated post 123. + + + diff --git a/commands/rewrite/flush/index.md b/commands/rewrite/flush/index.md index 426b6b90..d84d2479 100644 --- a/commands/rewrite/flush/index.md +++ b/commands/rewrite/flush/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/flush/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite flush' +display_global_parameters: true +--- + +[Commands](/commands/) » [rewrite](/commands/rewrite/) » flush + +`wp rewrite flush` - Flush rewrite rules. + +Quick links: Github issues + +
    + +Resets WordPress' rewrite rules based on registered post types, etc. + +To regenerate a .htaccess file with WP-CLI, you'll need to add the mod_rewrite module +to your wp-cli.yml or config.yml. For example: + +``` +apache_modules: + - mod_rewrite +``` + +### OPTIONS + +[\--hard] +: Perform a hard flush - update `.htaccess` rules as well as rewrite rules in database. Works only on single site installs. + +### EXAMPLES + + $ wp rewrite flush + Success: Rewrite rules flushed. + + + diff --git a/commands/rewrite/index.md b/commands/rewrite/index.md index 55ee63e7..7d7847d4 100644 --- a/commands/rewrite/index.md +++ b/commands/rewrite/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite' +display_global_parameters: true +--- + +[Commands](/commands/) » rewrite + +`wp rewrite` - Manage rewrite rules. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Flush rewrite rules + $ wp rewrite flush + Success: Rewrite rules flushed. + + # Update permalink structure + $ wp rewrite structure '/%year%/%monthnum%/%postname%' + Success: Rewrite structure set. + + # List rewrite rules + $ wp rewrite list --format=csv + match,query,source + ^wp-json/?$,index.php?rest_route=/,other + ^wp-json/(.*)?,index.php?rest_route=/$matches[1],other + category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$,index.php?category_name=$matches[1]&feed=$matches[2],category + category/(.+?)/(feed|rdf|rss|rss2|atom)/?$,index.php?category_name=$matches[1]&feed=$matches[2],category + category/(.+?)/embed/?$,index.php?category_name=$matches[1]&embed=true,category + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    flushFlush rewrite rules.
    listGet a list of the current rewrite rules.
    structureUpdate the permalink structure.
    diff --git a/commands/rewrite/list/index.md b/commands/rewrite/list/index.md index 0be10b1b..3ca8daf4 100644 --- a/commands/rewrite/list/index.md +++ b/commands/rewrite/list/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/list/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite list' +display_global_parameters: true +--- + +[Commands](/commands/) » [rewrite](/commands/rewrite/) » list + +`wp rewrite list` - Get a list of the current rewrite rules. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--match=<url>] +: Show rewrite rules matching a particular URL. + +[\--source=<source>] +: Show rewrite rules from a particular source. + +[\--fields=<fields>] +: Limit the output to specific fields. Defaults to match,query,source. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + $ wp rewrite list --format=csv + match,query,source + ^wp-json/?$,index.php?rest_route=/,other + ^wp-json/(.*)?,index.php?rest_route=/$matches[1],other + category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$,index.php?category_name=$matches[1]&feed=$matches[2],category + category/(.+?)/(feed|rdf|rss|rss2|atom)/?$,index.php?category_name=$matches[1]&feed=$matches[2],category + category/(.+?)/embed/?$,index.php?category_name=$matches[1]&embed=true,category + + + diff --git a/commands/rewrite/structure/index.md b/commands/rewrite/structure/index.md index bc3b0ec6..d7a420e9 100644 --- a/commands/rewrite/structure/index.md +++ b/commands/rewrite/structure/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/structure/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite structure' +display_global_parameters: true +--- + +[Commands](/commands/) » [rewrite](/commands/rewrite/) » structure + +`wp rewrite structure` - Update the permalink structure. + +Quick links: Github issues + +
    + +Sets the post permalink structure to the specified pattern. + +To regenerate a .htaccess file with WP-CLI, you'll need to add +the mod_rewrite module to your [WP-CLI config](http://wp-cli.org/config/). +For example: + +``` +apache_modules: + - mod_rewrite +``` + +### OPTIONS + +<permastruct> +: The new permalink structure to apply. + +[\--category-base=<base>] +: Set the base for category permalinks, i.e. '/category/'. + +[\--tag-base=<base>] +: Set the base for tag permalinks, i.e. '/tag/'. + +[\--hard] +: Perform a hard flush - update `.htaccess` rules as well as rewrite rules in database. + +### EXAMPLES + + $ wp rewrite structure '/%year%/%monthnum%/%postname%' + Success: Rewrite structure set. + + + diff --git a/commands/role/create/index.md b/commands/role/create/index.md index 3f5f1c4c..f29b87ce 100644 --- a/commands/role/create/index.md +++ b/commands/role/create/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/create/ ---- \ No newline at end of file +layout: default +title: 'wp role create' +display_global_parameters: true +--- + +[Commands](/commands/) » [role](/commands/role/) » create + +`wp role create` - Create a new role. + +Quick links: Github issues + +
    + +### OPTIONS + +<role-key> +: The internal name of the role. + +<role-name> +: The publicly visible name of the role. + +[\--clone=<role>] +: Clone capabilities from an existing role. + +### EXAMPLES + + # Create role for Approver. + $ wp role create approver Approver + Success: Role with key 'approver' created. + + # Create role for Product Administrator. + $ wp role create productadmin "Product Administrator" + Success: Role with key 'productadmin' created. + + + diff --git a/commands/role/delete/index.md b/commands/role/delete/index.md index 4ad63ee2..6b6a24a7 100644 --- a/commands/role/delete/index.md +++ b/commands/role/delete/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/delete/ ---- \ No newline at end of file +layout: default +title: 'wp role delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [role](/commands/role/) » delete + +`wp role delete` - Delete an existing role. + +Quick links: Github issues + +
    + +### OPTIONS + +<role-key> +: The internal name of the role. + +### EXAMPLES + + # Delete approver role. + $ wp role delete approver + Success: Role with key 'approver' deleted. + + # Delete productadmin role. + wp role delete productadmin + Success: Role with key 'productadmin' deleted. + + + diff --git a/commands/role/exists/index.md b/commands/role/exists/index.md index ade85b2f..e171f4cb 100644 --- a/commands/role/exists/index.md +++ b/commands/role/exists/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/exists/ ---- \ No newline at end of file +layout: default +title: 'wp role exists' +display_global_parameters: true +--- + +[Commands](/commands/) » [role](/commands/role/) » exists + +`wp role exists` - Check if a role exists. + +Quick links: Github issues + +
    + +Exits with return code 0 if the role exists, 1 if it does not. + +### OPTIONS + +<role-key> +: The internal name of the role. + +### EXAMPLES + + # Check if a role exists. + $ wp role exists editor + Success: Role with ID 'editor' exists. + + + diff --git a/commands/role/index.md b/commands/role/index.md index ac7fae3c..0faeab94 100644 --- a/commands/role/index.md +++ b/commands/role/index.md @@ -1,4 +1,75 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/ ---- \ No newline at end of file +layout: default +title: 'wp role' +display_global_parameters: true +--- + +[Commands](/commands/) » role + +`wp role` - Manage user roles. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List roles. + $ wp role list --fields=role --format=csv + role + administrator + editor + author + contributor + subscriber + + # Check to see if a role exists. + $ wp role exists editor + Success: Role with ID 'editor' exists. + + # Create a new role. + $ wp role create approver Approver + Success: Role with key 'approver' created. + + # Delete an existing role. + $ wp role delete approver + Success: Role with key 'approver' deleted. + + # Reset existing roles to their default capabilities. + $ wp role reset administrator author contributor + Success: Reset 3/3 roles. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    createCreate a new role.
    deleteDelete an existing role.
    existsCheck if a role exists.
    listList all roles.
    resetReset any default role to default capabilities.
    diff --git a/commands/role/list/index.md b/commands/role/list/index.md index 2badf624..019fb259 100644 --- a/commands/role/list/index.md +++ b/commands/role/list/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/list/ ---- \ No newline at end of file +layout: default +title: 'wp role list' +display_global_parameters: true +--- + +[Commands](/commands/) » [role](/commands/role/) » list + +`wp role list` - List all roles. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each role: + +* name +* role + +There are no optional fields. + +### EXAMPLES + + # List roles. + $ wp role list --fields=role --format=csv + role + administrator + editor + author + contributor + subscriber + + + diff --git a/commands/role/reset/index.md b/commands/role/reset/index.md index 5227781d..926b1440 100644 --- a/commands/role/reset/index.md +++ b/commands/role/reset/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/reset/ ---- \ No newline at end of file +layout: default +title: 'wp role reset' +display_global_parameters: true +--- + +[Commands](/commands/) » [role](/commands/role/) » reset + +`wp role reset` - Reset any default role to default capabilities. + +Quick links: Github issues + +
    + +### OPTIONS + +[<role-key>...] +: The internal name of one or more roles to reset. + +[\--all] +: If set, all default roles will be reset. + +### EXAMPLES + + # Reset role. + $ wp role reset administrator author contributor + Success: Reset 1/3 roles. + + # Reset all default roles. + $ wp role reset --all + Success: All default roles reset. + + + diff --git a/commands/scaffold/_s/index.md b/commands/scaffold/_s/index.md index e89885cb..9bad9e85 100644 --- a/commands/scaffold/_s/index.md +++ b/commands/scaffold/_s/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/_s/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold _s' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » _s + +`wp scaffold _s` - Generate starter code for a theme based on _s. + +Quick links: Github issues + +
    + +See the [Underscores website](http://underscores.me/) for more details. + +### OPTIONS + +<slug> +: The slug for the new theme, used for prefixing functions. + +[\--activate] +: Activate the newly downloaded theme. + +[\--enable-network] +: Enable the newly downloaded theme for the entire network. + +[\--theme_name=<title>] +: What to put in the 'Theme Name:' header in 'style.css'. + +[\--author=<full-name>] +: What to put in the 'Author:' header in 'style.css'. + +[\--author_uri=<uri>] +: What to put in the 'Author URI:' header in 'style.css'. + +[\--sassify] +: Include stylesheets as SASS. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate a theme with name "Sample Theme" and author "John Doe" + $ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe" + Success: Created theme 'Sample Theme'. + + + diff --git a/commands/scaffold/child-theme/index.md b/commands/scaffold/child-theme/index.md index cde98b69..d2447d47 100644 --- a/commands/scaffold/child-theme/index.md +++ b/commands/scaffold/child-theme/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/child-theme/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold child-theme' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » child-theme + +`wp scaffold child-theme` - Generate child theme based on an existing theme. + +Quick links: Github issues + +
    + +Creates a child theme folder with `functions.php` and `style.css` files. + +### OPTIONS + +<slug> +: The slug for the new child theme. + +\--parent_theme=<slug> +: What to put in the 'Template:' header in 'style.css'. + +[\--theme_name=<title>] +: What to put in the 'Theme Name:' header in 'style.css'. + +[\--author=<full-name>] +: What to put in the 'Author:' header in 'style.css'. + +[\--author_uri=<uri>] +: What to put in the 'Author URI:' header in 'style.css'. + +[\--theme_uri=<uri>] +: What to put in the 'Theme URI:' header in 'style.css'. + +[\--activate] +: Activate the newly created child theme. + +[\--enable-network] +: Enable the newly created child theme for the entire network. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate a 'sample-theme' child theme based on TwentySixteen + $ wp scaffold child-theme sample-theme --parent_theme=twentysixteen + Success: Created '/var/www/example.com/public_html/wp-content/themes/sample-theme'. + + + diff --git a/commands/scaffold/index.md b/commands/scaffold/index.md index 1cdd0597..6ecba3be 100644 --- a/commands/scaffold/index.md +++ b/commands/scaffold/index.md @@ -1,4 +1,71 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold' +display_global_parameters: true +--- + +[Commands](/commands/) » scaffold + +`wp scaffold` - Generate code for post types, taxonomies, plugins, child themes. etc. + +Quick links: Github issues + +
    + +### EXAMPLES + + # 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 + $ 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 + $ 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 + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    _sGenerate starter code for a theme based on _s.
    child-themeGenerate child theme based on an existing theme.
    pluginGenerate starter code for a plugin.
    plugin-testsGenerate files needed for running PHPUnit tests in a plugin.
    post-typeGenerate PHP code for registering a custom post type.
    taxonomyGenerate PHP code for registering a custom taxonomy.
    theme-testsGenerate files needed for running PHPUnit tests in a theme.
    diff --git a/commands/scaffold/plugin-tests/index.md b/commands/scaffold/plugin-tests/index.md index 34242ec4..16e23e89 100644 --- a/commands/scaffold/plugin-tests/index.md +++ b/commands/scaffold/plugin-tests/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/plugin-tests/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold plugin-tests' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » plugin-tests + +`wp scaffold plugin-tests` - Generate files needed for running PHPUnit tests in a plugin. + +Quick links: Github issues + +
    + +The following files are generated by default: + +* `phpunit.xml.dist` is the configuration file for PHPUnit. +* `.travis.yml` is the configuration file for Travis CI. Use `--ci=<provider>` to select a different service. +* `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. +* `tests/bootstrap.php` is the file that makes the current plugin active when running the test suite. +* `tests/test-sample.php` is a sample file containing the actual tests. +* `phpcs.ruleset.xml` is a collenction of PHP_CodeSniffer rules. + +Learn more from the [plugin unit tests documentation](http://wp-cli.org/docs/plugin-unit-tests/). + +### ENVIRONMENT + +The `tests/bootstrap.php` file looks for the WP_TESTS_DIR environment +variable. + +### OPTIONS + +[<plugin>] +: The name of the plugin to generate test files for. + +[\--dir=<dirname>] +: Generate test files for a non-standard plugin path. If no plugin slug is specified, the directory name is used. + +[\--ci=<provider>] +: Choose a configuration file for a continuous integration provider. +\--- +default: travis +options: + - travis + - circle + - gitlab +\--- + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate unit test files for plugin 'sample-plugin'. + $ wp scaffold plugin-tests sample-plugin + Success: Created test files. + + + diff --git a/commands/scaffold/plugin/index.md b/commands/scaffold/plugin/index.md index d11fe36c..50396fbf 100644 --- a/commands/scaffold/plugin/index.md +++ b/commands/scaffold/plugin/index.md @@ -1,4 +1,86 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/plugin/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold plugin' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » plugin + +`wp scaffold plugin` - Generate starter code for a plugin. + +Quick links: Github issues + +
    + +The following files are always generated: + +* `plugin-slug.php` is the main PHP plugin file. +* `readme.txt` is the readme file for the plugin. +* `package.json` needed by NPM holds various metadata relevant to the project. Packages: `grunt`, `grunt-wp-i18n` and `grunt-wp-readme-to-markdown`. +* `Gruntfile.js` is the JS file containing Grunt tasks. Tasks: `i18n` containing `addtextdomain` and `makepot`, `readme` containing `wp_readme_to_markdown`. +* `.editorconfig` is the configuration file for Editor. +* `.gitignore` tells which files (or patterns) git should ignore. +* `.distignore` tells which files and folders should be ignored in distribution. + +The following files are also included unless the `--skip-tests` is used: + +* `phpunit.xml.dist` is the configuration file for PHPUnit. +* `.travis.yml` is the configuration file for Travis CI. Use `--ci=<provider>` to select a different service. +* `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. +* `tests/bootstrap.php` is the file that makes the current plugin active when running the test suite. +* `tests/test-sample.php` is a sample file containing test cases. +* `phpcs.ruleset.xml` is a collenction of PHP_CodeSniffer rules. + +### OPTIONS + +<slug> +: The internal name of the plugin. + +[\--dir=<dirname>] +: Put the new plugin in some arbitrary directory path. Plugin directory will be path plus supplied slug. + +[\--plugin_name=<title>] +: What to put in the 'Plugin Name:' header. + +[\--plugin_description=<description>] +: What to put in the 'Description:' header. + +[\--plugin_author=<author>] +: What to put in the 'Author:' header. + +[\--plugin_author_uri=<url>] +: What to put in the 'Author URI:' header. + +[\--plugin_uri=<url>] +: What to put in the 'Plugin URI:' header. + +[\--skip-tests] +: Don't generate files for unit testing. + +[\--ci=<provider>] +: Choose a configuration file for a continuous integration provider. +\--- +default: travis +options: + - travis + - circle + - gitlab +\--- + +[\--activate] +: Activate the newly generated plugin. + +[\--activate-network] +: Network activate the newly generated plugin. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + $ wp scaffold plugin sample-plugin + Success: Created plugin files. + Success: Created test files. + + + diff --git a/commands/scaffold/post-type/index.md b/commands/scaffold/post-type/index.md index c0adab84..5c3432cc 100644 --- a/commands/scaffold/post-type/index.md +++ b/commands/scaffold/post-type/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/post-type/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold post-type' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » post-type + +`wp scaffold post-type` - Generate PHP code for registering a custom post type. + +Quick links: Github issues + +
    + +### OPTIONS + +<slug> +: The internal name of the post type. + +[\--label=<label>] +: The text used to translate the update messages. + +[\--textdomain=<textdomain>] +: The textdomain to use for the labels. + +[\--dashicon=<dashicon>] +: The dashicon to use in the menu. + +[\--theme] +: Create a file in the active theme directory, instead of sending to +STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. + +[\--plugin=<plugin>] +: Create a file in the given plugin's directory, instead of sending to STDOUT. + +[\--raw] +: Just generate the `register_post_type()` call and nothing else. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate a 'movie' post type for the 'simple-life' theme + $ wp scaffold post-type movie --label=Movie --theme=simple-life + Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'. + + + diff --git a/commands/scaffold/taxonomy/index.md b/commands/scaffold/taxonomy/index.md index 521a39af..d427b4d1 100644 --- a/commands/scaffold/taxonomy/index.md +++ b/commands/scaffold/taxonomy/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/taxonomy/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold taxonomy' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » taxonomy + +`wp scaffold taxonomy` - Generate PHP code for registering a custom taxonomy. + +Quick links: Github issues + +
    + +### OPTIONS + +<slug> +: The internal name of the taxonomy. + +[\--post_types=<post-types>] +: Post types to register for use with the taxonomy. + +[\--label=<label>] +: The text used to translate the update messages. + +[\--textdomain=<textdomain>] +: The textdomain to use for the labels. + +[\--theme] +: Create a file in the active theme directory, instead of sending to +STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. + +[\--plugin=<plugin>] +: Create a file in the given plugin's directory, instead of sending to STDOUT. + +[\--raw] +: Just generate the `register_taxonomy()` call and nothing else. + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate PHP code for registering a custom taxonomy and save in a file + $ wp scaffold taxonomy venue --post_types=event,presentation > taxonomy.php + + + diff --git a/commands/scaffold/theme-tests/index.md b/commands/scaffold/theme-tests/index.md index 7c2cf5ef..ddbaf69e 100644 --- a/commands/scaffold/theme-tests/index.md +++ b/commands/scaffold/theme-tests/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/theme-tests/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold theme-tests' +display_global_parameters: true +--- + +[Commands](/commands/) » [scaffold](/commands/scaffold/) » theme-tests + +`wp scaffold theme-tests` - Generate files needed for running PHPUnit tests in a theme. + +Quick links: Github issues + +
    + +The following files are generated by default: + +* `phpunit.xml.dist` is the configuration file for PHPUnit. +* `.travis.yml` is the configuration file for Travis CI. Use `--ci=<provider>` to select a different service. +* `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. +* `tests/bootstrap.php` is the file that makes the current theme active when running the test suite. +* `tests/test-sample.php` is a sample file containing the actual tests. +* `phpcs.ruleset.xml` is a collenction of PHP_CodeSniffer rules. + +Learn more from the [plugin unit tests documentation](http://wp-cli.org/docs/plugin-unit-tests/). + +### ENVIRONMENT + +The `tests/bootstrap.php` file looks for the WP_TESTS_DIR environment +variable. + +### OPTIONS + +[<theme>] +: The name of the theme to generate test files for. + +[\--dir=<dirname>] +: Generate test files for a non-standard theme path. If no theme slug is specified, the directory name is used. + +[\--ci=<provider>] +: Choose a configuration file for a continuous integration provider. +\--- +default: travis +options: + - travis + - circle + - gitlab +\--- + +[\--force] +: Overwrite files that already exist. + +### EXAMPLES + + # Generate unit test files for theme 'twentysixteenchild'. + $ wp scaffold theme-tests twentysixteenchild + Success: Created test files. + + + diff --git a/commands/search-replace/index.md b/commands/search-replace/index.md index aa13a254..bbd922ef 100644 --- a/commands/search-replace/index.md +++ b/commands/search-replace/index.md @@ -1,4 +1,115 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/search-replace/ ---- \ No newline at end of file +layout: default +title: 'wp search-replace' +display_global_parameters: true +--- + +[Commands](/commands/) » search-replace + +`wp search-replace` - Search/replace strings in the database. + +Quick links: Github issues + +
    + +Searches through all rows in a selection of tables and replaces +appearances of the first string with the second string. + +By default, the command uses tables registered to the $wpdb object. On +multisite, this will just be the tables for the current site unless +\--network is specified. + +Search/replace intelligently handles PHP serialized data, and does not +change primary key values. + +### OPTIONS + +<old> +: A string to search for within the database. + +<new> +: Replace instances of the first string with this new string. + +[<table>...] +: List of database tables to restrict the replacement to. Wildcards are +supported, e.g. `'wp_*options'` or `'wp_post*'`. + +[\--dry-run] +: Run the entire search/replace operation and show report, but don't save +changes to the database. + +[\--network] +: Search/replace through all the tables registered to $wpdb in a +multisite install. + +[\--all-tables-with-prefix] +: Enable replacement on any tables that match the table prefix even if +not registered on $wpdb. + +[\--all-tables] +: Enable replacement on ALL tables in the database, regardless of the +prefix, and even if not registered on $wpdb. Overrides --network +and --all-tables-with-prefix. + +[\--export[=<file>]] +: Write transformed data as SQL file instead of saving replacements to +the database. If <file> is not supplied, will output to STDOUT. + +[\--export_insert_size=<rows>] +: Define number of rows in single INSERT statement when doing SQL export. +You might want to change this depending on your database configuration +(e.g. if you need to do fewer queries). Default: 50 + +[\--skip-columns=<columns>] +: Do not perform the replacement on specific columns. Use commas to +specify multiple columns. + +[\--include-columns=<columns>] +: Perform the replacement on specific columns. Use commas to +specify multiple columns. + +[\--precise] +: Force the use of PHP (instead of SQL) which is more thorough, +but slower. + +[\--recurse-objects] +: Enable recursing into objects to replace strings. Defaults to true; +pass --no-recurse-objects to disable. + +[\--verbose] +: Prints rows to the console as they're updated. + +[\--regex] +: Runs the search using a regular expression (without delimiters). +Warning: search-replace will take about 15-20x longer when using --regex. + +[\--regex-flags=<regex-flags>] +: Pass PCRE modifiers to regex search-replace (e.g. 'i' for case-insensitivity). + +### EXAMPLES + + # Search and replace but skip one column + $ wp search-replace 'http://example.dev' 'http://example.com' --skip-columns=guid + + # Run search/replace operation but dont save in database + $ wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms --dry-run + + # Run case-insensitive regex search/replace operation (slow) + $ wp search-replace '\[foo id="([0-9]+)"' '[bar id="\1"' --regex --regex-flags='i' + + # Turn your production multisite database into a local dev database + $ wp search-replace --url=example.com example.com example.dev 'wp_*options' wp_blogs + + # Search/replace to a SQL file without transforming the database + $ wp search-replace foo bar --export=database.sql + + # Bash script: Search/replace production to development url (multisite compatible) + #!/bin/bash + if $(wp --url=http://example.com core is-installed --network); then + wp search-replace --url=http://example.com 'http://example.com' 'http://example.dev' --recurse-objects --network --skip-columns=guid + else + wp search-replace 'http://example.com' 'http://example.dev' --recurse-objects --skip-columns=guid + fi + + + diff --git a/commands/server/index.md b/commands/server/index.md index 72286e3b..7044be3f 100644 --- a/commands/server/index.md +++ b/commands/server/index.md @@ -1,4 +1,63 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/server/ ---- \ No newline at end of file +layout: default +title: 'wp server' +display_global_parameters: true +--- + +[Commands](/commands/) » server + +`wp server` - Launch PHP's built-in web server for this specific WordPress installation. + +Quick links: Github issues + +
    + +Uses `php -S` to launch a web server serving the WordPress webroot. +<http://php.net/manual/en/features.commandline.webserver.php> + +### OPTIONS + +[\--host=<host>] +: The hostname to bind the server to. +\--- +default: localhost +\--- + +[\--port=<port>] +: The port number to bind the server to. +\--- +default: 8080 +\--- + +[\--docroot=<path>] +: The path to use as the document root. If the path global parameter is +set, the default value is it. + +[\--config=<file>] +: Configure the server with a specific .ini file. + +### EXAMPLES + + # Make the instance available on any address (with port 8080) + $ wp server --host=0.0.0.0 + PHP 5.6.9 Development Server started at Tue May 24 01:27:11 2016 + Listening on http://0.0.0.0:8080 + Document root is / + Press Ctrl-C to quit. + + # Run on port 80 (for multisite) + $ sudo wp server --host=localhost.localdomain --port=80 + PHP 5.6.9 Development Server started at Tue May 24 01:30:06 2016 + Listening on http://localhost1.localdomain1:8080 + Document root is / + Press Ctrl-C to quit. + + # Configure the server with a specific .ini file + $ wp server --config=development.ini + PHP 7.0.9 Development Server started at Mon Aug 22 12:09:04 2016 + Listening on http://localhost:8080 + Document root is / + Press Ctrl-C to quit. + + + diff --git a/commands/shell/index.md b/commands/shell/index.md index 2891bd1b..99dbc493 100644 --- a/commands/shell/index.md +++ b/commands/shell/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/shell/ ---- \ No newline at end of file +layout: default +title: 'wp shell' +display_global_parameters: true +--- + +[Commands](/commands/) » shell + +`wp shell` - Interactive PHP console. + +Quick links: Github issues + +
    + +`wp shell` allows you to evaluate PHP statements and expressions +interactively, from within a WordPress environment. Type a bit of code, +hit enter, and see the code execute right before you. Because WordPress +is loaded, you have access to all the functions, classes and globals +that you can use within a WordPress plugin, for example. + +### OPTIONS + +[\--basic] +: Start in fail-safe mode, even if Boris is available. + +### EXAMPLES + + # Call get_bloginfo() to get the name of the site. + $ wp shell + wp> get_bloginfo( 'name' ); + => string(6) "WP-CLI" + + + diff --git a/commands/sidebar/index.md b/commands/sidebar/index.md index 404346c8..a0b5cded 100644 --- a/commands/sidebar/index.md +++ b/commands/sidebar/index.md @@ -1,4 +1,40 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/sidebar/ ---- \ No newline at end of file +layout: default +title: 'wp sidebar' +display_global_parameters: true +--- + +[Commands](/commands/) » sidebar + +`wp sidebar` - Manage sidebars. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List sidebars + $ wp sidebar list --fields=name,id --format=csv + name,id + "Widget Area",sidebar-1 + "Inactive Widgets",wp_inactive_widgets + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
    NameDescription
    listList registered sidebars.
    diff --git a/commands/sidebar/list/index.md b/commands/sidebar/list/index.md index fc8ce0f8..26c7a394 100644 --- a/commands/sidebar/list/index.md +++ b/commands/sidebar/list/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/sidebar/list/ ---- \ No newline at end of file +layout: default +title: 'wp sidebar list' +display_global_parameters: true +--- + +[Commands](/commands/) » [sidebar](/commands/sidebar/) » list + +`wp sidebar list` - List registered sidebars. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - ids + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each sidebar: + +* name +* id +* description + +These fields are optionally available: + +* class +* before_widget +* after_widget +* before_title +* after_title + +### EXAMPLES + + $ wp sidebar list --fields=name,id --format=csv + name,id + "Widget Area",sidebar-1 + "Inactive Widgets",wp_inactive_widgets + + + diff --git a/commands/site/activate/index.md b/commands/site/activate/index.md index 4191d9d7..c60bd10d 100644 --- a/commands/site/activate/index.md +++ b/commands/site/activate/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/activate/ ---- \ No newline at end of file +layout: default +title: 'wp site activate' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » activate + +`wp site activate` - Activate one or more sites. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to activate. + +### EXAMPLES + + $ wp site activate 123 + Success: Site 123 activated. + + + diff --git a/commands/site/archive/index.md b/commands/site/archive/index.md index 9260e815..e632793c 100644 --- a/commands/site/archive/index.md +++ b/commands/site/archive/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/archive/ ---- \ No newline at end of file +layout: default +title: 'wp site archive' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » archive + +`wp site archive` - Archive one or more sites. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to archive. + +### EXAMPLES + + $ wp site archive 123 + Success: Site 123 archived. + + + diff --git a/commands/site/create/index.md b/commands/site/create/index.md index 3502b1a0..5032b4cd 100644 --- a/commands/site/create/index.md +++ b/commands/site/create/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/create/ ---- \ No newline at end of file +layout: default +title: 'wp site create' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » create + +`wp site create` - Create a site in a multisite install. + +Quick links: Github issues + +
    + +### OPTIONS + +\--slug=<slug> +: Path for the new site. Subdomain on subdomain installs, directory on subdirectory installs. + +[\--title=<title>] +: Title of the new site. Default: prettified slug. + +[\--email=<email>] +: Email for Admin user. User will be created if none exists. Assignement to Super Admin if not included. + +[\--network_id=<network-id>] +: Network to associate new site with. Defaults to current network (typically 1). + +[\--private] +: If set, the new site will be non-public (not indexed) + +[\--porcelain] +: If set, only the site id will be output on success. + +### EXAMPLES + + $ wp site create --slug=example + Success: Site 3 created: http://www.example.com/example/ + + + diff --git a/commands/site/deactivate/index.md b/commands/site/deactivate/index.md index 868cde0a..45fb78b3 100644 --- a/commands/site/deactivate/index.md +++ b/commands/site/deactivate/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/deactivate/ ---- \ No newline at end of file +layout: default +title: 'wp site deactivate' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » deactivate + +`wp site deactivate` - Deactivate one or more sites. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to deactivate. + +### EXAMPLES + + $ wp site deactivate 123 + Success: Site 123 deactivated. + + + diff --git a/commands/site/delete/index.md b/commands/site/delete/index.md index 312f171c..54081263 100644 --- a/commands/site/delete/index.md +++ b/commands/site/delete/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/delete/ ---- \ No newline at end of file +layout: default +title: 'wp site delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » delete + +`wp site delete` - Delete a site in a multisite install. + +Quick links: Github issues + +
    + +### OPTIONS + +[<site-id>] +: The id of the site to delete. If not provided, you must set the --slug parameter. + +[\--slug=<slug>] +: Path of the blog to be deleted. Subdomain on subdomain installs, directory on subdirectory installs. + +[\--yes] +: Answer yes to the confirmation message. + +[\--keep-tables] +: Delete the blog from the list, but don't drop it's tables. + +### EXAMPLES + + $ wp site delete 123 + Are you sure you want to delete the http://www.example.com/example site? [y/n] y + Success: The site at 'http://www.example.com/example' was deleted. + + + diff --git a/commands/site/empty/index.md b/commands/site/empty/index.md index 3017c434..537673b8 100644 --- a/commands/site/empty/index.md +++ b/commands/site/empty/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/empty/ ---- \ No newline at end of file +layout: default +title: 'wp site empty' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » empty + +`wp site empty` - Empty a site of its content (posts, comments, terms, and meta). + +Quick links: Github issues + +
    + +Truncates posts, comments, and terms tables to empty a site of its +content. Doesn't affect site configuration (options) or users. + +If running a persistent object cache, make sure to flush the cache +after emptying the site, as the cache values will be invalid otherwise. + +To also empty custom database tables, you'll need to hook into command +execution: + +``` +WP_CLI::add_hook( 'after_invoke:site empty', function(){ + global $wpdb; + foreach( array( 'p2p', 'p2pmeta' ) as $table ) { + $table = $wpdb->$table; + $wpdb->query( "TRUNCATE $table" ); + } +}); +``` + +### OPTIONS + +[\--uploads] +: Also delete *all* files in the site's in the uploads directory. + +[\--yes] +: Proceed to empty the site without a confirmation prompt. + +### EXAMPLES + + $ wp site empty + Are you sure you want to empty the site at http://www.example.com of all posts, comments, and terms? [y/n] y + Success: The site at 'http://www.example.com' was emptied. + + + diff --git a/commands/site/index.md b/commands/site/index.md index 39ca96ed..f96bd6a5 100644 --- a/commands/site/index.md +++ b/commands/site/index.md @@ -1,4 +1,88 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/ ---- \ No newline at end of file +layout: default +title: 'wp site' +display_global_parameters: true +--- + +[Commands](/commands/) » site + +`wp site` - Perform site-wide operations. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create site + $ wp site create --slug=example + Success: Site 3 created: www.example.com/example/ + + # Output a simple list of site URLs + $ wp site list --field=url + http://www.example.com/ + http://www.example.com/subdir/ + + # Delete site + $ wp site delete 123 + Are you sure you want to delete the 'http://www.example.com/example' site? [y/n] y + Success: The site at 'http://www.example.com/example' was deleted. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    activateActivate one or more sites.
    archiveArchive one or more sites.
    createCreate a site in a multisite install.
    deactivateDeactivate one or more sites.
    deleteDelete a site in a multisite install.
    emptyEmpty a site of its content (posts, comments, terms, and meta).
    listList all sites in a multisite install.
    optionManage site options in a multisite install.
    spamMark one or more sites as spam.
    unarchiveUnarchive one or more sites.
    unspamRemove one or more sites from spam.
    diff --git a/commands/site/list/index.md b/commands/site/list/index.md index 821357c8..043a8f1c 100644 --- a/commands/site/list/index.md +++ b/commands/site/list/index.md @@ -1,4 +1,75 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/list/ ---- \ No newline at end of file +layout: default +title: 'wp site list' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » list + +`wp site list` - List all sites in a multisite install. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--network=<id>] +: The network to which the sites belong. + +[\--<field>=<value>] +: Filter by one or more fields (see "Available Fields" section). However, +'url' isn't an available filter, because it's created from domain + path. + +[\--site__in=<value>] +: Only list the sites with these blog_id values (comma-separated). + +[\--field=<field>] +: Prints the value of a single field for each site. + +[\--fields=<fields>] +: Comma-separated list of fields to show. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - count + - ids + - json + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each site: + +* blog_id +* url +* last_updated +* registered + +These fields are optionally available: + +* site_id +* domain +* path +* public +* archived +* mature +* spam +* deleted +* lang_id + +### EXAMPLES + + # Output a simple list of site URLs + $ wp site list --field=url + http://www.example.com/ + http://www.example.com/subdir/ + + + diff --git a/commands/site/option/add/index.md b/commands/site/option/add/index.md index e41ddbf6..db2c458c 100644 --- a/commands/site/option/add/index.md +++ b/commands/site/option/add/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/add/ ---- \ No newline at end of file +layout: default +title: 'wp site option add' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » [option](/commands/site/option/) » add + +`wp site option add` - Add a site option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: The name of the site option to add. + +[<value>] +: The value of the site option to add. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Create a site option by reading a JSON file + $ wp site option add my_option --format=json < config.json + Success: Added 'my_option' site option. + + + diff --git a/commands/site/option/delete/index.md b/commands/site/option/delete/index.md index 2907d7bd..8998de05 100644 --- a/commands/site/option/delete/index.md +++ b/commands/site/option/delete/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/delete/ ---- \ No newline at end of file +layout: default +title: 'wp site option delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » [option](/commands/site/option/) » delete + +`wp site option delete` - Delete a site option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: Key for the site option. + +### EXAMPLES + + $ wp site option delete my_option + Success: Deleted 'my_option' site option. + + + diff --git a/commands/site/option/get/index.md b/commands/site/option/get/index.md index e444530c..0bb9a888 100644 --- a/commands/site/option/get/index.md +++ b/commands/site/option/get/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/get/ ---- \ No newline at end of file +layout: default +title: 'wp site option get' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » [option](/commands/site/option/) » get + +`wp site option get` - Get a site option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: Key for the site option. + +[\--format=<format>] +: Get value in a particular format. +\--- +default: var_export +options: + - var_export + - json + - yaml +\--- + +### EXAMPLES + + # Get site upload filetypes + $ wp site option get upload_filetypes + jpg jpeg png gif mov avi mpg + + + diff --git a/commands/site/option/index.md b/commands/site/option/index.md index ed1a6966..c70aa539 100644 --- a/commands/site/option/index.md +++ b/commands/site/option/index.md @@ -1,4 +1,68 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/ ---- \ No newline at end of file +layout: default +title: 'wp site option' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » option + +`wp site option` - Manage site options in a multisite install. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Get site registration + $ wp site option get registration + none + + # Add site option + $ wp site option add my_option foobar + Success: Added 'my_option' site option. + + # Update site option + $ wp site option update my_option '{"foo": "bar"}' --format=json + Success: Updated 'my_option' site option. + + # Delete site option + $ wp site option delete my_option + Success: Deleted 'my_option' site option. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a site option.
    deleteDelete a site option.
    getGet a site option.
    listList site options.
    updateUpdate a site option.
    diff --git a/commands/site/option/list/index.md b/commands/site/option/list/index.md index d206e838..128f38ff 100644 --- a/commands/site/option/list/index.md +++ b/commands/site/option/list/index.md @@ -1,4 +1,66 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/list/ ---- \ No newline at end of file +layout: default +title: 'wp site option list' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » [option](/commands/site/option/) » list + +`wp site option list` - List site options. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--search=<pattern>] +: Use wildcards ( * and ? ) to match option name. + +[\--site_id=<id>] +: Limit options to those of a particular site id. + +[\--field=<field>] +: Prints the value of a single field. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: The serialization format for the value. total_bytes displays the total size of matching options in bytes. +\--- +default: table +options: + - table + - json + - csv + - count + - yaml + - total_bytes +\--- + +### AVAILABLE FIELDS + +This field will be displayed by default for each matching option: + +* meta_key +* meta_value + +These fields are optionally available: + +* meta_id +* site_id +* size_bytes + +### EXAMPLES + + # List all site options begining with "i2f_" + $ wp site option list --search="i2f_*" + +-------------+--------------+ + | meta_key | meta_value | + +-------------+--------------+ + | i2f_version | 0.1.0 | + +-------------+--------------+ + + + diff --git a/commands/site/option/update/index.md b/commands/site/option/update/index.md index c0733251..532f21f4 100644 --- a/commands/site/option/update/index.md +++ b/commands/site/option/update/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/update/ ---- \ No newline at end of file +layout: default +title: 'wp site option update' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » [option](/commands/site/option/) » update + +`wp site option update` - Update a site option. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: The name of the site option to update. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + +### EXAMPLES + + # Update a site option by reading from a file + $ wp site option update my_option < value.txt + Success: Updated 'my_option' site option. + + + diff --git a/commands/site/spam/index.md b/commands/site/spam/index.md index 20785019..4fd2d180 100644 --- a/commands/site/spam/index.md +++ b/commands/site/spam/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/spam/ ---- \ No newline at end of file +layout: default +title: 'wp site spam' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » spam + +`wp site spam` - Mark one or more sites as spam. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to be marked as spam. + +### EXAMPLES + + $ wp site spam 123 + Success: Site 123 marked as spam. + + + diff --git a/commands/site/unarchive/index.md b/commands/site/unarchive/index.md index e328a315..cee3893e 100644 --- a/commands/site/unarchive/index.md +++ b/commands/site/unarchive/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/unarchive/ ---- \ No newline at end of file +layout: default +title: 'wp site unarchive' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » unarchive + +`wp site unarchive` - Unarchive one or more sites. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to unarchive. + +### EXAMPLES + + $ wp site unarchive 123 + Success: Site 123 unarchived. + + + diff --git a/commands/site/unspam/index.md b/commands/site/unspam/index.md index a1631b11..df7c084f 100644 --- a/commands/site/unspam/index.md +++ b/commands/site/unspam/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/unspam/ ---- \ No newline at end of file +layout: default +title: 'wp site unspam' +display_global_parameters: true +--- + +[Commands](/commands/) » [site](/commands/site/) » unspam + +`wp site unspam` - Remove one or more sites from spam. + +Quick links: Github issues + +
    + +### OPTIONS + +<id>... +: One or more IDs of sites to remove from spam. + +### EXAMPLES + + $ wp site unspam 123 + Success: Site 123 removed from spam. + + + diff --git a/commands/super-admin/add/index.md b/commands/super-admin/add/index.md index edc0f3a7..86e5e842 100644 --- a/commands/super-admin/add/index.md +++ b/commands/super-admin/add/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/add/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin add' +display_global_parameters: true +--- + +[Commands](/commands/) » [super-admin](/commands/super-admin/) » add + +`wp super-admin add` - Grant super admin privileges to one or more users. + +Quick links: Github issues + +
    + +### OPTIONS + +<user>... +: One or more user IDs, user emails, or user logins. + +### EXAMPLES + + $ wp super-admin add superadmin2 + Success: Granted super-admin capabilities. + + + diff --git a/commands/super-admin/index.md b/commands/super-admin/index.md index 63edbde6..11dab856 100644 --- a/commands/super-admin/index.md +++ b/commands/super-admin/index.md @@ -1,4 +1,55 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin' +display_global_parameters: true +--- + +[Commands](/commands/) » super-admin + +`wp super-admin` - Manage super admins on WordPress multisite. + +Quick links: Github issues + +
    + +### EXAMPLES + + # 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. + + # Revoke super-admin privileges to the user. + $ wp super-admin remove superadmin2 + Success: Revoked super-admin capabilities. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addGrant super admin privileges to one or more users.
    listList users with super admin capabilities.
    removeRemove super admin privileges from one or more users.
    diff --git a/commands/super-admin/list/index.md b/commands/super-admin/list/index.md index 449605c7..35ca60e5 100644 --- a/commands/super-admin/list/index.md +++ b/commands/super-admin/list/index.md @@ -1,4 +1,38 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/list/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin list' +display_global_parameters: true +--- + +[Commands](/commands/) » [super-admin](/commands/super-admin/) » list + +`wp super-admin list` - List users with super admin capabilities. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--format=<format>] +: Render output in a particular format. +\--- +default: list +options: + - list + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + # List user with super-admin capabilities + $ wp super-admin list + supervisor + administrator + + + diff --git a/commands/super-admin/remove/index.md b/commands/super-admin/remove/index.md index 7025bc76..db133ef6 100644 --- a/commands/super-admin/remove/index.md +++ b/commands/super-admin/remove/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/remove/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [super-admin](/commands/super-admin/) » remove + +`wp super-admin remove` - Remove super admin privileges from one or more users. + +Quick links: Github issues + +
    + +### OPTIONS + +<user>... +: One or more user IDs, user emails, or user logins. + +### EXAMPLES + + $ wp super-admin remove superadmin2 + Success: Revoked super-admin capabilities. + + + diff --git a/commands/taxonomy/get/index.md b/commands/taxonomy/get/index.md index 8dd49989..d2166247 100644 --- a/commands/taxonomy/get/index.md +++ b/commands/taxonomy/get/index.md @@ -1,4 +1,54 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/get/ ---- \ No newline at end of file +layout: default +title: 'wp taxonomy get' +display_global_parameters: true +--- + +[Commands](/commands/) » [taxonomy](/commands/taxonomy/) » get + +`wp taxonomy get` - Get details about a registered taxonomy. + +Quick links: Github issues + +
    + +### OPTIONS + +<taxonomy> +: Taxonomy slug. + +[\--field=<field>] +: Instead of returning the whole taxonomy, 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 details of `category` taxonomy. + $ wp taxonomy get category --fields=name,label,object_type + +-------------+------------+ + | Field | Value | + +-------------+------------+ + | name | category | + | label | Categories | + | object_type | ["post"] | + +-------------+------------+ + + # Get capabilities of 'post_tag' taxonomy. + $ wp taxonomy get post_tag --field=cap + {"manage_terms":"manage_categories","edit_terms":"manage_categories","delete_terms":"manage_categories","assign_terms":"edit_posts"} + + + diff --git a/commands/taxonomy/index.md b/commands/taxonomy/index.md index e7f6f919..71ca03e2 100644 --- a/commands/taxonomy/index.md +++ b/commands/taxonomy/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/ ---- \ No newline at end of file +layout: default +title: 'wp taxonomy' +display_global_parameters: true +--- + +[Commands](/commands/) » taxonomy + +`wp taxonomy` - Manage taxonomies. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List all taxonomies with 'post' object type. + $ wp taxonomy list --object_type=post --fields=name,public + +-------------+--------+ + | name | public | + +-------------+--------+ + | category | 1 | + | post_tag | 1 | + | post_format | 1 | + +-------------+--------+ + + # Get capabilities of 'post_tag' taxonomy. + $ wp taxonomy get post_tag --field=cap + {"manage_terms":"manage_categories","edit_terms":"manage_categories","delete_terms":"manage_categories","assign_terms":"edit_posts"} + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + +
    NameDescription
    getGet details about a registered taxonomy.
    listList registered taxonomies.
    diff --git a/commands/taxonomy/list/index.md b/commands/taxonomy/list/index.md index 9faefe28..69f52dbc 100644 --- a/commands/taxonomy/list/index.md +++ b/commands/taxonomy/list/index.md @@ -1,4 +1,72 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/list/ ---- \ No newline at end of file +layout: default +title: 'wp taxonomy list' +display_global_parameters: true +--- + +[Commands](/commands/) » [taxonomy](/commands/taxonomy/) » list + +`wp taxonomy list` - List registered taxonomies. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: Filter by one or more fields (see get_taxonomies() first parameter for a list of available fields). + +[\--field=<field>] +: Prints the value of a single field for each taxonomy. + +[\--fields=<fields>] +: Limit the output to specific taxonomy fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* name +* label +* description +* public +* hierarchical + +There are no optionally available fields. + +### EXAMPLES + + # List all taxonomies. + $ wp taxonomy list --format=csv + name,label,description,object_type,show_tagcloud,hierarchical,public + category,Categories,,post,1,1,1 + post_tag,Tags,,post,1,,1 + nav_menu,"Navigation Menus",,nav_menu_item,,, + link_category,"Link Categories",,link,1,, + post_format,Format,,post,,,1 + + # List all taxonomies with 'post' object type. + $ wp taxonomy list --object_type=post --fields=name,public + +-------------+--------+ + | name | public | + +-------------+--------+ + | category | 1 | + | post_tag | 1 | + | post_format | 1 | + +-------------+--------+ + + + diff --git a/commands/term/create/index.md b/commands/term/create/index.md index 2319bb7f..7960b293 100644 --- a/commands/term/create/index.md +++ b/commands/term/create/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/create/ ---- \ No newline at end of file +layout: default +title: 'wp term create' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » create + +`wp term create` - Create a new term. + +Quick links: Github issues + +
    + +### OPTIONS + +<taxonomy> +: Taxonomy for the new term. + +<term> +: A name for the new term. + +[\--slug=<slug>] +: A unique slug for the new term. Defaults to sanitized version of name. + +[\--description=<description>] +: A description for the new term. + +[\--parent=<term-id>] +: A parent for the new term. + +[\--porcelain] +: Output just the new term id. + +### EXAMPLES + + # Create a new category "Apple" with a description. + $ wp term create category Apple --description="A type of fruit" + Success: Created category 199. + + + diff --git a/commands/term/delete/index.md b/commands/term/delete/index.md index 93ae4ba6..cf0aaa71 100644 --- a/commands/term/delete/index.md +++ b/commands/term/delete/index.md @@ -1,4 +1,40 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/delete/ ---- \ No newline at end of file +layout: default +title: 'wp term delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » delete + +`wp term delete` - Delete an existing term. + +Quick links: Github issues + +
    + +Errors if the term doesn't exist, or there was a problem in deleting it. + +### OPTIONS + +<taxonomy> +: Taxonomy of the term to delete. + +<term-id>... +: One or more IDs of terms to delete. + +### EXAMPLES + + # Delete post category + $ wp term delete category 15 + Deleted category 15. + Success: Deleted 1 of 1 terms. + + # Delete all post tags + $ wp term list post_tag --field=term_id | xargs wp term delete post_tag + Deleted post_tag 159. + Deleted post_tag 160. + Deleted post_tag 161. + Success: Deleted 3 of 3 terms. + + + diff --git a/commands/term/generate/index.md b/commands/term/generate/index.md index 7723ec5e..8833e08e 100644 --- a/commands/term/generate/index.md +++ b/commands/term/generate/index.md @@ -1,4 +1,56 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/generate/ ---- \ No newline at end of file +layout: default +title: 'wp term generate' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » generate + +`wp term generate` - Generate some terms. + +Quick links: Github issues + +
    + +Creates a specified number of new terms with dummy data. + +### OPTIONS + +<taxonomy> +: The taxonomy for the generated terms. + +[\--count=<number>] +: How many terms to generate? +\--- +default: 100 +\--- + +[\--max_depth=<number>] +: Generate child terms down to a certain depth. +\--- +default: 1 +\--- + +[\--format=<format>] +: Render output in a particular format. +\--- +default: progress +options: + - progress + - ids +\--- + +### EXAMPLES + + # Generate post categories. + $ wp term generate category --count=10 + Generating terms 100% [=========] 0:02 / 0:02 + + # Add meta to every generated term. + $ wp term generate category --format=ids --count=3 | xargs -d ' ' -I % wp term meta add % foo bar + Success: Added custom field. + Success: Added custom field. + Success: Added custom field. + + + diff --git a/commands/term/get/index.md b/commands/term/get/index.md index add6a239..1019a6a0 100644 --- a/commands/term/get/index.md +++ b/commands/term/get/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/get/ ---- \ No newline at end of file +layout: default +title: 'wp term get' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » get + +`wp term get` - Get details about a term. + +Quick links: Github issues + +
    + +### OPTIONS + +<taxonomy> +: Taxonomy of the term to get + +<term-id> +: ID of the term to get + +[\--field=<field>] +: Instead of returning the whole term, 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 details about a category with id 199. + $ wp term get category 199 --format=json + {"term_id":199,"name":"Apple","slug":"apple","term_group":0,"term_taxonomy_id":199,"taxonomy":"category","description":"A type of fruit","parent":0,"count":0,"filter":"raw"} + + + diff --git a/commands/term/index.md b/commands/term/index.md index e08cc23f..07b948c0 100644 --- a/commands/term/index.md +++ b/commands/term/index.md @@ -1,4 +1,87 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/ ---- \ No newline at end of file +layout: default +title: 'wp term' +display_global_parameters: true +--- + +[Commands](/commands/) » term + +`wp term` - Manage terms. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Create a new term. + $ wp term create category Apple --description="A type of fruit" + Success: Created category 199. + + # Get details about a term. + $ wp term get category 199 --format=json --fields=term_id,name,slug,count + {"term_id":199,"name":"Apple","slug":"apple","count":1} + + # Update an existing term. + $ wp term update category 15 --name=Apple + Success: Term updated. + + # Get the term's URL. + $ wp term list post_tag --include=123 --field=url + http://example.com/tag/tips-and-tricks + + # Delete post category + $ wp term delete category 15 + Success: Deleted category 15. + + # Recount posts assigned to each categories and tags + $ wp term recount category post_tag + Success: Updated category term count + Success: Updated post_tag term count + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    createCreate a new term.
    deleteDelete an existing term.
    generateGenerate some terms.
    getGet details about a term.
    listList terms in a taxonomy.
    metaManage term custom fields.
    recountRecalculate number of posts assigned to each term.
    updateUpdate an existing term.
    diff --git a/commands/term/list/index.md b/commands/term/list/index.md index fbe67e3e..414c2031 100644 --- a/commands/term/list/index.md +++ b/commands/term/list/index.md @@ -1,4 +1,80 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/list/ ---- \ No newline at end of file +layout: default +title: 'wp term list' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » list + +`wp term list` - List terms in a taxonomy. + +Quick links: Github issues + +
    + +### OPTIONS + +<taxonomy>... +: List terms of one or more taxonomies + +[\--<field>=<value>] +: Filter by one or more fields (see get_terms() $args parameter for a list of fields). + +[\--field=<field>] +: Prints the value of a single field for each term. + +[\--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 +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* term_id +* term_taxonomy_id +* name +* slug +* description +* parent +* count + +These fields are optionally available: + +* url + +### EXAMPLES + + # List post categories + $ wp term list category --format=csv + term_id,term_taxonomy_id,name,slug,description,parent,count + 2,2,aciform,aciform,,0,1 + 3,3,antiquarianism,antiquarianism,,0,1 + 4,4,arrangement,arrangement,,0,1 + 5,5,asmodeus,asmodeus,,0,1 + + # List post tags + $ wp term list post_tag --fields=name,slug + +-----------+-------------+ + | name | slug | + +-----------+-------------+ + | 8BIT | 8bit | + | alignment | alignment-2 | + | Articles | articles | + | aside | aside | + +-----------+-------------+ + + + diff --git a/commands/term/meta/add/index.md b/commands/term/meta/add/index.md index 98972be8..61723710 100644 --- a/commands/term/meta/add/index.md +++ b/commands/term/meta/add/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp term meta add' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » [meta](/commands/term/meta/) » add + +`wp term meta add` - Add a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/term/meta/delete/index.md b/commands/term/meta/delete/index.md index adea46b5..80065cbd 100644 --- a/commands/term/meta/delete/index.md +++ b/commands/term/meta/delete/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp term meta delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » [meta](/commands/term/meta/) » delete + +`wp term meta delete` - Delete a meta field. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +[<key>] +: The name of the meta field to delete. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + +[\--all] +: Delete all meta for the object. + + + diff --git a/commands/term/meta/get/index.md b/commands/term/meta/get/index.md index c774b038..7c630506 100644 --- a/commands/term/meta/get/index.md +++ b/commands/term/meta/get/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp term meta get' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » [meta](/commands/term/meta/) » get + +`wp term meta get` - Get meta field value. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<key> +: The name of the meta field to get. + +[\--format=<format>] +: Accepted values: table, json. Default: table + + + diff --git a/commands/term/meta/index.md b/commands/term/meta/index.md index c71a250d..ac207dc0 100644 --- a/commands/term/meta/index.md +++ b/commands/term/meta/index.md @@ -1,4 +1,68 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/ ---- \ No newline at end of file +layout: default +title: 'wp term meta' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » meta + +`wp term meta` - Manage term custom fields. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set term meta + $ wp term meta set 123 bio "Mary is a WordPress developer." + Success: Updated custom field 'bio'. + + # Get term meta + $ wp term meta get 123 bio + Mary is a WordPress developer. + + # Update term meta + $ wp term meta update 123 bio "Mary is an awesome WordPress developer." + Success: Updated custom field 'bio'. + + # Delete term meta + $ wp term meta delete 123 bio + Success: Deleted custom field. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a meta field.
    deleteDelete a meta field.
    getGet meta field value.
    listList all metadata associated with an object.
    updateUpdate a meta field.
    diff --git a/commands/term/meta/list/index.md b/commands/term/meta/list/index.md index 1f3f1028..09a5cbe1 100644 --- a/commands/term/meta/list/index.md +++ b/commands/term/meta/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp term meta list' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » [meta](/commands/term/meta/) » list + +`wp term meta list` - List all metadata associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +[\--keys=<keys>] +: Limit output to metadata of specific keys. + +[\--fields=<fields>] +: Limit the output to specific row fields. Defaults to id,meta_key,meta_value. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + + + diff --git a/commands/term/meta/update/index.md b/commands/term/meta/update/index.md index a47bd2c6..ceac1360 100644 --- a/commands/term/meta/update/index.md +++ b/commands/term/meta/update/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp term meta update' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » [meta](/commands/term/meta/) » update + +`wp term meta update` - Update a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If omitted, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. +\--- +default: plaintext +options: + - plaintext + - json +\--- + + + diff --git a/commands/term/recount/index.md b/commands/term/recount/index.md index 23f0263c..85aba19d 100644 --- a/commands/term/recount/index.md +++ b/commands/term/recount/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/recount/ ---- \ No newline at end of file +layout: default +title: 'wp term recount' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » recount + +`wp term recount` - Recalculate number of posts assigned to each term. + +Quick links: Github issues + +
    + +In instances where manual updates are made to the terms assigned to +posts in the database, the number of posts associated with a term +can become out-of-sync with the actual number of posts. + +This command runs wp_update_term_count() on the taxonomy's terms +to bring the count back to the correct value. + +### OPTIONS + +<taxonomy>... +: One or more taxonomies to recalculate. + +### EXAMPLES + + # Recount posts assigned to each categories and tags + $ wp term recount category post_tag + Success: Updated category term count. + Success: Updated post_tag term count. + + # Recount all listed taxonomies + $ wp taxonomy list --field=name | xargs wp term recount + Success: Updated category term count. + Success: Updated post_tag term count. + Success: Updated nav_menu term count. + Success: Updated link_category term count. + Success: Updated post_format term count. + + + diff --git a/commands/term/update/index.md b/commands/term/update/index.md index 7ee8473d..588b2c02 100644 --- a/commands/term/update/index.md +++ b/commands/term/update/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/update/ ---- \ No newline at end of file +layout: default +title: 'wp term update' +display_global_parameters: true +--- + +[Commands](/commands/) » [term](/commands/term/) » update + +`wp term update` - Update an existing term. + +Quick links: Github issues + +
    + +### OPTIONS + +<taxonomy> +: Taxonomy of the term to update. + +<term-id> +: ID for the term to update. + +[\--name=<name>] +: A new name for the term. + +[\--slug=<slug>] +: A new slug for the term. + +[\--description=<description>] +: A new description for the term. + +[\--parent=<term-id>] +: A new parent for the term. + +### EXAMPLES + + # Change category with id 15 to use the name "Apple" + $ wp term update category 15 --name=Apple + Success: Term updated. + + + diff --git a/commands/theme/activate/index.md b/commands/theme/activate/index.md index 70d50b6f..12cad5bb 100644 --- a/commands/theme/activate/index.md +++ b/commands/theme/activate/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/activate/ ---- \ No newline at end of file +layout: default +title: 'wp theme activate' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » activate + +`wp theme activate` - Activate a theme. + +Quick links: Github issues + +
    + +### OPTIONS + +<theme> +: The theme to activate. + +### EXAMPLES + + $ wp theme activate twentysixteen + Success: Switched to 'Twenty Sixteen' theme. + + + diff --git a/commands/theme/delete/index.md b/commands/theme/delete/index.md index 2f9954a9..ae6ed667 100644 --- a/commands/theme/delete/index.md +++ b/commands/theme/delete/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/delete/ ---- \ No newline at end of file +layout: default +title: 'wp theme delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » delete + +`wp theme delete` - Delete a theme. + +Quick links: Github issues + +
    + +Removes the theme from the filesystem. + +### OPTIONS + +<theme>... +: One or more themes to delete. + +### EXAMPLES + + $ wp theme delete twentytwelve + Deleted 'twentytwelve' theme. + Success: Deleted 1 of 1 themes. + + + diff --git a/commands/theme/disable/index.md b/commands/theme/disable/index.md index b312bbee..e6c3088b 100644 --- a/commands/theme/disable/index.md +++ b/commands/theme/disable/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/disable/ ---- \ No newline at end of file +layout: default +title: 'wp theme disable' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » disable + +`wp theme disable` - Disable a theme on a WordPress multisite install. + +Quick links: Github issues + +
    + +Removes ability for a theme to be activated from the dashboard of a site +on a WordPress multisite install. + +### OPTIONS + +<theme> +: The theme to disable. + +[\--network] +: If set, the theme is disabled on the network level. Note that +individual sites may still have this theme enabled if it was +enabled for them independently. + +### EXAMPLES + + # Disable theme + $ wp theme disable twentysixteen + Success: Disabled the 'Twenty Sixteen' theme. + + # Disable theme in network level + $ wp theme disable twentysixteen --network + Success: Network disabled the 'Twenty Sixteen' theme. + + + diff --git a/commands/theme/enable/index.md b/commands/theme/enable/index.md index ebed834c..3341ed6e 100644 --- a/commands/theme/enable/index.md +++ b/commands/theme/enable/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/enable/ ---- \ No newline at end of file +layout: default +title: 'wp theme enable' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » enable + +`wp theme enable` - Enable a theme on a WordPress multisite install. + +Quick links: Github issues + +
    + +Permits theme to be activated from the dashboard of a site on a WordPress +multisite install. + +### OPTIONS + +<theme> +: The theme to enable. + +[\--network] +: If set, the theme is enabled for the entire network + +[\--activate] +: If set, the theme is activated for the current site. Note that +the "network" flag has no influence on this. + +### EXAMPLES + + # Enable theme + $ wp theme enable twentysixteen + Success: Enabled the 'Twenty Sixteen' theme. + + # Network enable theme + $ wp theme enable twentysixteen --network + Success: Network enabled the 'Twenty Sixteen' theme. + + # Network enable and activate theme for current site + $ wp theme enable twentysixteen --activate + Success: Enabled the 'Twenty Sixteen' theme. + Success: Switched to 'Twenty Sixteen' theme. + + + diff --git a/commands/theme/get/index.md b/commands/theme/get/index.md index cf178449..d8ab746a 100644 --- a/commands/theme/get/index.md +++ b/commands/theme/get/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/get/ ---- \ No newline at end of file +layout: default +title: 'wp theme get' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » get + +`wp theme get` - Get details about a theme. + +Quick links: Github issues + +
    + +### OPTIONS + +<theme> +: The theme to get. + +[\--field=<field>] +: Instead of returning the whole theme, 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 + + $ wp theme get twentysixteen --fields=name,title,version + +---------+----------------+ + | Field | Value | + +---------+----------------+ + | name | Twenty Sixteen | + | title | Twenty Sixteen | + | version | 1.2 | + +---------+----------------+ + + + diff --git a/commands/theme/index.md b/commands/theme/index.md index 8d5c6d76..5ba2fd82 100644 --- a/commands/theme/index.md +++ b/commands/theme/index.md @@ -1,4 +1,110 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/ ---- \ No newline at end of file +layout: default +title: 'wp theme' +display_global_parameters: true +--- + +[Commands](/commands/) » theme + +`wp theme` - Manage themes. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Install the latest version of a theme from wordpress.org and activate + $ wp theme install twentysixteen --activate + Installing Twenty Sixteen (1.2) + Downloading install package from http://downloads.wordpress.org/theme/twentysixteen.1.2.zip... + Unpacking the package... + Installing the theme... + Theme installed successfully. + Activating 'twentysixteen'... + Success: Switched to 'Twenty Sixteen' theme. + + # Get details of an installed theme + $ wp theme get twentysixteen --fields=name,title,version + +---------+----------------+ + | Field | Value | + +---------+----------------+ + | name | Twenty Sixteen | + | title | Twenty Sixteen | + | version | 1.2 | + +---------+----------------+ + + # Get status of theme + $ wp theme status twentysixteen + Theme twentysixteen details: + Name: Twenty Sixteen + Status: Active + Version: 1.2 + Author: the WordPress team + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    activateActivate a theme.
    deleteDelete a theme.
    disableDisable a theme on a WordPress multisite install.
    enableEnable a theme on a WordPress multisite install.
    getGet details about a theme.
    installInstall a theme.
    is-installedCheck if the theme is installed.
    listGet a list of themes.
    modManage theme mods.
    pathGet the path to a theme or to the theme directory.
    searchSearch the WordPress.org theme directory.
    statusSee the status of one or all themes.
    updateUpdate one or more themes.
    diff --git a/commands/theme/install/index.md b/commands/theme/install/index.md index c8fe8318..03bbed5f 100644 --- a/commands/theme/install/index.md +++ b/commands/theme/install/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/install/ ---- \ No newline at end of file +layout: default +title: 'wp theme install' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » install + +`wp theme install` - Install a theme. + +Quick links: Github issues + +
    + +### OPTIONS + +<theme|zip|url>... +: A theme slug, the path to a local zip file, or URL to a remote zip file. + +[\--version=<version>] +: If set, get that particular version from wordpress.org, instead of the +stable version. + +[\--force] +: If set, the command will overwrite any installed version of the theme, without prompting +for confirmation. + +[\--activate] +: If set, the theme will be activated immediately after install. + +### EXAMPLES + + # Install the latest version from wordpress.org and activate + $ wp theme install twentysixteen --activate + Installing Twenty Sixteen (1.2) + Downloading install package from http://downloads.wordpress.org/theme/twentysixteen.1.2.zip... + Unpacking the package... + Installing the theme... + Theme installed successfully. + Activating 'twentysixteen'... + Success: Switched to 'Twenty Sixteen' theme. + + # Install from a local zip file + $ wp theme install ../my-theme.zip + + # Install from a remote zip file + $ wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef + + + diff --git a/commands/theme/is-installed/index.md b/commands/theme/is-installed/index.md index a846bace..9a894a63 100644 --- a/commands/theme/is-installed/index.md +++ b/commands/theme/is-installed/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp theme is-installed' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » is-installed + +`wp theme is-installed` - Check if the theme is installed. + +Quick links: Github issues + +
    + +Returns exit code 0 when installed, 1 when uninstalled. + +### OPTIONS + +<theme> +: The theme to check. + +### EXAMPLES + + # Check whether theme is installed; exit status 0 if installed, otherwise 1 + $ wp theme is-installed hello-dolly + $ echo $? + 1 + + + diff --git a/commands/theme/list/index.md b/commands/theme/list/index.md index 94f386fc..5da161de 100644 --- a/commands/theme/list/index.md +++ b/commands/theme/list/index.md @@ -1,4 +1,64 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/list/ ---- \ No newline at end of file +layout: default +title: 'wp theme list' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » list + +`wp theme list` - Get a list of themes. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--<field>=<value>] +: Filter results based on the value of a field. + +[\--field=<field>] +: Prints the value of a single field for each theme. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each theme: + +* name +* status +* update +* version + +These fields are optionally available: + +* update_version +* update_package +* update_id +* title +* description + +### EXAMPLES + + # List themes + $ wp theme list --status=inactive --format=csv + name,status,update,version + twentyfourteen,inactive,none,1.7 + twentysixteen,inactive,available,1.1 + + + diff --git a/commands/theme/mod/get/index.md b/commands/theme/mod/get/index.md index b6ca8909..ff5af07b 100644 --- a/commands/theme/mod/get/index.md +++ b/commands/theme/mod/get/index.md @@ -1,4 +1,67 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/get/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod get' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » [mod](/commands/theme/mod/) » get + +`wp theme mod get` - Get one or more theme mods. + +Quick links: Github issues + +
    + +### OPTIONS + +[<mod>...] +: One or more mods to get. + +[\--field=<field>] +: Returns the value of a single field. + +[\--all] +: List all theme mods + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - json + - csv + - yaml +\--- + +### EXAMPLES + + # Get all theme mods. + $ wp theme mod get --all + +------------------+---------+ + | key | value | + +------------------+---------+ + | background_color | dd3333 | + | link_color | #dd9933 | + | main_text_color | #8224e3 | + +------------------+---------+ + + # Get single theme mod in JSON format. + $ wp theme mod get background_color --format=json + [{"key":"background_color","value":"dd3333"}] + + # Get value of a single theme mod. + $ wp theme mod get background_color --field=value + dd3333 + + # Get multiple theme mods. + $ wp theme mod get background_color header_textcolor + +------------------+--------+ + | key | value | + +------------------+--------+ + | background_color | dd3333 | + | header_textcolor | | + +------------------+--------+ + + + diff --git a/commands/theme/mod/index.md b/commands/theme/mod/index.md index af7293b5..03c1c2d5 100644 --- a/commands/theme/mod/index.md +++ b/commands/theme/mod/index.md @@ -1,4 +1,56 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » mod + +`wp theme mod` - Manage theme mods. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set the 'background_color' theme mod to '000000'. + $ wp theme mod set background_color 000000 + Success: Theme mod background_color set to 000000 + + # Get single theme mod in JSON format. + $ wp theme mod get background_color --format=json + [{"key":"background_color","value":"dd3333"}] + + # Remove all theme mods. + $ wp theme mod remove --all + Success: Theme mods removed. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    getGet one or more theme mods.
    removeRemove one or more theme mods.
    setSet the value of a theme mod.
    diff --git a/commands/theme/mod/remove/index.md b/commands/theme/mod/remove/index.md index 7a7382e7..36695792 100644 --- a/commands/theme/mod/remove/index.md +++ b/commands/theme/mod/remove/index.md @@ -1,4 +1,38 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/remove/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » [mod](/commands/theme/mod/) » remove + +`wp theme mod remove` - Remove one or more theme mods. + +Quick links: Github issues + +
    + +### OPTIONS + +[<mod>...] +: One or more mods to remove. + +[\--all] +: Remove all theme mods. + +### EXAMPLES + + # Remove all theme mods. + $ wp theme mod remove --all + Success: Theme mods removed. + + # Remove single theme mod. + $ wp theme mod remove background_color + Success: 1 mod removed. + + # Remove multiple theme mods. + $ wp theme mod remove background_color header_textcolor + Success: 2 mods removed. + + + diff --git a/commands/theme/mod/set/index.md b/commands/theme/mod/set/index.md index 802367dd..2079be33 100644 --- a/commands/theme/mod/set/index.md +++ b/commands/theme/mod/set/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/set/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod set' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » [mod](/commands/theme/mod/) » set + +`wp theme mod set` - Set the value of a theme mod. + +Quick links: Github issues + +
    + +### OPTIONS + +<mod> +: The name of the theme mod to set or update. + +<value> +: The new value. + +### EXAMPLES + + # Set theme mod + $ wp theme mod set background_color 000000 + Success: Theme mod background_color set to 000000 + + + diff --git a/commands/theme/path/index.md b/commands/theme/path/index.md index 33cefc57..9878d003 100644 --- a/commands/theme/path/index.md +++ b/commands/theme/path/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/path/ ---- \ No newline at end of file +layout: default +title: 'wp theme path' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » path + +`wp theme path` - Get the path to a theme or to the theme directory. + +Quick links: Github issues + +
    + +### OPTIONS + +[<theme>] +: The theme to get the path to. Path includes "style.css" file. +If not set, will return the path to the themes directory. + +[\--dir] +: If set, get the path to the closest parent directory, instead of the +theme's "style.css" file. + +### EXAMPLES + + # Get theme path + $ wp theme path + /var/www/example.com/public_html/wp-content/themes + + # Change directory to theme path + $ cd $(wp theme path) + + + diff --git a/commands/theme/search/index.md b/commands/theme/search/index.md index 727c8ba2..6939aa77 100644 --- a/commands/theme/search/index.md +++ b/commands/theme/search/index.md @@ -1,4 +1,71 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/search/ ---- \ No newline at end of file +layout: default +title: 'wp theme search' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » search + +`wp theme search` - Search the WordPress.org theme directory. + +Quick links: Github issues + +
    + +Displays themes in the WordPress.org theme directory matching a given +search query. + +### OPTIONS + +<search> +: The string to search for. + +[\--per-page=<per-page>] +: Optional number of results to display. Defaults to 10. + +[\--field=<field>] +: Prints the value of a single field for each theme. + +[\--fields=<fields>] +: Ask for specific fields from the API. Defaults to name,slug,author,rating. Acceptable values: + + **name**: Theme Name + **slug**: Theme Slug + **version**: Current Version Number + **author**: Theme Author + **preview_url**: Theme Preview URL + **screenshot_url**: Theme Screenshot URL + **rating**: Theme Rating + **num_ratings**: Number of Theme Ratings + **homepage**: Theme Author's Homepage + **description**: Theme Description + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + $ wp theme search photo --per-page=6 + Success: Showing 6 of 203 themes. + +----------------------+----------------------+--------+ + | name | slug | rating | + +----------------------+----------------------+--------+ + | Photos | photos | 100 | + | Infinite Photography | infinite-photography | 100 | + | PhotoBook | photobook | 100 | + | BG Photo Frame | bg-photo-frame | 0 | + | fPhotography | fphotography | 0 | + | Photo Perfect | photo-perfect | 98 | + +----------------------+----------------------+--------+ + + + diff --git a/commands/theme/status/index.md b/commands/theme/status/index.md index 3af22e0e..4f27d1a3 100644 --- a/commands/theme/status/index.md +++ b/commands/theme/status/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/status/ ---- \ No newline at end of file +layout: default +title: 'wp theme status' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » status + +`wp theme status` - See the status of one or all themes. + +Quick links: Github issues + +
    + +### OPTIONS + +[<theme>] +: A particular theme to show the status for. + +### EXAMPLES + + $ wp theme status twentysixteen + Theme twentysixteen details: + Name: Twenty Sixteen + Status: Inactive + Version: 1.2 + Author: the WordPress team + + + diff --git a/commands/theme/update-all/index.md b/commands/theme/update-all/index.md index d76844ef..291ec545 100644 --- a/commands/theme/update-all/index.md +++ b/commands/theme/update-all/index.md @@ -1,4 +1,6 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/update-all/ ---- \ No newline at end of file +layout: default +title: 'wp theme update-all' +--- + +`wp theme update-all` is an alias for [wp theme update --all](/commands/theme/update/). diff --git a/commands/theme/update/index.md b/commands/theme/update/index.md index 8146d0cd..9816da6c 100644 --- a/commands/theme/update/index.md +++ b/commands/theme/update/index.md @@ -1,4 +1,58 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/update/ ---- \ No newline at end of file +layout: default +title: 'wp theme update' +display_global_parameters: true +--- + +[Commands](/commands/) » [theme](/commands/theme/) » update + +`wp theme update` - Update one or more themes. + +Quick links: Github issues + +
    + +### OPTIONS + +[<theme>...] +: One or more themes to update. + +[\--all] +: If set, all themes that have updates will be updated. + +[\--format=<format>] +: Output summary as table or summary. Defaults to table. + +[\--version=<version>] +: If set, the theme will be updated to the specified version. + +[\--dry-run] +: Preview which themes would be updated. + +### EXAMPLES + + # Update multiple themes + $ wp theme update twentyfifteen twentysixteen + Downloading update from https://downloads.wordpress.org/theme/twentyfifteen.1.5.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + Downloading update from https://downloads.wordpress.org/theme/twentysixteen.1.2.zip... + Unpacking the update... + Installing the latest version... + Removing the old version of the theme... + Theme updated successfully. + +---------------+-------------+-------------+---------+ + | name | old_version | new_version | status | + +---------------+-------------+-------------+---------+ + | twentyfifteen | 1.4 | 1.5 | Updated | + | twentysixteen | 1.1 | 1.2 | Updated | + +---------------+-------------+-------------+---------+ + Success: Updated 2 of 2 themes. + + # Update all themes + $ wp theme update --all + + + diff --git a/commands/transient/delete/index.md b/commands/transient/delete/index.md index d938d89c..d6ac4984 100644 --- a/commands/transient/delete/index.md +++ b/commands/transient/delete/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/delete/ ---- \ No newline at end of file +layout: default +title: 'wp transient delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [transient](/commands/transient/) » delete + +`wp transient delete` - Delete a transient value. + +Quick links: Github issues + +
    + +### OPTIONS + +[<key>] +: Key for the transient. + +[\--network] +: Delete the value of a network transient, instead of that on a single site. + +[\--all] +: Delete all transients. + +[\--expired] +: Delete all expired transients. + +### EXAMPLES + + # Delete transient. + $ wp transient delete sample_key + Success: Transient deleted. + + # Delete expired transients. + $ wp transient delete --expired + Success: 12 expired transients deleted from the database. + + # Delete all transients. + $ wp transient delete --all + Success: 14 transients deleted from the database. + + + diff --git a/commands/transient/get/index.md b/commands/transient/get/index.md index 8a0c8a80..8db11a7f 100644 --- a/commands/transient/get/index.md +++ b/commands/transient/get/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/get/ ---- \ No newline at end of file +layout: default +title: 'wp transient get' +display_global_parameters: true +--- + +[Commands](/commands/) » [transient](/commands/transient/) » get + +`wp transient get` - Get a transient value. + +Quick links: Github issues + +
    + +### OPTIONS + +<key> +: Key for the transient. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - yaml +\--- + +[\--network] +: Get the value of the network transient, instead of the single site. + +### EXAMPLES + + $ wp transient get sample_key + test data + + $ wp transient get random_key + Warning: Transient with key "random_key" is not set. + + + diff --git a/commands/transient/index.md b/commands/transient/index.md index 95839b6d..ee40886e 100644 --- a/commands/transient/index.md +++ b/commands/transient/index.md @@ -1,4 +1,66 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/ ---- \ No newline at end of file +layout: default +title: 'wp transient' +display_global_parameters: true +--- + +[Commands](/commands/) » transient + +`wp transient` - Manage transients. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set transient. + $ wp transient set sample_key "test data" 3600 + Success: Transient added. + + # Get transient. + $ wp transient get sample_key + test data + + # Delete transient. + $ wp transient delete sample_key + Success: Transient deleted. + + # Delete expired transients. + $ wp transient delete --expired + Success: 12 expired transients deleted from the database. + + # Delete all transients. + $ wp transient delete --all + Success: 14 transients deleted from the database. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    deleteDelete a transient value.
    getGet a transient value.
    setSet a transient value.
    typeDetermine type of transients implementation.
    diff --git a/commands/transient/set/index.md b/commands/transient/set/index.md index e8131ad5..7e347385 100644 --- a/commands/transient/set/index.md +++ b/commands/transient/set/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/set/ ---- \ No newline at end of file +layout: default +title: 'wp transient set' +display_global_parameters: true +--- + +[Commands](/commands/) » [transient](/commands/transient/) » set + +`wp transient set` - Set a transient value. + +Quick links: Github issues + +
    + +`<expiration>` is the time until expiration, in seconds. + +### OPTIONS + +<key> +: Key for the transient. + +<value> +: Value to be set for the transient. + +[<expiration>] +: Time until expiration, in seconds. + +[\--network] +: Set the transient value on the network, instead of single site. + +### EXAMPLES + + $ wp transient set sample_key "test data" 3600 + Success: Transient added. + + + diff --git a/commands/transient/type/index.md b/commands/transient/type/index.md index 9914fb9e..083f3203 100644 --- a/commands/transient/type/index.md +++ b/commands/transient/type/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/type/ ---- \ No newline at end of file +layout: default +title: 'wp transient type' +display_global_parameters: true +--- + +[Commands](/commands/) » [transient](/commands/transient/) » type + +`wp transient type` - Determine type of transients implementation. + +Quick links: Github issues + +
    + +Indicates whether the transients API is using an object cache or the +options table. + +### EXAMPLES + + $ wp transient type + Transients are saved to the wp_options table. + + + diff --git a/commands/user/add-cap/index.md b/commands/user/add-cap/index.md index da5f3867..2ab8daa0 100644 --- a/commands/user/add-cap/index.md +++ b/commands/user/add-cap/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/add-cap/ ---- \ No newline at end of file +layout: default +title: 'wp user add-cap' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » add-cap + +`wp user add-cap` - Add a capability to a user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<cap> +: The capability to add. + +### EXAMPLES + + # Add a capability for a user + $ wp user add-cap john create_premium_item + Success: Added 'create_premium_item' capability for john (16). + + # Add a capability for a user + $ wp user add-cap 15 edit_product + Success: Added 'edit_product' capability for johndoe (15). + + + diff --git a/commands/user/add-role/index.md b/commands/user/add-role/index.md index 36ade048..9cc45321 100644 --- a/commands/user/add-role/index.md +++ b/commands/user/add-role/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/add-role/ ---- \ No newline at end of file +layout: default +title: 'wp user add-role' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » add-role + +`wp user add-role` - Add a role for a user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<role> +: Add the specified role to the user. + +### EXAMPLES + + $ wp user add-role 12 author + Success: Added 'author' role for johndoe (12). + + + diff --git a/commands/user/create/index.md b/commands/user/create/index.md index 7dbd1471..dea27afd 100644 --- a/commands/user/create/index.md +++ b/commands/user/create/index.md @@ -1,4 +1,55 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/create/ ---- \ No newline at end of file +layout: default +title: 'wp user create' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » create + +`wp user create` - Create a new user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user-login> +: The login of the user to create. + +<user-email> +: The email address of the user to create. + +[\--role=<role>] +: The role of the user to create. Default: default role + +[\--user_pass=<password>] +: The user password. Default: randomly generated + +[\--user_registered=<yyyy-mm-dd>] +: The date the user registered. Default: current date + +[\--display_name=<name>] +: The display name. + +[\--first_name=<first_name>] +: The user's first name. + +[\--last_name=<last_name>] +: The user's last name. + +[\--send-email] +: Send an email to the user with their new account details. + +[\--porcelain] +: Output just the new user id. + +### EXAMPLES + + # Create user + $ wp user create bob bob@example.com --role=author + Success: Created user 3. + Password: k9**&I4vNH(& + + + diff --git a/commands/user/delete/index.md b/commands/user/delete/index.md index 806726e1..05ee4053 100644 --- a/commands/user/delete/index.md +++ b/commands/user/delete/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/delete/ ---- \ No newline at end of file +layout: default +title: 'wp user delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » delete + +`wp user delete` - Delete one or more users from the current site. + +Quick links: Github issues + +
    + +On multisite, `wp user delete` only removes the user from the current +site. Include `--network` to also remove the user from the database, but +make sure to reassign their posts prior to deleting the user. + +### OPTIONS + +<user>... +: The user login, user email, or user ID of the user(s) to delete. + +[\--network] +: On multisite, delete the user from the entire network. + +[\--reassign=<user-id>] +: User ID to reassign the posts to. + +[\--yes] +: Answer yes to any confirmation prompts. + +### EXAMPLES + + # Delete user 123 and reassign posts to user 567 + $ wp user delete 123 --reassign=567 + 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 + + + diff --git a/commands/user/generate/index.md b/commands/user/generate/index.md index 947db510..76aa06de 100644 --- a/commands/user/generate/index.md +++ b/commands/user/generate/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/generate/ ---- \ No newline at end of file +layout: default +title: 'wp user generate' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » generate + +`wp user generate` - Generate some users. + +Quick links: Github issues + +
    + +Creates a specified number of new users with dummy data. + +### OPTIONS + +[\--count=<number>] +: How many users to generate? +\--- +default: 100 +\--- + +[\--role=<role>] +: The role of the generated users. Default: default role from WP + +[\--format=<format>] +: Render output in a particular format. +\--- +default: progress +options: + - progress + - ids +\--- + +### EXAMPLES + + # Add meta to every generated users. + $ wp user generate --format=ids --count=3 | xargs -d ' ' -I % wp user meta add % foo bar + Success: Added custom field. + Success: Added custom field. + Success: Added custom field. + + + diff --git a/commands/user/get/index.md b/commands/user/get/index.md index 00539b88..90b8aeb1 100644 --- a/commands/user/get/index.md +++ b/commands/user/get/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/get/ ---- \ No newline at end of file +layout: default +title: 'wp user get' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » get + +`wp user get` - Get details about a user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[\--field=<field>] +: Instead of returning the whole user, returns the value of a single field. + +[\--fields=<fields>] +: Get a specific subset of the user's fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - yaml +\--- + +### EXAMPLES + + # Get user + $ wp user get 12 --field=login + supervisor + + # Get user and export to JSON file + $ wp user get bob --format=json > bob.json + + + diff --git a/commands/user/import-csv/index.md b/commands/user/import-csv/index.md index 49624d39..961ab1c6 100644 --- a/commands/user/import-csv/index.md +++ b/commands/user/import-csv/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/import-csv/ ---- \ No newline at end of file +layout: default +title: 'wp user import-csv' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » import-csv + +`wp user import-csv` - Import users from a CSV file. + +Quick links: Github issues + +
    + +If the user already exists (matching the email address or login), then +the user is updated unless the `--skip-update` flag is used. + +### OPTIONS + +<file> +: The local or remote CSV file of users to import. + +[\--send-email] +: Send an email to new users with their account details. + +[\--skip-update] +: Don't update users that already exist. + +### EXAMPLES + + # Import users from local CSV file + $ wp user import-csv /path/to/users.csv + Success: bobjones created + Success: newuser1 created + Success: existinguser created + + # Import users from remote CSV file + $ wp user import-csv http://example.com/users.csv + + Sample users.csv file: + + user_login,user_email,display_name,role + bobjones,bobjones@example.com,Bob Jones,contributor + newuser1,newuser1@example.com,New User,author + existinguser,existinguser@example.com,Existing User,administrator + + + diff --git a/commands/user/index.md b/commands/user/index.md index 4a796672..abd676dc 100644 --- a/commands/user/index.md +++ b/commands/user/index.md @@ -1,4 +1,111 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/ ---- \ No newline at end of file +layout: default +title: 'wp user' +display_global_parameters: true +--- + +[Commands](/commands/) » user + +`wp user` - Manage users. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List user IDs + $ wp user list --field=ID + 1 + + # Create a new user. + $ wp user create bob bob@example.com --role=author + Success: Created user 3. + Password: k9**&I4vNH(& + + # Update an existing user. + $ wp user update 123 --display_name=Mary --user_pass=marypass + Success: Updated user 123. + + # Delete user 123 and reassign posts to user 567 + $ wp user delete 123 --reassign=567 + Success: Removed user 123 from http://example.com + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    add-capAdd a capability to a user.
    add-roleAdd a role for a user.
    createCreate a new user.
    deleteDelete one or more users from the current site.
    generateGenerate some users.
    getGet details about a user.
    import-csvImport users from a CSV file.
    listList users.
    list-capsList all capabilities for a user.
    metaManage user custom fields.
    remove-capRemove a user's capability.
    remove-roleRemove a user's role.
    sessionManage a user's sessions.
    set-roleSet the user role.
    termManage user terms.
    updateUpdate an existing user.
    diff --git a/commands/user/list-caps/index.md b/commands/user/list-caps/index.md index 26e8b1d2..773b37c0 100644 --- a/commands/user/list-caps/index.md +++ b/commands/user/list-caps/index.md @@ -1,4 +1,40 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/list-caps/ ---- \ No newline at end of file +layout: default +title: 'wp user list-caps' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » list-caps + +`wp user list-caps` - List all capabilities for a user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or login. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: list +options: + - list + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + $ wp user list-caps 21 + edit_product + create_premium_item + + + diff --git a/commands/user/list/index.md b/commands/user/list/index.md index cf171af0..58426cf1 100644 --- a/commands/user/list/index.md +++ b/commands/user/list/index.md @@ -1,4 +1,87 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/list/ ---- \ No newline at end of file +layout: default +title: 'wp user list' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » list + +`wp user list` - List users. + +Quick links: Github issues + +
    + +### OPTIONS + +[\--role=<role>] +: Only display users with a certain role. + +[\--<field>=<value>] +: Control output by one or more arguments of get_users(). + +[\--network] +: List all users in the network for multisite. + +[\--field=<field>] +: Prints the value of a single field for each user. + +[\--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 +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each user: + +* ID +* user_login +* display_name +* user_email +* user_registered +* roles + +These fields are optionally available: + +* user_pass +* user_nicename +* user_url +* user_activation_key +* user_status +* spam +* deleted +* caps +* cap_key +* allcaps +* filter +* url + +### EXAMPLES + + # List user IDs + $ wp user list --field=ID + 1 + + # List users with administrator role + $ wp user list --role=administrator --format=csv + ID,user_login,display_name,user_email,user_registered,roles + 1,supervisor,supervisor,supervisor@gmail.com,"2016-06-03 04:37:00",administrator + + # List users with only given fields + $ wp user list --fields=display_name,user_email --format=json + [{"display_name":"supervisor","user_email":"supervisor@gmail.com"}] + + + diff --git a/commands/user/meta/add/index.md b/commands/user/meta/add/index.md index fd972561..c3dfbb24 100644 --- a/commands/user/meta/add/index.md +++ b/commands/user/meta/add/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp user meta add' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [meta](/commands/user/meta/) » add + +`wp user meta add` - Add a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to add metadata for. + +<key> +: The metadata key. + +<value> +: The new metadata value. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + +### EXAMPLES + + # Add user meta + $ wp user meta add 123 bio "Mary is an WordPress developer." + Success: Added custom field. + + + diff --git a/commands/user/meta/delete/index.md b/commands/user/meta/delete/index.md index e6577e1b..195c07b9 100644 --- a/commands/user/meta/delete/index.md +++ b/commands/user/meta/delete/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp user meta delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [meta](/commands/user/meta/) » delete + +`wp user meta delete` - Delete a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to delete metadata from. + +<key> +: The metadata key. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + +### EXAMPLES + + # Delete user meta + $ wp user meta delete 123 bio + Success: Deleted custom field. + + + diff --git a/commands/user/meta/get/index.md b/commands/user/meta/get/index.md index 4529e883..fc728092 100644 --- a/commands/user/meta/get/index.md +++ b/commands/user/meta/get/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp user meta get' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [meta](/commands/user/meta/) » get + +`wp user meta get` - Get meta field value. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to get metadata for. + +<key> +: The metadata key. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - yaml +\--- + +### EXAMPLES + + # Get user meta + $ wp user meta get 123 bio + Mary is an WordPress developer. + + + diff --git a/commands/user/meta/index.md b/commands/user/meta/index.md index 3998b2d0..6c6fdba4 100644 --- a/commands/user/meta/index.md +++ b/commands/user/meta/index.md @@ -1,4 +1,74 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/ ---- \ No newline at end of file +layout: default +title: 'wp user meta' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » meta + +`wp user meta` - Manage user custom fields. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Add user meta + $ wp user meta add 123 bio "Mary is an WordPress developer." + Success: Added custom field. + + # List user meta + $ wp user meta list 123 --keys=nickname,description,wp_capabilities + +---------+-----------------+--------------------------------+ + | user_id | meta_key | meta_value | + +---------+-----------------+--------------------------------+ + | 123 | nickname | supervisor | + | 123 | description | Mary is a WordPress developer. | + | 123 | wp_capabilities | {"administrator":true} | + +---------+-----------------+--------------------------------+ + + # Update user meta + $ wp user meta update 123 bio "Mary is an awesome WordPress developer." + Success: Updated custom field 'bio'. + + # Delete user meta + $ wp user meta delete 123 bio + Success: Deleted custom field. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a meta field.
    deleteDelete a meta field.
    getGet meta field value.
    listList all metadata associated with a user.
    updateUpdate a meta field.
    diff --git a/commands/user/meta/list/index.md b/commands/user/meta/list/index.md index 4191b53a..e8d25bed 100644 --- a/commands/user/meta/list/index.md +++ b/commands/user/meta/list/index.md @@ -1,4 +1,51 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp user meta list' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [meta](/commands/user/meta/) » list + +`wp user meta list` - List all metadata associated with a user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to get metadata for. + +[\--keys=<keys>] +: Limit output to metadata of specific keys. + +[\--fields=<fields>] +: Limit the output to specific row fields. Defaults to id,meta_key,meta_value. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - count + - yaml +\--- + +### EXAMPLES + + # List user meta + $ wp user meta list 123 --keys=nickname,description,wp_capabilities + +---------+-----------------+--------------------------------+ + | user_id | meta_key | meta_value | + +---------+-----------------+--------------------------------+ + | 123 | nickname | supervisor | + | 123 | description | Mary is a WordPress developer. | + | 123 | wp_capabilities | {"administrator":true} | + +---------+-----------------+--------------------------------+ + + + diff --git a/commands/user/meta/update/index.md b/commands/user/meta/update/index.md index 35533144..fe7dc68a 100644 --- a/commands/user/meta/update/index.md +++ b/commands/user/meta/update/index.md @@ -1,4 +1,36 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp user meta update' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [meta](/commands/user/meta/) » update + +`wp user meta update` - Update a meta field. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to update metadata for. + +<key> +: The metadata key. + +<value> +: The new metadata value. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + +### EXAMPLES + + # Update user meta + $ wp user meta update 123 bio "Mary is an awesome WordPress developer." + Success: Updated custom field 'bio'. + + + diff --git a/commands/user/remove-cap/index.md b/commands/user/remove-cap/index.md index ab1faead..d5999b50 100644 --- a/commands/user/remove-cap/index.md +++ b/commands/user/remove-cap/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/remove-cap/ ---- \ No newline at end of file +layout: default +title: 'wp user remove-cap' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » remove-cap + +`wp user remove-cap` - Remove a user's capability. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<cap> +: The capability to be removed. + +### EXAMPLES + + $ wp user remove-cap 11 publish_newsletters + Success: Removed 'publish_newsletters' cap for supervisor (11). + + + diff --git a/commands/user/remove-role/index.md b/commands/user/remove-role/index.md index e5e03675..c273039f 100644 --- a/commands/user/remove-role/index.md +++ b/commands/user/remove-role/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/remove-role/ ---- \ No newline at end of file +layout: default +title: 'wp user remove-role' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » remove-role + +`wp user remove-role` - Remove a user's role. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[<role>] +: A specific role to remove. + +### EXAMPLES + + $ wp user remove-role 12 author + Success: Removed 'author' role for johndoe (12). + + + diff --git a/commands/user/session/destroy/index.md b/commands/user/session/destroy/index.md index e9b02858..08acfd69 100644 --- a/commands/user/session/destroy/index.md +++ b/commands/user/session/destroy/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/destroy/ ---- \ No newline at end of file +layout: default +title: 'wp user session destroy' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [session](/commands/user/session/) » destroy + +`wp user session destroy` - Destroy a session for the given user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[<token>] +: The token of the session to destroy. Defaults to the most recently created session. + +[\--all] +: Destroy all of the user's sessions. + +### EXAMPLES + + # Destroy the most recent session of the given user. + $ wp user session destroy admin + Success: Destroyed session. 3 sessions remaining. + + # Destroy a specific session of the given user. + $ wp user session destroy admin e073ad8540a9c2... + Success: Destroyed session. 2 sessions remaining. + + # Destroy all the sessions of the given user. + $ wp user session destroy admin --all + Success: Destroyed all sessions. + + # Destroy all sessions for all users. + $ wp user list --field=ID | xargs wp user session destroy --all + Success: Destroyed all sessions. + Success: Destroyed all sessions. + + + diff --git a/commands/user/session/index.md b/commands/user/session/index.md index 042918fb..cefad863 100644 --- a/commands/user/session/index.md +++ b/commands/user/session/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/ ---- \ No newline at end of file +layout: default +title: 'wp user session' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » session + +`wp user session` - Manage a user's sessions. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List a user's sessions. + $ wp user session list admin@example.com --format=csv + login_time,expiration_time,ip,ua + "2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..." + + # Destroy the most recent session of the given user. + $ wp user session destroy admin + Success: Destroyed session. 3 sessions remaining. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + +
    NameDescription
    destroyDestroy a session for the given user.
    listList sessions for the given user.
    diff --git a/commands/user/session/list/index.md b/commands/user/session/list/index.md index cf3718a7..81890745 100644 --- a/commands/user/session/list/index.md +++ b/commands/user/session/list/index.md @@ -1,4 +1,59 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/list/ ---- \ No newline at end of file +layout: default +title: 'wp user session list' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [session](/commands/user/session/) » list + +`wp user session list` - List sessions for the given user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[\--fields=<fields>] +: Limit the output to specific fields. + +[\--format=<format>] +: Render output in a particular format. +\--- +default: table +options: + - table + - csv + - json + - yaml + - count + - ids +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each session: + +* token +* login_time +* expiration_time +* ip +* ua + +These fields are optionally available: + +* expiration +* login + +### EXAMPLES + + # List a user's sessions. + $ wp user session list admin@example.com --format=csv + login_time,expiration_time,ip,ua + "2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..." + + + diff --git a/commands/user/set-role/index.md b/commands/user/set-role/index.md index 91ae263c..7db0071b 100644 --- a/commands/user/set-role/index.md +++ b/commands/user/set-role/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/set-role/ ---- \ No newline at end of file +layout: default +title: 'wp user set-role' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » set-role + +`wp user set-role` - Set the user role. + +Quick links: Github issues + +
    + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[<role>] +: Make the user have the specified role. If not passed, the default role is +used. + +### EXAMPLES + + $ wp user set-role 12 author + Success: Added johndoe (12) to http://example.com as author. + + + diff --git a/commands/user/term/add/index.md b/commands/user/term/add/index.md index 2d30ee79..f8a43397 100644 --- a/commands/user/term/add/index.md +++ b/commands/user/term/add/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/add/ ---- \ No newline at end of file +layout: default +title: 'wp user term add' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [term](/commands/user/term/) » add + +`wp user term add` - Add a term to an object. + +Quick links: Github issues + +
    + +Append the term to the existing set of terms on the object. + +<id> +: The ID of the object. + +<taxonomy> +: The name of the taxonomy type to be added. + +<term>... +: The slug of the term or terms to be added. + + + diff --git a/commands/user/term/index.md b/commands/user/term/index.md index 475e9bfb..22805c67 100644 --- a/commands/user/term/index.md +++ b/commands/user/term/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/ ---- \ No newline at end of file +layout: default +title: 'wp user term' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » term + +`wp user term` - Manage user terms. + +Quick links: Github issues + +
    + +### EXAMPLES + + # Set user terms + $ wp user term set 123 test category + Success: Set terms. + + + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a term to an object.
    listList all terms associated with an object.
    removeRemove a term from an object.
    setSet object terms.
    diff --git a/commands/user/term/list/index.md b/commands/user/term/list/index.md index 478e0df0..d0b19e68 100644 --- a/commands/user/term/list/index.md +++ b/commands/user/term/list/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/list/ ---- \ No newline at end of file +layout: default +title: 'wp user term list' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [term](/commands/user/term/) » list + +`wp user term list` - List all terms associated with an object. + +Quick links: Github issues + +
    + +<id> +: ID for the object. + +<taxonomy>... +: One or more taxonomies to list. + +[\--fields=<fields>] +: Limit the output to specific row fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* term_id +* name +* slug +* taxonomy + +These fields are optionally available: + +* term_taxonomy_id +* description +* term_group +* parent +* count + + + diff --git a/commands/user/term/remove/index.md b/commands/user/term/remove/index.md index eea3816c..c2b2537f 100644 --- a/commands/user/term/remove/index.md +++ b/commands/user/term/remove/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/remove/ ---- \ No newline at end of file +layout: default +title: 'wp user term remove' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [term](/commands/user/term/) » remove + +`wp user term remove` - Remove a term from an object. + +Quick links: Github issues + +
    + +<id> +: The ID of the object. + +<taxonomy> +: The name of the term's taxonomy. + +<term>... +: The name of the term or terms to be removed from the object. + + + diff --git a/commands/user/term/set/index.md b/commands/user/term/set/index.md index 6071bdac..fd17593b 100644 --- a/commands/user/term/set/index.md +++ b/commands/user/term/set/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/set/ ---- \ No newline at end of file +layout: default +title: 'wp user term set' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » [term](/commands/user/term/) » set + +`wp user term set` - Set object terms. + +Quick links: Github issues + +
    + +Replaces existing terms on the object. + +<id> +: The ID of the object. + +<taxonomy> +: The name of the taxonomy type to be updated. + +<term>... +: The slug of the term or terms to be updated. + + + diff --git a/commands/user/update/index.md b/commands/user/update/index.md index 5bacc5d5..de37dd77 100644 --- a/commands/user/update/index.md +++ b/commands/user/update/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/update/ ---- \ No newline at end of file +layout: default +title: 'wp user update' +display_global_parameters: true +--- + +[Commands](/commands/) » [user](/commands/user/) » update + +`wp user update` - Update an existing user. + +Quick links: Github issues + +
    + +### OPTIONS + +<user>... +: The user login, user email or user ID of the user(s) to update. + +\--<field>=<value> +: One or more fields to update. For accepted fields, see wp_update_user(). + +### EXAMPLES + + # Update user + $ wp user update 123 --display_name=Mary --user_pass=marypass + Success: Updated user 123. + + + diff --git a/commands/widget/add/index.md b/commands/widget/add/index.md index 6ba31d44..2ca5b43b 100644 --- a/commands/widget/add/index.md +++ b/commands/widget/add/index.md @@ -1,4 +1,39 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/add/ ---- \ No newline at end of file +layout: default +title: 'wp widget add' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » add + +`wp widget add` - Add a widget to a sidebar. + +Quick links: Github issues + +
    + +Creates a new widget entry in the database, and associates it with the +sidebar. + +### OPTIONS + +<name> +: Widget name. + +<sidebar-id> +: ID for the corresponding sidebar. + +[<position>] +: Widget's current position within the sidebar. Defaults to last + +[\--<field>=<value>] +: Widget option to add, with its new value + +### EXAMPLES + + # Add a new calendar widget to sidebar-1 with title "Calendar" + $ wp widget add calendar sidebar-1 2 --title="Calendar" + Success: Added widget to sidebar. + + + diff --git a/commands/widget/deactivate/index.md b/commands/widget/deactivate/index.md index 6e100687..3c809aa3 100644 --- a/commands/widget/deactivate/index.md +++ b/commands/widget/deactivate/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/deactivate/ ---- \ No newline at end of file +layout: default +title: 'wp widget deactivate' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » deactivate + +`wp widget deactivate` - Deactivate one or more widgets from an active sidebar. + +Quick links: Github issues + +
    + +Moves widgets to Inactive Widgets. + +### OPTIONS + +<widget-id>... +: Unique ID for the widget(s) + +### EXAMPLES + + # Deactivate the recent-comments-2 widget. + $ wp widget deactivate recent-comments-2 + Success: 1 widget deactivated. + + + diff --git a/commands/widget/delete/index.md b/commands/widget/delete/index.md index 150dbfbf..575d9300 100644 --- a/commands/widget/delete/index.md +++ b/commands/widget/delete/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/delete/ ---- \ No newline at end of file +layout: default +title: 'wp widget delete' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » delete + +`wp widget delete` - Delete one or more widgets from a sidebar. + +Quick links: Github issues + +
    + +### OPTIONS + +<widget-id>... +: Unique ID for the widget(s) + +### EXAMPLES + + # Delete the recent-comments-2 widget from its sidebar. + $ wp widget delete recent-comments-2 + Success: Deleted 1 of 1 widgets. + + + diff --git a/commands/widget/index.md b/commands/widget/index.md index dc0c96f4..3e813049 100644 --- a/commands/widget/index.md +++ b/commands/widget/index.md @@ -1,4 +1,79 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/ ---- \ No newline at end of file +layout: default +title: 'wp widget' +display_global_parameters: true +--- + +[Commands](/commands/) » widget + +`wp widget` - Manage sidebar widgets. + +Quick links: Github issues + +
    + +### EXAMPLES + + # List widgets on a given sidebar + $ wp widget list sidebar-1 + +----------+------------+----------+----------------------+ + | name | id | position | options | + +----------+------------+----------+----------------------+ + | meta | meta-6 | 1 | {"title":"Meta"} | + | calendar | calendar-2 | 2 | {"title":"Calendar"} | + +----------+------------+----------+----------------------+ + + # Add a calendar widget to the second position on the sidebar + $ wp widget add calendar sidebar-1 2 + Success: Added widget to sidebar. + + # Update option(s) associated with a given widget + $ wp widget update calendar-1 --title="Calendar" + Success: Widget updated. + + # Delete one or more widgets entirely + $ wp widget delete calendar-2 archive-1 + Success: 2 widgets removed from sidebar. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    addAdd a widget to a sidebar.
    deactivateDeactivate one or more widgets from an active sidebar.
    deleteDelete one or more widgets from a sidebar.
    listList widgets associated with a sidebar.
    moveMove the position of a widget.
    resetReset sidebar.
    updateUpdate options for an existing widget.
    diff --git a/commands/widget/list/index.md b/commands/widget/list/index.md index de12b972..f56f455e 100644 --- a/commands/widget/list/index.md +++ b/commands/widget/list/index.md @@ -1,4 +1,55 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/list/ ---- \ No newline at end of file +layout: default +title: 'wp widget list' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » list + +`wp widget list` - List widgets associated with a sidebar. + +Quick links: Github issues + +
    + +### OPTIONS + +<sidebar-id> +: ID for the corresponding sidebar. + +[\--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 +\--- + +### AVAILABLE FIELDS + +These fields will be displayed by default for each widget: + +* name +* id +* position +* options + +There are no optionally available fields. + +### EXAMPLES + + $ wp widget list sidebar-1 --fields=name,id --format=csv + name,id + meta,meta-5 + search,search-3 + + + diff --git a/commands/widget/move/index.md b/commands/widget/move/index.md index 54233007..072dda9c 100644 --- a/commands/widget/move/index.md +++ b/commands/widget/move/index.md @@ -1,4 +1,40 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/move/ ---- \ No newline at end of file +layout: default +title: 'wp widget move' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » move + +`wp widget move` - Move the position of a widget. + +Quick links: Github issues + +
    + +Changes the order of a widget in its existing sidebar, or moves it to a +new sidebar. + +### OPTIONS + +<widget-id> +: Unique ID for the widget + +[\--position=<position>] +: Assign the widget to a new position. + +[\--sidebar-id=<sidebar-id>] +: Assign the widget to a new sidebar + +### EXAMPLES + + # Change position of widget + $ wp widget move recent-comments-2 --position=2 + Success: Widget moved. + + # Move widget to Inactive Widgets + $ wp widget move recent-comments-2 --sidebar-id=wp_inactive_widgets + Success: Widget moved. + + + diff --git a/commands/widget/reset/index.md b/commands/widget/reset/index.md index afd346fd..43ebe40f 100644 --- a/commands/widget/reset/index.md +++ b/commands/widget/reset/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/reset/ ---- \ No newline at end of file +layout: default +title: 'wp widget reset' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » reset + +`wp widget reset` - Reset sidebar. + +Quick links: Github issues + +
    + +Removes all widgets from the sidebar and places them in Inactive Widgets. + +### OPTIONS + +[<sidebar-id>...] +: One or more sidebars to reset. + +[\--all] +: If set, all sidebars will be reset. + +### EXAMPLES + + # Reset a sidebar + $ wp widget reset sidebar-1 + Success: Sidebar 'sidebar-1' reset. + + # Reset multiple sidebars + $ wp widget reset sidebar-1 sidebar-2 + Success: Sidebar 'sidebar-1' reset. + Success: Sidebar 'sidebar-2' reset. + + # Reset all sidebars + $ wp widget reset --all + Success: Sidebar 'sidebar-1' reset. + Success: Sidebar 'sidebar-2' reset. + Success: Sidebar 'sidebar-3' reset. + + + diff --git a/commands/widget/update/index.md b/commands/widget/update/index.md index 5ec3a1df..c00eacb7 100644 --- a/commands/widget/update/index.md +++ b/commands/widget/update/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/update/ ---- \ No newline at end of file +layout: default +title: 'wp widget update' +display_global_parameters: true +--- + +[Commands](/commands/) » [widget](/commands/widget/) » update + +`wp widget update` - Update options for an existing widget. + +Quick links: Github issues + +
    + +### OPTIONS + +<widget-id> +: Unique ID for the widget + +[\--<field>=<value>] +: Field to update, with its new value + +### EXAMPLES + + # Change calendar-1 widget title to "Our Calendar" + $ wp widget update calendar-1 --title="Our Calendar" + Success: Widget updated. + + + diff --git a/de/index.md b/de/index.md index 0e845141..ab63dbe0 100644 --- a/de/index.md +++ b/de/index.md @@ -1,173 +1,124 @@ -WP-CLI -====== - -[WP-CLI](https://wp-cli.org/) ist das Kommandozeilen-Werkzeug für [WordPress](https://de.wordpress.org/). Du kannst Plugins aktualisieren, Multisite-Installationen konfigurieren und vieles mehr, ohne einen Browser zu benutzen. - -Die laufende Pflege wird ermöglicht durch: - -
    - - Automattic - - - Bluehost - - - Pantheon - - - SiteGround - - - WP Engine - - - Cloudways - -
    - -Das aktuelle stabile Release ist [Version 2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/) (engl.). Folge für Ankündigungen [@wpcli auf Twitter](https://twitter.com/wpcli) oder [registriere dich für Aktualisierungen per E-Mail](https://make.wordpress.org/cli/subscribe/) (engl.). [Sieh dir die Roadmap an](https://make.wordpress.org/cli/handbook/roadmap/) (engl.), um einen Überblick zu erhalten, was in zukünftigen Releases geplant ist. - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Durchschnittliche Zeit, bis ein Problem behoben wurde](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Durchschnittliche Zeit, bis ein Problem behoben wurde") [![Prozentuale Anzahl an offenen Problemen](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Prozentuale Anzahl an offenen Problemen") +--- +layout: default +title: Kommandozeilen-Interface für WordPress +--- + +[WP-CLI](https://wp-cli.org/) ist eine Sammlung von Kommandozeilen-Tools zur Verwaltung von [WordPress](https://wordpress.org/) Installationen. Du kannst Plugins aktualisieren, Multisite Installationen konfigurieren und vieles mehr, ohne einen Browser zu verwenden. + +Um stets auf dem Laufenden zu bleiben, folge [@wpcli auf Twitter](https://twitter.com/wpcli) oder [abonniere den Newsletter](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). + +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Abhängigkeiten Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Durchschnittliche Zeit bis zur Lösung eines Issues](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Durchschnittliche Zeit bis zur Lösung eines Issues") [![Prozentsatz noch offener Issues](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Prozentsatz noch offener Issues") Quick links: [Benutzung](#benutzung) | [Installation](#installation) | [Support](#support) | [Erweitern](#erweitern) | [Mitwirken](#mitwirken) | [Credits](#credits) ## Benutzung -WP-CLI bietet eine Kommandozeilen-Benutzeroberfläche für viele Aktionen, die du eigentlich im WordPress-Administrationsbereich durchführst. `wp plugin install --activate` ([Dok.](https://developer.wordpress.org/cli/commands/plugin/install/)) lässt dich beispielsweise ein WordPress-Plugin installieren und aktivieren: +Das Ziel von WP-CLI ist es, für jede Aktion ein Kommandozeilen-Interface zur Verfügung zu stellen, die man auch über den Adminbereich ausführen kann. Mit `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) kann man zum Beispiel ein WordPress Plugin installieren und aktivieren: ```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. ``` -WP-CLI enthält auch Befehle für viele Dinge, die du im WordPress-Administrationsbereich nicht tun kannst. Mit `wp transient delete-all` ([Dok.](https://developer.wordpress.org/cli/commands/transient/delete/)) kannst du beispielsweise bestimmte oder alle Transients löschen: +WP-CLI enthält auch Befehle für viele Dinge, die man im Adminbereich nicht tun kann. Mit `wp transient delete-all` ([doc](https://wp-cli.org/commands/transient/delete-all/)) kannst du z.B. bestimmte oder alle Transients löschen: ```bash -$ wp transient delete --all +$ wp transient delete-all Success: 34 transients deleted from the database. ``` -Für eine umfassendere Einführung in die Benutzung von WP-CLI, lies am besten die [Schnellstartanleitung](https://make.wordpress.org/cli/handbook/quick-start/) (engl.), oder sieh dir [Shell-Freunde](https://make.wordpress.org/cli/handbook/shell-friends/) (engl.) an, um mehr über die Kommandozeilen-Helferlein zu erfahren. +Für eine umfassendere Einführung in die Benutzung von WP-CLI, lies am besten den [Quick Start guide](https://wp-cli.org/docs/quick-start/). -Bereits genug von den Basics? Sieh dir die [komplette Liste an Befehlen](https://developer.wordpress.org/cli/commands/) (engl.) für detailliertere Informationen zur Verwaltung von Themes und Plugins, Datenimport und -export, Suchen/Ersetzen-Operationen in der Datenbank und mehr an. +Bereits genug von den Basics? Sieh dir die [komplette Liste an Befehlen](https://wp-cli.org/commands/) an für detailliertere Informationen zur Verwaltung von Themes und Plugins, Datenimport und -export, Suchen/Ersetzen-Operationen in der Datenbank und mehr. ## Installation -Das Herunterladen der Phar Datei ist unsere empfohlene Installationsweise. Falls nötig, gibt es auch eine Dokumentation zu [alternativen Installationsmethoden](https://make.wordpress.org/cli/handbook/installing/) (engl.) ([Composer](https://make.wordpress.org/cli/handbook/installing/#installing-via-composer) (engl.), [Homebrew](https://make.wordpress.org/cli/handbook/installing/#installing-via-homebrew) (engl.), [Docker](https://make.wordpress.org/cli/handbook/installing/#installing-via-docker) (engl.)). +Das Herunterladen der Phar Datei ist unsere empfohlene Installationsweise. Falls nötig, gibt es auch eine Dokumentation zu [alternativen Installationsmethoden](https://wp-cli.org/docs/installing/). Bevor du WP-CLI installierst, stell bitte sicher, dass dein System die Mindestanforderungen erfüllt: - UNIX-ähnliche Umgebung (OS X, Linux, FreeBSD, Cygwin); eingeschränkter Support in Windows-Umgebungen -- PHP 5.6 oder neuer -- WordPress 3.7 oder neuer. Ältere Versionen als das aktuelle WordPress-Release haben funktionelle Einschränkungen +- PHP 5.3.29 oder höher +- WordPress 3.7 oder höher -Sobald du die Mindestanforderungen geprüft hast, lade die [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar)-Datei mittels `wget` oder `curl` herunter: +Sobald du die Mindestanforderungen geprüft hast, lade die [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) Datei mittels `wget` oder `curl` herunter: ```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 ``` -Prüfe als nächstes, ob die Phar-Datei funktioniert: +Prüfe als nächstes, ob es funktioniert: ```bash -php wp-cli.phar --info +$ php wp-cli.phar --info ``` -Um WP-CLI auf der Kommandozeile durch blosses Eintippen von `wp` zu benutzen, mach die Datei ausführbar und verschiebe sie irgendwo hin innerhalb deines PATH. Zum Beispiel: +Um WP-CLI auf der Kommandozeile durch blosses Tippen von `wp` zu nutzen, mache die Datei ausführbar und verschiebe es irgendwo hin innerhalb deines PATH. Zum Beispiel: ```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 ``` Wenn WP-CLI erfolgreich installiert wurde, solltest du bei der Ausführung von `wp --info` etwas wie hier sehen: ```bash $ wp --info -OS: Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 -Shell: /usr/bin/zsh -PHP binary: /usr/bin/php8.1 -PHP version: 8.1.0 -php.ini used: /etc/php/8.1/cli/php.ini -MySQL binary: /usr/bin/mysql -MySQL version: mysql Ver 8.0.27-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.25.0 ``` ### Aktualisieren -Du kannst WP-CLI mittels `wp cli update` ([Dok.](https://developer.wordpress.org/cli/commands/cli/update/) (engl.)) aktualisieren oder indem du die obigen Installationsschritte wiederholst. +Du kannst WP-CLI mittels `wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)) aktualisieren oder indem du die obigen Installationsschritte wiederholst. -Wenn WP-CLI dem root-Benutzer oder einem anderen Systembenutzer gehört, musst du `sudo wp cli update` ausführen. - -Lebst du gerne gefährlich? Führe `wp cli update --nightly` aus, um den letzten Nightly Build von WP-CLI zu benutzen. Der Nightly Build ist mehr oder weniger stabil genug für die Nutzung in deiner Entwicklungsumgebung und enthält jeweils die neusten und besten Funktionen von WP-CLI. +Lebst du gerne gefährlich? Führe `wp cli update --nightly` aus um den aktuellsten Nightly Build von WP-CLI zu nutzen. Der Nightly Build ist mehr oder weniger stabil genug für die Nutzung in deiner Entwicklungsumgebung und enthält jeweils die neusten und besten Features von WP-CLI. ### Tab-Vervollständigung -Für WP-CLI gibt es auch ein Skript zur Autovervollständigung von Befehlen für Bash und ZSH. Lade einfach die [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) herunter und referenziere sie in der `~/.bash_profile`-Datei: +Für WP-CLI gibt es auch ein Skript zur Autovervollständigung von Befehlen für Bash und ZSH. Lade einfach [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) herunter und referenziere es in der `~/.bash_profile` Datei: ```bash -source /ABSOLUTER/PFAD/ZUR/wp-completion.bash +source /FULL/PATH/TO/wp-completion.bash ``` Vergiss nicht, danach `source ~/.bash_profile` auszuführen. -Wenn du zsh für deine Shell benutzt, musst du möglicherweise erst `bashcompinit` laden und starten, bevor du den `source`-Befehl nutzt. Füge das folgende in deine `.zshrc` ein: - -```bash -autoload bashcompinit -bashcompinit -source /ABSOLUTER/PFAD/ZUR/wp-completion.bash -``` - ## Support -Die Betreuer und Mitwirkenden hinter WP-CLI sind Freiwillige und haben nur begrenzt Zeit, um generelle Supportanfragen zu beantworten. Die [aktuelle Version von WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) (engl.) ist die einzig offizielle unterstützte Version. - -Prüfe zunächst, ob es bereits auf einer dieser Seiten eine Antwort auf deine Frage gibt: +Die Betreuer und Mitwirkenden hinter WP-CLI sind Freiwillige und haben nur begrenzt Zeit um generelle Supportanfragen zu beantworten. Prüfe zunächst, ob es bereits an einem dieser Orte eine Antwort auf deine Frage gibt: -- [Gängige Probleme und deren Lösungen](https://make.wordpress.org/cli/handbook/common-issues/) (engl.) -* [WP-CLI-Handbuch](https://make.wordpress.org/cli/handbook/) (engl.) -* [Offene oder geschlossene Probleme in der WP-CLI-GitHub-Organisation](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) (engl.) -* [Themen mit dem Tag 'WP-CLI' im WordPress.org-Supportforum](https://wordpress.org/support/topic-tag/wp-cli/) (engl.) -* [Fragen mit dem Tag 'WP-CLI' im WordPress-StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) (engl.) +- [Gängige Fehler und deren Lösungen](https://wp-cli.org/docs/common-issues/) +- [Best Practices beim Erstellen eines Bug Reports](https://wp-cli.org/docs/bug-reports/) +- [Dokumentationsportal](https://wp-cli.org/docs/) +- [Offene oder geschlossene Issues auf Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [WordPress StackExchange Foren](http://wordpress.stackexchange.com/questions/tagged/wp-cli) -Wenn du auf keiner dieser Seiten eine Antwort findest, kannst du folgendes tun: +Wenn du auf keiner dieser Seiten eine Antwort finden kannst, trete dem `#cli` Channel des [WordPress.org Slack Teams](https://make.wordpress.org/chat/) bei um zu sehen, ob ein Community-Mitglied dir weiterhelfen kann. Professionelle Benutzer können auch [runcommand](https://runcommand.io/) für Premium Support in Betracht ziehen. -* Tritt dem `#cli`-Kanal im [WordPress.org Slack](https://make.wordpress.org/chat/) (engl.) bei, um mit jemandem zu chatten, der gerade da ist. Das ist die beste Möglichkeit für kleine Fragen. -* [Erstelle ein neues Thema](https://wordpress.org/support/forum/wp-advanced/#new-post) (engl.) im WordPress.org-Supportforum und füge den Tag 'WP-CLI' hinzu, sodass die Community es sieht. +GitHub Issues sind nur für das Verwalten von Erweiterungen und Bugs existierender Befehle gedacht, nicht allgemeinen Support. Schau dir [unsere Best Practices](https://wp-cli.org/docs/bug-reports/) an, bevor du einen Bug meldest, damit dein Issue in angemessener Zeit bearbeitet werden kann. -GitHub Issues sind nur für das Verwalten von Erweiterungen und Bugs existierender Befehle gedacht, nicht für allgemeinen Support. Sieh dir [unsere Best Practices](https://make.wordpress.org/cli/handbook/bug-reports/) (engl.) an, bevor du einen Fehler meldest, damit dein Issue in angemessener Zeit bearbeitet werden kann. +Bitte stell keine Supportfragen auf Twitter. Twitter ist kein akzeptabler Ort für Support weil: 1) es ist schwierig Konversationen unter 140 Zeichen zu führen und 2) Twitter ist kein Ort, wo jemand mit der gleichen Frage frühere Antworten in einer Konversation finden kann. -Bitte stell keine Supportfragen auf Twitter. Twitter ist kein akzeptabler Ort für Support weil: 1) es ist schwierig Konversationen unter 280 Zeichen zu führen und 2) Twitter ist kein Ort, an dem jemand mit der gleichen Frage frühere Antworten in einer Konversation finden kann. - -Denk daran, frei != gratis. Die Open-Source-Lizenz garantiert dir die Freiheit zur Nutzung und Bearbeitung, aber nicht anderer Leute Zeit. Bitte sei respektvoll und setze deine Erwartungen dementsprechend. +Denk daran, frei != gratis. Die Open Source Lizenz garantiert dir die Freiheit zur Nutzung und Bearbeitung, aber nicht anderer Leute Zeit. Bitte sei respektvoll und setze deine Erwartungen dementsprechend. ## Erweitern -Ein **Befehl** ist die atomare Einheit der WP-CLI Funktionalität. `wp plugin install` ([Dok.](https://developer.wordpress.org/cli/commands/plugin/install/) (engl.)) ist ein Befehl. `wp plugin activate` ([Dok.](https://developer.wordpress.org/cli/commands/plugin/activate/) (engl.)) ist ein anderer. +Ein **Befehl** ist die atomare Einheit der WP-CLI Funktionalität. `wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) ist ein solcher Befehl. `wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) ein anderer. -WP-CLI unterstützt das Registrieren jeder aufrufbaren Klasse, Funktion oder Closure als Befehl. Es liest die Informationen zur Nutzung aus der PHPdoc des Callbacks aus. `WP_CLI::add_command()` ([Dok.](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/) (engl.)) wird sowohl für die Registrierung interner als auch für Befehle von Dritten verwendet. +WP-CLI unterstützt das Registrieren jeder aufrufbaren Klasse, Funktion oder Closure als Befehl. Es liest die Informationen zur Nutzung aus der PHPdoc des Callbacks aus. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) wird sowohl für die Registration interner Befehle als auch für Befehle von Dritten verwendet. ```php /** @@ -197,32 +148,36 @@ $delete_option_cmd = function( $args ) { WP_CLI::add_command( 'option delete', $delete_option_cmd ); ``` -WP-CLI enthält Dutzende Befehle. Es ist auch einfacher, als es aussieht, eigene Befehle zu erstellen. Lies dazu das [Befehle-Kochbuch](https://make.wordpress.org/cli/handbook/commands-cookbook/) (engl.), um mehr zu erfahren. Stöbere in der [internen API-Dokumentation](https://make.wordpress.org/cli/handbook/internal-api/) (engl.), um eine Vielzahl hilfreicher Funktionen zu entdecken, die du in deinem eigenen WP-CLI Befehl benutzen kannst. +WP-CLI enthält Dutzende Befehle. Es ist auch sehr einfach eigene Befehle zu erstellen. Lies dazu das [Commands Cookbook](https://wp-cli.org/docs/commands-cookbook/) um mehr zu erfahren. Stöbere in der [internen API-Dokumentation](https://wp-cli.org/docs/internal-api/) um eine Vielzahl hilfreicher Funktionen zu entdecken, welche du in deinem eigenen WP-CLI Befehl nutzen kannst. ## Mitwirken -Wir schätzen es sehr, dass du interessiert bist, an WP-CLI mitzuwirken. Nur wegen dir und der Community um dich herum ist WP-CLI so ein tolles Projekt. +Willkommen und danke! + +Wir schätzen es sehr, dass du interessiert bist an WP-CLI mitzuwirken. Nur wegen dir und der Community um dich herum ist WP-CLI so ein tolles Projekt. -**Mitwirken beschränkt sich nicht nur auf’s Programmieren.** Wir möchten dich dazu ermutigen, das beizutragen, was du am besten kannst. Sei es durch das Schreiben von Tutorials, das Vorstellen von WP-CLI bei einem lokalen Meetup, anderen Nutzern bei ihren Supportfragen zu helfen oder unsere Dokumentation zu pflegen. +**Mitwirken beschränkt sich nicht nur aufs Programmieren.** Wir möchten dich dazu ermutigen, das beizutragen, was du am besten kannst. Sei es durch das Schreiben von Tutorials, das Vorstellen von WP-CLI an einem lokalen Meetup, anderen Nutzern bei ihren Supportfragen zu helfen oder unsere Dokumentation zu pflegen. -Lies unsere [Guidelines im Handbuch](https://make.wordpress.org/cli/handbook/contributing/) (engl.), um eine Einführung zu bekommen, wie du mitwirken kannst. Das Einhalten dieser Guidelines zeigt, dass du die Zeit respektierst, die andere in dieses Projekt investieren. Im Gegensatz werden andere Betreuer rund um den Globus diesen Respekt erwidern. +Nimm dir bitte einen Moment Zeit um [unsere Guidelines in Ruhe durchzulesen](https://wp-cli.org/docs/contributing/). Das Einhalten dieser Guidelines zeigt, dass du die Zeit respektierst, welche andere in dieses Projekt investieren. Im Gegensatz werden andere Betreuer rund um den Globus diesen Respekt erwidern. ## Projektleitung -WP-CLI hat einen Projektbetreuer: [schlessera](https://github.com/schlessera) (engl.). +WP-CLI wird von folgenden Personen geleitet: -Gelegentlich [vergeben wir Schreibzugriff an Mitwirkende](https://make.wordpress.org/cli/handbook/committers-credo/), die über längere Zeit gezeigt haben, dass sie in der Lage sind, in das Projekt zu investieren und es voranzubringen. +* [Daniel Bachhuber](https://github.com/danielbachhuber/) - aktueller Betreuer +* [Cristi Burcă](https://github.com/scribu) - vorheriger Betreuer +* [Andreas Creten](https://github.com/andreascreten) - Gründer -Lies dir das [Verwaltungsdokument im Handbuch](https://make.wordpress.org/cli/handbook/governance/) (engl.) für mehr operative Informationen bezüglich dieses Projekts durch. +Lies mehr über die [Projektstruktur](https://wp-cli.org/docs/governance/) und schau dir die [komplette Liste von Mitwirkenden](https://github.com/wp-cli/wp-cli/contributors) an. ## Credits -Neben den Bibliotheken, die in der [composer.json](composer.json)-Datei erwähnt werden, benutzen wir Code oder Ideen von folgenden Projekten: +Neben den Bibliotheken, die in der [composer.json](composer.json) Datei erwähnt werden, nutzen wir Code oder Ideen von folgenden Projekten: -* [Drush](https://github.com/drush-ops/drush) (engl.) für… viele Dinge -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) (engl.) für `wp shell` -* [Regenerate Thumbnails](https://de.wordpress.org/plugins/regenerate-thumbnails/) für `wp media regenerate` -* [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) (engl.) für `wp search-replace` -* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) (engl.) für `wp export` -* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) (engl.) für `wp import` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) (engl.) für `wp scaffold plugin-tests` +* [Drush](http://drush.ws/) für... viele Dinge +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) für `wp shell` +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) für `wp media regenerate` +* [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) für `wp search-replace` +* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) für `wp export` +* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) für `wp import` +* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) für `wp scaffold plugin-tests` diff --git a/docs/index.md b/docs/index.md index 34f08659..d8279b35 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,11 @@ --- -redirect_to: - - https://make.wordpress.org/cli/handbook/ +layout: doc +title: Documentation +description: Helpful guides and resources for using WP-CLI. --- + +Here are some helpful guides and resources for using WP-CLI. + +Can't find what you're looking for? [Open an issue](https://github.com/wp-cli/wp-cli/issues) to request improvements. + +{% include doc-list.html %} diff --git a/docs/internal-api/index.md b/docs/internal-api/index.md new file mode 100644 index 00000000..4a5cb504 --- /dev/null +++ b/docs/internal-api/index.md @@ -0,0 +1,14 @@ +--- +layout: doc +title: Internal API +category: References +description: Stable utilities considered safe to use in community commands. +--- + +WP-CLI includes a number of utilities which are considered stable and meant to be used by commands. + +This also means functions and methods not listed here are considered part of the private API. They may change or disappear at any time. + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + +{% include internal-api-list.html %} diff --git a/docs/internal-api/wp-cli-add-command/index.md b/docs/internal-api/wp-cli-add-command/index.md new file mode 100644 index 00000000..3343d817 --- /dev/null +++ b/docs/internal-api/wp-cli-add-command/index.md @@ -0,0 +1,82 @@ +--- +layout: default +title: WP_CLI::add_command() +description: "Register a command to WP-CLI." +--- + +Docs » Internal API » Registration + +## WP_CLI::add_command() + +Register a command to WP-CLI. + +*** + +### Usage + + WP_CLI::add_command( $name, $callable, $args = array() ) + +
    +$name (string) Name for the command (e.g. "post list" or "site empty").
    +$callable (string) Command implementation as a class, function or closure.
    +$args (array) {
    Optional An associative array with additional registration parameters.
    'before_invoke' => callback to execute before invoking the command,
    'after_invoke' => callback to execute after invoking the command,
    'shortdesc' => short description (80 char or less) for the command,
    'synopsis' => the synopsis for the command (string or array),
    'when' => execute callback on a named WP-CLI hook (e.g. before_wp_load),
    }
    +@return (true) on success, hard error if registration failed.
    +
    + + +*** + +### Notes + +WP-CLI supports using any callable class, function, or closure as a +command. `WP_CLI::add_command()` is used for both internal and +third-party command registration. + +Command arguments are parsed from PHPDoc by default, but also can be +supplied as an optional third argument during registration. + + + # Register a custom 'foo' command to output a supplied positional param. + # + # $ wp foo bar + # Success: bar + + /** + * My awesome closure command + * + * + * : An awesome message to display + * + * @when before_wp_load + */ + $foo = function( $args ) { + WP_CLI::success( $args[0] ); + }; + WP_CLI::add_command( 'foo', $foo ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-add-hook/index.md b/docs/internal-api/wp-cli-add-hook/index.md new file mode 100644 index 00000000..f028c010 --- /dev/null +++ b/docs/internal-api/wp-cli-add-hook/index.md @@ -0,0 +1,79 @@ +--- +layout: default +title: WP_CLI::add_hook() +description: "Schedule a callback to be executed at a certain point." +--- + +Docs » Internal API » Registration + +## WP_CLI::add_hook() + +Schedule a callback to be executed at a certain point. + +*** + +### Usage + + WP_CLI::add_hook( $when, $callback ) + +
    +$when (string) Identifier for the hook.
    +$callback (mixed) Callback to execute when hook is called.
    +@return (null)
    +
    + + +*** + +### Notes + +Hooks conceptually are very similar to WordPress actions. WP-CLI hooks +are typically called before WordPress is loaded. + +WP-CLI hooks include: + +* `before_invoke:` - Just before a command is invoked. +* `after_invoke:` - Just after a command is involved. +* `before_wp_load` - Just before the WP load process begins. +* `before_wp_config_load` - After wp-config.php has been located. +* `after_wp_config_load` - After wp-config.php has been loaded into scope. +* `after_wp_load` - Just after the WP load process has completed. + +WP-CLI commands can create their own hooks with `WP_CLI::do_hook()`. + + + # `wp network meta` confirms command is executing in multisite context. + WP_CLI::add_command( 'network meta', 'Network_Meta_Command', array( + 'before_invoke' => function () { + if ( !is_multisite() ) { + WP_CLI::error( 'This is not a multisite install.' ); + } + } + ) ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-add-wp-hook/index.md b/docs/internal-api/wp-cli-add-wp-hook/index.md new file mode 100644 index 00000000..7b66d272 --- /dev/null +++ b/docs/internal-api/wp-cli-add-wp-hook/index.md @@ -0,0 +1,60 @@ +--- +layout: default +title: WP_CLI::add_wp_hook() +description: "Add a callback to a WordPress action or filter." +--- + +Docs » Internal API » Registration + +## WP_CLI::add_wp_hook() + +Add a callback to a WordPress action or filter. + +*** + +### Usage + + WP_CLI::add_wp_hook( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) + +
    +$tag (string) Named WordPress action or filter.
    +$function_to_add (mixed) Callable to execute when the action or filter is evaluated.
    +$priority (integer) Priority to add the callback as.
    +$accepted_args (integer) Number of arguments to pass to callback.
    +@return (true)
    +
    + + +*** + +### Notes + +`add_action()` without needing access to `add_action()`. If WordPress is +already loaded though, you should use `add_action()` (and `add_filter()`) +instead. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-colorize/index.md b/docs/internal-api/wp-cli-colorize/index.md new file mode 100644 index 00000000..890c135b --- /dev/null +++ b/docs/internal-api/wp-cli-colorize/index.md @@ -0,0 +1,118 @@ +--- +layout: default +title: WP_CLI::colorize() +description: "Colorize a string for output." +--- + +Docs » Internal API » Output + +## WP_CLI::colorize() + +Colorize a string for output. + +*** + +### Usage + + WP_CLI::colorize( $string ) + +
    +$string (string) String to colorize for output, with color tokens.
    +@return (string) string.
    +
    + + +*** + +### Notes + +Yes, you too can change the color of command line text. For instance, +here's how `WP_CLI::success()` colorizes "Success: " + + + WP_CLI::colorize( "%GSuccess:%n " ) + + +Uses `\cli\Colors::colorize()` to transform color tokens to display +settings. Choose from the following tokens (and note 'reset'): + +* %y => ['color' => 'yellow'], +* %g => ['color' => 'green'], +* %b => ['color' => 'blue'], +* %r => ['color' => 'red'], +* %p => ['color' => 'magenta'], +* %m => ['color' => 'magenta'], +* %c => ['color' => 'cyan'], +* %w => ['color' => 'grey'], +* %k => ['color' => 'black'], +* %n => ['color' => 'reset'], +* %Y => ['color' => 'yellow', 'style' => 'bright'], +* %G => ['color' => 'green', 'style' => 'bright'], +* %B => ['color' => 'blue', 'style' => 'bright'], +* %R => ['color' => 'red', 'style' => 'bright'], +* %P => ['color' => 'magenta', 'style' => 'bright'], +* %M => ['color' => 'magenta', 'style' => 'bright'], +* %C => ['color' => 'cyan', 'style' => 'bright'], +* %W => ['color' => 'grey', 'style' => 'bright'], +* %K => ['color' => 'black', 'style' => 'bright'], +* %N => ['color' => 'reset', 'style' => 'bright'], +* %3 => ['background' => 'yellow'], +* %2 => ['background' => 'green'], +* %4 => ['background' => 'blue'], +* %1 => ['background' => 'red'], +* %5 => ['background' => 'magenta'], +* %6 => ['background' => 'cyan'], +* %7 => ['background' => 'grey'], +* %0 => ['background' => 'black'], +* %F => ['style' => 'blink'], +* %U => ['style' => 'underline'], +* %8 => ['style' => 'inverse'], +* %9 => ['style' => 'bright'], +* %_ => ['style' => 'bright'] + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-confirm/index.md b/docs/internal-api/wp-cli-confirm/index.md new file mode 100644 index 00000000..0bdf2055 --- /dev/null +++ b/docs/internal-api/wp-cli-confirm/index.md @@ -0,0 +1,71 @@ +--- +layout: default +title: WP_CLI::confirm() +description: "Ask for confirmation before running a destructive operation." +--- + +Docs » Internal API » Input + +## WP_CLI::confirm() + +Ask for confirmation before running a destructive operation. + +*** + +### Usage + + WP_CLI::confirm( $question, $assoc_args = array() ) + +
    +$question (string) Question to display before the prompt.
    +$assoc_args (array) Skips prompt if 'yes' is provided.
    +
    + + +*** + +### Notes + +If 'y' is provided to the question, the script execution continues. If +'n' or any other response is provided to the question, script exits. + + + # `wp db drop` asks for confirmation before dropping the database. + + WP_CLI::confirm( "Are you sure you want to drop the database?", $assoc_args ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-debug/index.md b/docs/internal-api/wp-cli-debug/index.md new file mode 100644 index 00000000..887967d2 --- /dev/null +++ b/docs/internal-api/wp-cli-debug/index.md @@ -0,0 +1,94 @@ +--- +layout: default +title: WP_CLI::debug() +description: "Display debug message prefixed with "Debug: " when `--debug` is used." +--- + +Docs » Internal API » Output + +## WP_CLI::debug() + +Display debug message prefixed with "Debug: " when `--debug` is used. + +*** + +### Usage + + WP_CLI::debug( $message, $group = false ) + +
    +$message (string) Message to write to STDERR.
    +$group (string) Organize debug message to a specific group.
    +@return (null)
    +
    + + +*** + +### Notes + +Debug message is written to STDERR, and includes script execution time. + +Helpful for optionally showing greater detail when needed. Used throughout +WP-CLI bootstrap process for easier debugging and profiling. + + + # Called in `WP_CLI\Runner::set_wp_root()`. + private static function set_wp_root( $path ) { + define( 'ABSPATH', rtrim( $path, '/' ) . '/' ); + WP_CLI::debug( 'ABSPATH defined: ' . ABSPATH ); + $_SERVER['DOCUMENT_ROOT'] = realpath( $path ); + } + + # Debug details only appear when `--debug` is used. + # $ wp --debug + # [...] + # Debug: ABSPATH defined: /srv/www/wordpress-develop.dev/src/ (0.225s) + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-do-hook/index.md b/docs/internal-api/wp-cli-do-hook/index.md new file mode 100644 index 00000000..13d8ad13 --- /dev/null +++ b/docs/internal-api/wp-cli-do-hook/index.md @@ -0,0 +1,56 @@ +--- +layout: default +title: WP_CLI::do_hook() +description: "Execute callbacks registered to a given hook." +--- + +Docs » Internal API » Registration + +## WP_CLI::do_hook() + +Execute callbacks registered to a given hook. + +*** + +### Usage + + WP_CLI::do_hook( $when ) + +
    +$when (string) Identifier for the hook.
    +@return (null)
    +
    + + +*** + +### Notes + +See `WP_CLI::add_hook()` for details on WP-CLI's internal hook system. +Commands can provide and call their own hooks. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-error-multi-line/index.md b/docs/internal-api/wp-cli-error-multi-line/index.md new file mode 100644 index 00000000..619e37ae --- /dev/null +++ b/docs/internal-api/wp-cli-error-multi-line/index.md @@ -0,0 +1,75 @@ +--- +layout: default +title: WP_CLI::error_multi_line() +description: "Display a multi-line error message in a red box. Doesn't exit script." +--- + +Docs » Internal API » Output + +## WP_CLI::error_multi_line() + +Display a multi-line error message in a red box. Doesn't exit script. + +*** + +### Usage + + WP_CLI::error_multi_line( $message_lines ) + +
    +$message (array) Multi-line error message to be displayed.
    +
    + + +*** + +### Notes + +Error message is written to STDERR. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-error/index.md b/docs/internal-api/wp-cli-error/index.md new file mode 100644 index 00000000..bbf761be --- /dev/null +++ b/docs/internal-api/wp-cli-error/index.md @@ -0,0 +1,88 @@ +--- +layout: default +title: WP_CLI::error() +description: "Display error message prefixed with "Error: " and exit script." +--- + +Docs » Internal API » Output + +## WP_CLI::error() + +Display error message prefixed with "Error: " and exit script. + +*** + +### Usage + + WP_CLI::error( $message, $exit = true ) + +
    +$message (string|WP_Error) Message to write to STDERR.
    +$exit (boolean|integer) True defaults to exit(1).
    +@return (null)
    +
    + + +*** + +### Notes + +Error message is written to STDERR. Defaults to halting script execution +with return code 1. + +Use `WP_CLI::warning()` instead when script execution should be permitted +to continue. + + + # `wp cache flush` considers flush failure to be a fatal error. + if ( false === wp_cache_flush() ) { + WP_CLI::error( 'The object cache could not be flushed.' ); + } + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-get-config/index.md b/docs/internal-api/wp-cli-get-config/index.md new file mode 100644 index 00000000..4375a501 --- /dev/null +++ b/docs/internal-api/wp-cli-get-config/index.md @@ -0,0 +1,69 @@ +--- +layout: default +title: WP_CLI::get_config() +description: "Get values of global configuration parameters." +--- + +Docs » Internal API » Input + +## WP_CLI::get_config() + +Get values of global configuration parameters. + +*** + +### Usage + + WP_CLI::get_config( $key = null ) + +
    +$key (string) Get value for a specific global configuration parameter.
    +@return (mixed)
    +
    + + +*** + +### Notes + +Provides access to `--path=`, `--url=`, and other values of +the [global configuration parameters](https://wp-cli.org/config/). + + + WP_CLI::log( 'The --url= value is: ' . WP_CLI::get_config( 'url' ) ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-get-php-binary/index.md b/docs/internal-api/wp-cli-get-php-binary/index.md new file mode 100644 index 00000000..56259e6f --- /dev/null +++ b/docs/internal-api/wp-cli-get-php-binary/index.md @@ -0,0 +1,48 @@ +--- +layout: default +title: WP_CLI::get_php_binary() +description: "Get the path to the PHP binary used when executing WP-CLI." +--- + +Docs » Internal API » System + +## WP_CLI::get_php_binary() + +Get the path to the PHP binary used when executing WP-CLI. + +*** + +### Usage + + WP_CLI::get_php_binary() + +
    +@return (string)
    +
    + + +*** + +### Notes + +Environment values permit specific binaries to be indicated. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-halt/index.md b/docs/internal-api/wp-cli-halt/index.md new file mode 100644 index 00000000..6f034588 --- /dev/null +++ b/docs/internal-api/wp-cli-halt/index.md @@ -0,0 +1,75 @@ +--- +layout: default +title: WP_CLI::halt() +description: "Halt script execution with a specific return code." +--- + +Docs » Internal API » Output + +## WP_CLI::halt() + +Halt script execution with a specific return code. + +*** + +### Usage + + WP_CLI::halt( $return_code ) + +
    +$return_code (integer)
    +
    + + +*** + +### Notes + +Permits script execution to be overloaded by `WP_CLI::runcommand()` + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-launch-self/index.md b/docs/internal-api/wp-cli-launch-self/index.md new file mode 100644 index 00000000..68876c9e --- /dev/null +++ b/docs/internal-api/wp-cli-launch-self/index.md @@ -0,0 +1,65 @@ +--- +layout: default +title: WP_CLI::launch_self() +description: "Run a WP-CLI command in a new process reusing the current runtime arguments." +--- + +Docs » Internal API » Execution + +## WP_CLI::launch_self() + +Run a WP-CLI command in a new process reusing the current runtime arguments. + +*** + +### Usage + + WP_CLI::launch_self( $command, $args = array(), $assoc_args = array(), $exit_on_error = true, $return_detailed = false, $runtime_args = array() ) + +
    +$command (string) WP-CLI command to call.
    +$args (array) Positional arguments to include when calling the command.
    +$assoc_args (array) Associative arguments to include when calling the command.
    +$exit_on_error (bool) Whether to exit if the command returns an elevated return code.
    +$return_detailed (bool) Whether to return an exit status (default) or detailed execution results.
    +$runtime_args (array) Override one or more global args (path,url,user,allow-root)
    +@return (int|ProcessRun) command exit status, or a ProcessRun instance
    +
    + + +*** + +### Notes + +Use `WP_CLI::runcommand()` instead, which is easier to use and works better. + +Note: While this command does persist a limited set of runtime arguments, +it *does not* persist environment variables. Practically speaking, WP-CLI +packages won't be loaded when using WP_CLI::launch_self() because the +launched process doesn't have access to the current process $HOME. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-launch/index.md b/docs/internal-api/wp-cli-launch/index.md new file mode 100644 index 00000000..03c8abf8 --- /dev/null +++ b/docs/internal-api/wp-cli-launch/index.md @@ -0,0 +1,64 @@ +--- +layout: default +title: WP_CLI::launch() +description: "Launch an arbitrary external process that takes over I/O." +--- + +Docs » Internal API » Execution + +## WP_CLI::launch() + +Launch an arbitrary external process that takes over I/O. + +*** + +### Usage + + WP_CLI::launch( $command, $exit_on_error = true, $return_detailed = false ) + +
    +$command (string) External process to launch.
    +$exit_on_error (boolean) Whether to exit if the command returns an elevated return code.
    +$return_detailed (boolean) Whether to return an exit status (default) or detailed execution results.
    +@return (int|ProcessRun) command exit status, or a ProcessRun object for full details.
    +
    + + +*** + +### Notes + + + # `wp core download` falls back to the `tar` binary when PharData isn't available + if ( ! class_exists( 'PharData' ) ) { + $cmd = "tar xz --strip-components=1 --directory=%s -f $tarball"; + WP_CLI::launch( Utils\esc_cmd( $cmd, $dest ) ); + return; + } + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-line/index.md b/docs/internal-api/wp-cli-line/index.md new file mode 100644 index 00000000..eca31442 --- /dev/null +++ b/docs/internal-api/wp-cli-line/index.md @@ -0,0 +1,77 @@ +--- +layout: default +title: WP_CLI::line() +description: "Display informational message without prefix, and ignore `--quiet`." +--- + +Docs » Internal API » Output + +## WP_CLI::line() + +Display informational message without prefix, and ignore `--quiet`. + +*** + +### Usage + + WP_CLI::line( $message = '' ) + +
    +$message (string) Message to display to the end user.
    +@return (null)
    +
    + + +*** + +### Notes + +Message is written to STDOUT. `WP_CLI::log()` is typically recommended; +`WP_CLI::line()` is included for historical compat. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-log/index.md b/docs/internal-api/wp-cli-log/index.md new file mode 100644 index 00000000..eb39015c --- /dev/null +++ b/docs/internal-api/wp-cli-log/index.md @@ -0,0 +1,80 @@ +--- +layout: default +title: WP_CLI::log() +description: "Display informational message without prefix." +--- + +Docs » Internal API » Output + +## WP_CLI::log() + +Display informational message without prefix. + +*** + +### Usage + + WP_CLI::log( $message ) + +
    +$message (string) Message to write to STDOUT.
    +
    + + +*** + +### Notes + +Message is written to STDOUT, or discarded when `--quiet` flag is supplied. + + + # `wp cli update` lets user know of each step in the update process. + WP_CLI::log( sprintf( 'Downloading from %s...', $download_url ) ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-read-value/index.md b/docs/internal-api/wp-cli-read-value/index.md new file mode 100644 index 00000000..64fbd368 --- /dev/null +++ b/docs/internal-api/wp-cli-read-value/index.md @@ -0,0 +1,57 @@ +--- +layout: default +title: WP_CLI::read_value() +description: "Read a value, from various formats." +--- + +Docs » Internal API » Input + +## WP_CLI::read_value() + +Read a value, from various formats. + +*** + +### Usage + + WP_CLI::read_value( $raw_value, $assoc_args = array() ) + +
    +$value (mixed)
    +$assoc_args (array)
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-run-command/index.md b/docs/internal-api/wp-cli-run-command/index.md new file mode 100644 index 00000000..1f1b75ef --- /dev/null +++ b/docs/internal-api/wp-cli-run-command/index.md @@ -0,0 +1,67 @@ +--- +layout: default +title: WP_CLI::run_command() +description: "Run a given command within the current process using the same global" +--- + +Docs » Internal API » Execution + +## WP_CLI::run_command() + +Run a given command within the current process using the same global + +*** + +### Usage + + WP_CLI::run_command( $args, $assoc_args = array() ) + +
    +$args (array) Positional arguments including command name.
    +$assoc_args (array)
    +
    + + +*** + +### Notes + +parameters. + +Use `WP_CLI::runcommand()` instead, which is easier to use and works better. + +To run a command using a new process with the same global parameters, +use WP_CLI::launch_self(). To run a command using a new process with +different global parameters, use WP_CLI::launch(). + + + ob_start(); + WP_CLI::run_command( array( 'cli', 'cmd-dump' ) ); + $ret = ob_get_clean(); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-runcommand/index.md b/docs/internal-api/wp-cli-runcommand/index.md new file mode 100644 index 00000000..41870fec --- /dev/null +++ b/docs/internal-api/wp-cli-runcommand/index.md @@ -0,0 +1,71 @@ +--- +layout: default +title: WP_CLI::runcommand() +description: "Run a WP-CLI command." +--- + +Docs » Internal API » Execution + +## WP_CLI::runcommand() + +Run a WP-CLI command. + +*** + +### Usage + + WP_CLI::runcommand( $command, $options = array() ) + +
    +$command (string) WP-CLI command to run, including arguments.
    +$options (array) Configuration options for command execution.
    +@return (mixed)
    +
    + + +*** + +### Notes + +Launch a new child process, or run the command in the current process. +Optionally: + +* Prevent halting script execution on error. +* Capture and return STDOUT, or full details about command execution. +* Parse JSON output if the command rendered it. + + + $options = array( + 'return' => true, // Return 'STDOUT'; use 'all' for full object. + 'parse' => 'json', // Parse captured STDOUT to JSON array. + 'launch' => false, // Reuse the current process. + 'exit_error' => true, // Halt script execution on error. + ); + $plugins = WP_CLI::runcommand( 'plugin list --format=json', $options ); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + +
      + + + +
    • WP_CLI::launch() - Launch an arbitrary external process that takes over I/O.
    • + + +
    • WP_CLI::launch_self() - Run a WP-CLI command in a new process reusing the current runtime arguments.
    • + + +
    • WP_CLI::run_command() - Run a given command within the current process using the same global
    • + + + +
    + + diff --git a/docs/internal-api/wp-cli-success/index.md b/docs/internal-api/wp-cli-success/index.md new file mode 100644 index 00000000..f946daec --- /dev/null +++ b/docs/internal-api/wp-cli-success/index.md @@ -0,0 +1,88 @@ +--- +layout: default +title: WP_CLI::success() +description: "Display success message prefixed with "Success: "." +--- + +Docs » Internal API » Output + +## WP_CLI::success() + +Display success message prefixed with "Success: ". + +*** + +### Usage + + WP_CLI::success( $message ) + +
    +$message (string) Message to write to STDOUT.
    +@return (null)
    +
    + + +*** + +### Notes + +Success message is written to STDOUT. + +Typically recommended to inform user of successful script conclusion. + + + # wp rewrite flush expects 'rewrite_rules' option to be set after flush. + flush_rewrite_rules( \WP_CLI\Utils\get_flag_value( $assoc_args, 'hard' ) ); + if ( ! get_option( 'rewrite_rules' ) ) { + WP_CLI::warning( "Rewrite rules are empty." ); + } else { + WP_CLI::success( 'Rewrite rules flushed.' ); + } + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-format-items/index.md b/docs/internal-api/wp-cli-utils-format-items/index.md new file mode 100644 index 00000000..ae055213 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-format-items/index.md @@ -0,0 +1,110 @@ +--- +layout: default +title: WP_CLI\Utils\format_items() +description: "Render a collection of items as an ASCII table, JSON, CSV, YAML, list of ids, or count." +--- + +Docs » Internal API » Output + +## WP_CLI\Utils\format_items() + +Render a collection of items as an ASCII table, JSON, CSV, YAML, list of ids, or count. + +*** + +### Usage + + WP_CLI\Utils\format_items( $format, $items, $fields ) + +
    +$format (string) Format to use: 'table', 'json', 'csv', 'yaml', 'ids', 'count'
    +$items (array) An array of items to output.
    +$fields (array|string) Named fields for each item of data. Can be array or comma-separated list.
    +@return (null)
    +
    + + +*** + +### Notes + +Given a collection of items with a consistent data structure: + + + $items = array( + array( + 'key' => 'foo', + 'value' => 'bar', + ) + ); + + +Render `$items` as an ASCII table: + + + WP_CLI\Utils\format_items( 'table', $items, array( 'key', 'value' ) ); + + # +-----+-------+ + # | key | value | + # +-----+-------+ + # | foo | bar | + # +-----+-------+ + + +Or render `$items` as YAML: + + + WP_CLI\Utils\format_items( 'yaml', $items, array( 'key', 'value' ) ); + + # --- + # - + # key: foo + # value: bar + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-get-flag-value/index.md b/docs/internal-api/wp-cli-utils-get-flag-value/index.md new file mode 100644 index 00000000..7d66787d --- /dev/null +++ b/docs/internal-api/wp-cli-utils-get-flag-value/index.md @@ -0,0 +1,68 @@ +--- +layout: default +title: WP_CLI\Utils\get_flag_value() +description: "Return the flag value or, if it's not set, the $default value." +--- + +Docs » Internal API » Input + +## WP_CLI\Utils\get_flag_value() + +Return the flag value or, if it's not set, the $default value. + +*** + +### Usage + + WP_CLI\Utils\get_flag_value( $assoc_args, $flag, $default = null ) + +
    +$assoc_args (array) Arguments array.
    +$flag (string) Flag to get the value.
    +$default (mixed) Default value for the flag. Default: NULL
    +@return (mixed)
    +
    + + +*** + +### Notes + +Because flags can be negated (e.g. --no-quiet to negate --quiet), this +function provides a safer alternative to using +`isset( $assoc_args['quiet'] )` or similar. + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-get-named-sem-ver/index.md b/docs/internal-api/wp-cli-utils-get-named-sem-ver/index.md new file mode 100644 index 00000000..d9e3c0be --- /dev/null +++ b/docs/internal-api/wp-cli-utils-get-named-sem-ver/index.md @@ -0,0 +1,49 @@ +--- +layout: default +title: WP_CLI\Utils\get_named_sem_ver() +description: "Compare two version strings to get the named semantic version." +--- + +Docs » Internal API » Misc + +## WP_CLI\Utils\get_named_sem_ver() + +Compare two version strings to get the named semantic version. + +*** + +### Usage + + WP_CLI\Utils\get_named_sem_ver( $new_version, $original_version ) + +
    +$new_version (string)
    +$original_version (string)
    +@return (string) 'major', 'minor', 'patch'
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-get-temp-dir/index.md b/docs/internal-api/wp-cli-utils-get-temp-dir/index.md new file mode 100644 index 00000000..89a351ff --- /dev/null +++ b/docs/internal-api/wp-cli-utils-get-temp-dir/index.md @@ -0,0 +1,41 @@ +--- +layout: default +title: WP_CLI\Utils\get_temp_dir() +description: "Get the system's temp directory. Warns user if it isn't writable." +--- + +Docs » Internal API » System + +## WP_CLI\Utils\get_temp_dir() + +Get the system's temp directory. Warns user if it isn't writable. + +*** + +### Usage + + WP_CLI\Utils\get_temp_dir() + +
    +@return (string)
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-http-request/index.md b/docs/internal-api/wp-cli-utils-http-request/index.md new file mode 100644 index 00000000..d867df14 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-http-request/index.md @@ -0,0 +1,67 @@ +--- +layout: default +title: WP_CLI\Utils\http_request() +description: "Make a HTTP request to a remote URL." +--- + +Docs » Internal API » Misc + +## WP_CLI\Utils\http_request() + +Make a HTTP request to a remote URL. + +*** + +### Usage + + WP_CLI\Utils\http_request( $method, $url, $data = null, $headers = array(), $options = array() ) + +
    +$method (string) HTTP method (GET, POST, DELETE, etc.)
    +$url (string) URL to make the HTTP request to.
    +$headers (array) Add specific headers to the request.
    +$options (array)
    +@return (object)
    +
    + + +*** + +### Notes + +Wraps the Requests HTTP library to ensure every request includes a cert. + + + # `wp core download` verifies the hash for a downloaded WordPress archive + + $md5_response = Utils\http_request( 'GET', $download_url . '.md5' ); + if ( 20 != substr( $md5_response->status_code, 0, 2 ) ) { + WP_CLI::error( "Couldn't access md5 hash for release (HTTP code {$response->status_code})" ); + } + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-launch-editor-for-input/index.md b/docs/internal-api/wp-cli-utils-launch-editor-for-input/index.md new file mode 100644 index 00000000..a022bd86 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-launch-editor-for-input/index.md @@ -0,0 +1,57 @@ +--- +layout: default +title: WP_CLI\Utils\launch_editor_for_input() +description: "Launch system's $EDITOR for the user to edit some text." +--- + +Docs » Internal API » Input + +## WP_CLI\Utils\launch_editor_for_input() + +Launch system's $EDITOR for the user to edit some text. + +*** + +### Usage + + WP_CLI\Utils\launch_editor_for_input( $input, $filename = WP-CLI ) + +
    +string () $content Some form of text to edit (e.g. post content)
    +@return (string|bool) text, if file is saved from editor; false, if no change to file.
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-make-progress-bar/index.md b/docs/internal-api/wp-cli-utils-make-progress-bar/index.md new file mode 100644 index 00000000..2db17d22 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-make-progress-bar/index.md @@ -0,0 +1,93 @@ +--- +layout: default +title: WP_CLI\Utils\make_progress_bar() +description: "Create a progress bar to display percent completion of a given operation." +--- + +Docs » Internal API » Output + +## WP_CLI\Utils\make_progress_bar() + +Create a progress bar to display percent completion of a given operation. + +*** + +### Usage + + WP_CLI\Utils\make_progress_bar( $message, $count ) + +
    +$message (string) Text to display before the progress bar.
    +$count (integer) Total number of ticks to be performed.
    +@return (cli\progress\Bar|WP_CLI\NoOp)
    +
    + + +*** + +### Notes + +Progress bar is written to STDOUT, and disabled when command is piped. Progress +advances with `$progress->tick()`, and completes with `$progress->finish()`. +Process bar also indicates elapsed time and expected total time. + + + # `wp user generate` ticks progress bar each time a new user is created. + # + # $ wp user generate --count=500 + # Generating users 22 % [=======> ] 0:05 / 0:23 + + $progress = \WP_CLI\Utils\make_progress_bar( 'Generating users', $count ); + for ( $i = 0; $i < $count; $i++ ) { + // uses wp_insert_user() to insert the user + $progress->tick(); + } + $progress->finish(); + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-parse-ssh-url/index.md b/docs/internal-api/wp-cli-utils-parse-ssh-url/index.md new file mode 100644 index 00000000..6e68a9c0 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-parse-ssh-url/index.md @@ -0,0 +1,58 @@ +--- +layout: default +title: WP_CLI\Utils\parse_ssh_url() +description: "Parse a SSH url for its host, port, and path." +--- + +Docs » Internal API » Misc + +## WP_CLI\Utils\parse_ssh_url() + +Parse a SSH url for its host, port, and path. + +*** + +### Usage + + WP_CLI\Utils\parse_ssh_url( $url, $component = -1 ) + +
    +@return (mixed)
    +
    + + +*** + +### Notes + +Similar to parse_url(), but adds support for defined SSH aliases. + + + host OR host/path/to/wordpress OR host:port/path/to/wordpress + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-parse-str-to-argv/index.md b/docs/internal-api/wp-cli-utils-parse-str-to-argv/index.md new file mode 100644 index 00000000..d2cdf282 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-parse-str-to-argv/index.md @@ -0,0 +1,57 @@ +--- +layout: default +title: WP_CLI\Utils\parse_str_to_argv() +description: "Parse a string of command line arguments into an $argv-esqe variable." +--- + +Docs » Internal API » Input + +## WP_CLI\Utils\parse_str_to_argv() + +Parse a string of command line arguments into an $argv-esqe variable. + +*** + +### Usage + + WP_CLI\Utils\parse_str_to_argv( $arguments ) + +
    +$arguments (string)
    +@return (array)
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-report-batch-operation-results/index.md b/docs/internal-api/wp-cli-utils-report-batch-operation-results/index.md new file mode 100644 index 00000000..2174a069 --- /dev/null +++ b/docs/internal-api/wp-cli-utils-report-batch-operation-results/index.md @@ -0,0 +1,60 @@ +--- +layout: default +title: WP_CLI\Utils\report_batch_operation_results() +description: "Report the results of the same operation against multiple resources." +--- + +Docs » Internal API » Input + +## WP_CLI\Utils\report_batch_operation_results() + +Report the results of the same operation against multiple resources. + +*** + +### Usage + + WP_CLI\Utils\report_batch_operation_results( $noun, $verb, $total, $successes, $failures ) + +
    +$noun (string) Resource being affected (e.g. plugin)
    +$verb (string) Type of action happening to the noun (e.g. activate)
    +$total (integer) Total number of resource being affected.
    +$successes (integer) Number of successful operations.
    +$failures (integer) Number of failures.
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-utils-write-csv/index.md b/docs/internal-api/wp-cli-utils-write-csv/index.md new file mode 100644 index 00000000..d6c7891a --- /dev/null +++ b/docs/internal-api/wp-cli-utils-write-csv/index.md @@ -0,0 +1,49 @@ +--- +layout: default +title: WP_CLI\Utils\write_csv() +description: "Write data as CSV to a given file." +--- + +Docs » Internal API » Misc + +## WP_CLI\Utils\write_csv() + +Write data as CSV to a given file. + +*** + +### Usage + + WP_CLI\Utils\write_csv( $fd, $rows, $headers = array() ) + +
    +$fd (resource) File descriptor
    +$rows (array) Array of rows to output
    +$headers (array) List of CSV columns (optional)
    +
    + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/docs/internal-api/wp-cli-warning/index.md b/docs/internal-api/wp-cli-warning/index.md new file mode 100644 index 00000000..e24f3bf7 --- /dev/null +++ b/docs/internal-api/wp-cli-warning/index.md @@ -0,0 +1,89 @@ +--- +layout: default +title: WP_CLI::warning() +description: "Display warning message prefixed with "Warning: "." +--- + +Docs » Internal API » Output + +## WP_CLI::warning() + +Display warning message prefixed with "Warning: ". + +*** + +### Usage + + WP_CLI::warning( $message ) + +
    +$message (string) Message to write to STDERR.
    +@return (null)
    +
    + + +*** + +### Notes + +Warning message is written to STDERR. + +Use instead of `WP_CLI::debug()` when script execution should be permitted +to continue. + + + # `wp plugin activate` skips activation when plugin is network active. + $status = $this->get_status( $plugin->file ); + // Network-active is the highest level of activation status + if ( 'active-network' === $status ) { + WP_CLI::warning( "Plugin '{$plugin->name}' is already network active." ); + continue; + } + + + +*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.* + + +*** + +### Related + + + + diff --git a/es/index.md b/es/index.md deleted file mode 100644 index 67bcc591..00000000 --- a/es/index.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -layout: default -title: Interfaz de línea de comandos para WordPress -direction: ltr ---- - -[WP-CLI](https://wp-cli.org/) es la interfaz de línea de comandos para [WordPress](https://es.wordpress.org/). Puedes actualizar plugins, configurar instalaciones multisitio y mucho más, sin usar un navegador web. - -El mantenimiento continuo es posible gracias a: - - - - - - - - -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. - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](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 - * - * - * : Key for the option. - * - * ## EXAMPLES - * - * $ wp option delete my_option - * Success: Deleted 'my_option' option. - */ -$delete_option_cmd = function( $args ) { - list( $key ) = $args; - - if ( ! delete_option( $key ) ) { - WP_CLI::error( "Could not delete '$key' option. Does it exist?" ); - } else { - WP_CLI::success( "Deleted '$key' option." ); - } -}; -WP_CLI::add_command( 'option delete', $delete_option_cmd ); -``` - -WP-CLI viene con docenas de comandos. Crear un comando personalizado para WP-CLI es más fácil de lo que parece. Lee el [libro de recetas de comandos](https://make.wordpress.org/cli/handbook/commands-cookbook/) para obtener más información. Explora los [documentos de la API interna](https://make.wordpress.org/cli/handbook/internal-api/) para descubrir una variedad de funciones útiles que puedes usar en su comando WP-CLI personalizado. - -## Contribuir - -Apreciamos que tomes la iniciativa de contribuir a WP-CLI. Es gracias a ti y la comunidad que lo rodea, que WP-CLI es un gran proyecto. - -**Contribuir no se limita únicamente al código.** Te animamos a contribuir de la forma que mejor se adapte a tus habilidades, escribiendo tutoriales, haciendo una demostraciones en tu meetup local, ayudando a los demás con sus preguntas de soporte, o revisando nuestra documentación. - -Lee atentamente nuestras [pautas de colaboración en el manual](https://make.wordpress.org/cli/handbook/contributing/) para una introducción completa sobre cómo puedes involucrarte. Seguir estas pautas ayuda a comunicar que respetas el tiempo de otros colaboradores en el proyecto. A su vez, ellos harán todo lo posible para corresponder a ese respeto cuando trabajen contigo, a través de diferentes zonas horarias alrededor del mundo. - -## Liderazgo - -WP-CLI tiene un encargado del mantenimiento del proyecto: [schlessera](https://github.com/schlessera). - -En ocasiones, [concedemos permisos de escritura a los colaboradores](https://make.wordpress.org/cli/handbook/committers-credo/) que han demostrado, durante un período de tiempo, que son capaces e invirtieron en avanzar el proyecto. - -Lee el [documento de gobernanza en el manual](https://make.wordpress.org/cli/handbook/governance/) para obtener más detalles operativos sobre el proyecto. - -## Créditos - -Además de las bibliotecas definidas en [composer.json](composer.json), hemos utilizado código o ideas de los siguientes proyectos: - -* [Drush](https://github.com/drush-ops/drush) para... un montón de cosas -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) para `wp shell` -* [Regenerate Thumbnails](https://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` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) para `wp scaffold plugin-tests` diff --git a/fa/index.md b/fa/index.md deleted file mode 100644 index 3c551458..00000000 --- a/fa/index.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -layout: default -title: Command line interface for WordPress -direction: rtl ---- - -[WP-CLI](https://wp-cli.org/) رابط خط فرمان برای [وردپرس](https://wordpress.org/) است. به‌روزرسانی افزونه‌ها، پیکربندی نصب چندسایته و چیزهای بیشتر را بدون استفاده از مرورگر وب انجام دهید. - -نگهداری مداوم توسط حامیان امکان پذیر شده است: - - - -نگارش پایدار فعلی [version 2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/)است. برای پیگیری اعلانات، [@wpcli on Twitter](https://twitter.com/wpcli) را دنبال کنید یا [برای دریافت ایمیل ثبت‌نام کنید](https://make.wordpress.org/cli/subscribe/). برای بررسی برنامه‌ریزی‌های آینده انتشار [نقشه راه را برررسی کنید](https://make.wordpress.org/cli/handbook/roadmap/). - -[![وضعیت ساخت](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![زمان متوسط برای رفع مشکل](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "زمان متوسط برای رفع مشکل") [![درصد مشکلات باز](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "درصد مشکلات باز") - -پیوندهای سریع: [استفاده](#using) | [نصب](#installing) | [پشتیبانی](#support) | [گسترش](#extending) | [مشارکت](#contributing) | [همکاران](#credits) - -## استفاده - -WP-CLI یک رابط برپایه خط فرمان برای عملیاتی است که شما در محیط مدیریت وردپرس انجام می‌دهید. برای مثال `wp plugin install --activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) به شما امکان نصب و فعال‌سازی افزونه وردپرس را می‌دهد: - -```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... -Unpacking the package... -Installing the plugin... -Plugin installed successfully. -Activating 'user-switching'... -Plugin 'user-switching' activated. -Success: Installed 1 of 1 plugins. -``` - -WP-CLI همچنین حاوی دستوراتی برای بسیاری چیزهاست که نمی‌توانید در مدیریت وردپرس انجام دهید. برای مثال، `wp transient delete --all` ([doc](https://developer.wordpress.org/cli/commands/transient/delete/)) به شما امکان حذف یکی یا همه transients را می‌دهد: - -```bash -$ wp transient delete --all -Success: 34 transients deleted from the database. -``` - -برای پیش‌درآمد کامل استفاده از WP-CLI، [راهنمای سریع](https://make.wordpress.org/cli/handbook/quick-start/) را مطالعه کنید. یا، برای آموزش دستورات مفید خط فرمان [دوستان شل](https://make.wordpress.org/cli/handbook/shell-friends/) را مطالعه کنید. - -در مورد مدیریت پوسته‌ها و افزونه‌ها، درون‌ریزی و برون‌بری، جستجو و جایگزینی در پایگاه‌داده و چیزهای بیشتر به [لیست کامل دستورات](https://developer.wordpress.org/cli/commands/) مراجعه کنید. - -## نصب - -دریافت پرونده Pahr روش پیشنهادی ما برای نصب به بیشتر کاربران است. در صورت نیاز، مستندات ما را برای [روش‌های جایگزین نصب](https://make.wordpress.org/cli/handbook/installing/) ([کمپوزر](https://make.wordpress.org/cli/handbook/installing/#installing-via-composer), [هوم‌بریو](https://make.wordpress.org/cli/handbook/installing/#installing-via-homebrew), [داکر](https://make.wordpress.org/cli/handbook/installing/#installing-via-docker)). ببینید. - -قبل از نصب WP-CLI، لطفا از دارا بودن حداقل امکانات مورد نیاز مطمئن شوید: - -- سیستم‌های یونیکسی (OS X, Linux, FreeBSD, Cygwin); در ویندوز کمتر پشتیبانی می‌شود -- PHP 5.6 or later -- وردپرس 3.7 به بالا. در نسخه‌های قدیمی‌تر ممکن است با مشکل روبرو شوید - - وقتی از داشتن حداقل امکانات مطمئن شدید، پرونده [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) را بصورت `wget` یا `curl` دریافت کیند: - -```bash -curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -سپس پرونده Phar را از نظر کارکرد معتبرسازی کنید: - -```bash -php wp-cli.phar --info -``` - -جهت استفاده WP-CLI در خط فرمان `wp` را بنویسید، پرونده را قابل اجرا و سپس در PATH خود بگذارید. برای مثال: - -```bash -chmod +x wp-cli.phar -sudo mv wp-cli.phar /usr/local/bin/wp -``` - -اگر WP-CLI به درستی نصب شده باشد، شما در صورت اجرای `wp --info` باید چیزی شبیه به این را ببینید: - -```bash -$ wp --info -OS: Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64 -Shell: /bin/zsh -PHP binary: /usr/local/bin/php -PHP version: 7.0.22 -php.ini used: /etc/local/etc/php/7.0/php.ini -WP-CLI root dir: /home/wp-cli/.wp-cli/vendor/wp-cli/wp-cli -WP-CLI vendor dir: /home/wp-cli/.wp-cli/vendor -WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/ -WP-CLI global config: /home/wp-cli/.wp-cli/config.yml -WP-CLI project config: -WP-CLI version: 2.12.0 -``` - -### به‌روزرسانی - -شما می‌توانید WP-CLI را با `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/))، یا با اجرای دوباره مراحل نصب به‌روزرسانی کنید. - -اگر دسترسی به WP-CLI با روت است یا کاربر سیستمی دیگری است، شما احتیاج به اجرای `sudo wp cli update` دارید. - -به‌روزرسانی زنده می‌خواهید؟ برای استفاده از آخرین نسخه‌های شبانه دستور `wp cli update --nightly` را اجرا کنید. نسخه‌های شبانه به جهت پایداری کمتر برای کار در محیط توسعه مناسب نیستند، اما حاوی آخرین و بهترین امکانات WP-CLI هستند. - -### کامل‌سازی با تب - -WP-CLI دارای قابلیت کامل‌سازی با تب برای بش و ZSH است. کافیست [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) را دریافت و از `~/.bash_profile` سورس کنید: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -فراموش نکنید که بعد از آن `source ~/.bash_profile` را اجرا کنید. - -اگر از zsh برای شل استفاده می‌کنید، شاید به `bashcompinit` برای شروع قبل از سورس کردن نیاز داشته باشید. کد زیر را در `.zshrc` خود قرار دهید: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## پشتیبانی - -توسعه‌دهندگان و مشارکت کنندگان WP-CLI برای پاسخ‌دهی به سوالات زمان محدودی دارند. نسخه فعلی [WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) تنها نسخه قابل پشتیبانی رسمی است. - -قبل از سوال، لطفا در مورد مشکل خود جستجو کنید: - -* [مشکلات عمومی و رفع آنها](https://make.wordpress.org/cli/handbook/common-issues/) -* [کتابچه WP-CLI](https://make.wordpress.org/cli/handbook/) -* [مشکلات باز و بسته WP-CLI در گیتهاب رسمی](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -* [تاپیک‌های مرتبط با 'WP-CLI' در انجمن پشتیبانی وردپرس](https://wordpress.org/support/topic-tag/wp-cli/) -* [سوالات مطرح شده مرتبط با 'WP-CLI' در StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) - -اگر جواب خود را از طریق راه‌های بالا پیدا نکردید، می‌توانید: - -* وارد کانال `#cli` در [اسلک WordPress.org](https://make.wordpress.org/chat/) شوید تا شاید به جواب سوالاتتان برسید. این راه برای سوالات کوتاه مناسب است. -* در انجمن پشتیبانی وردپرس [تاپیک چدید ایجاد کنید](https://wordpress.org/support/forum/wp-advanced/#new-post) و برچسب 'WP-CLI' بزنید. - -مشکلات گیتهاب برای پیگیری بهینه کردن و رفع باگ‌های موجود است، نه برای پشتیبانی عمومی. قبل از ارسال گزارش باگ، لطفا [بخش تمرین را بررسی کنید](https://make.wordpress.org/cli/handbook/bug-reports/)تا گزارش شما به درستی آدرس داده شده باشد و کمک شود که در زمان صرفه جویی شود. - -لطفا در توییتر درخواست پشتیبانی نکنید. توییتر جای مناسبی برای پشتیبانی نیست چون: 1) نگه داشتن صحبت با 200 کاراکتر و کمتر سخت است 2) توییتری جای مناسبی برای سوال شما نیست چون شخصی که سوالی مشابه شما دارد امکان جستجوی آن را ندارد. - -بخاطر داشته باشید، آزادی != رایگان؛ گواهی کدباز به شما دسترسی آزاد به استفاده و ویرایس را می‌دهد، اما نه الزاما با زمان افراد دیگر. لطفا باوقار باشید و انتظارات خود را براین اساس تنظیم کنید. - -## گسترش - -یک **دستور** یک بخش کوچک از عملکرد WP-CLI است. `wp plugin install` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) یک دستور است. `wp plugin activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/activate/)) یک دستور دیگر است. - -WP-CLI قابلیت ثبت هر کلاس، تابع یا بسته قابل فراخوانی را بصورت دستور دارد. جزئیات استفاده را از بخش توضیحات مندرج شده می‌خواند. `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) برای هر دو حالت ثبت دستور داخلی و ثالث استفاده می‌شود. - -```php -/** - * Delete an option from the database. - * - * Returns an error if the option didn't exist. - * - * ## OPTIONS - * - * - * : Key for the option. - * - * ## EXAMPLES - * - * $ wp option delete my_option - * Success: Deleted 'my_option' option. - */ -$delete_option_cmd = function( $args ) { - list( $key ) = $args; - - if ( ! delete_option( $key ) ) { - WP_CLI::error( "Could not delete '$key' option. Does it exist?" ); - } else { - WP_CLI::success( "Deleted '$key' option." ); - } -}; -WP_CLI::add_command( 'option delete', $delete_option_cmd ); -``` - -WP-CLI دارای ده‌ها دستور است. ایجاد یک دستور بسیار ساده‌تر از چیزی است که بنظر می‌رسد. بخش [کتابچه دستورات](https://make.wordpress.org/cli/handbook/commands-cookbook/) را برای آموزش مطالعه کنید. [API داخلی docs](https://make.wordpress.org/cli/handbook/internal-api/) را برای آشنایی با انواع عملکردهای مفید که می‌توانید در دستور دلخواه WP-CLI استفاده کنید را ببینید. - -## مشارکت - -ما از شما برای مشارکت در WP-CLI قدردانی می‌کنیم. به خاطر شما و جامعه اطراف شماست که WP-CLI چنین پروژه‌ای عالی است. - -**مشارکت فقط به یک کد محدود نمی‌شود.** ما شما را تشویق می‌کنیم تا به روشی که متناسب با توانایی‌های شما است مشارکت کنید -با نوشتن آموزش, ارائه یک نسخه‌ی نمایشی در میتاپ شما، کمک به کاربران دیگر با پشتیبانی و پاسخگویی و یا بررسی مستندات ما. - -برای معرفی کامل نحوه مشارکت [راهنمای مشارکت در ددفترچه راهنما](https://make.wordpress.org/cli/handbook/contributing/) را مطالعه کنید. پیروی از این دستورالعمل‌ها به شما برای احترام به زمان دیگر مشارکت کنندگان پروژه کمک می‌کند. به نوبه خود، آنها همه تلاش خود را برای تکرار این احترام هنگام همکاری با شما، در مناطق زمانی مختلف و سراسر جهان انجام می دهند. - -## رهبری - -WP-CLI یک نگهدارنده دارد: [schlessera](https://github.com/schlessera). - -به تناسب، ما [دسترسی برا نوشتن به مشارکت کنندگان می‌دهیم](https://make.wordpress.org/cli/handbook/committers-credo/)،آنهایی که توانایی خود را در طی زمان برای جلو بردن پروژه نشان دمی‌دهند. - -توضیحات [سند مدیریت در کتابچه راهنمای کاربر](https://make.wordpress.org/cli/handbook/governance/) را برای جزئیات عملیاتی در مورد پروژه بخوانید. - -## همکاران - -علاوه بر کتابخانه های تعریف شده در [composer.json](composer.json) ما از پروژه‌ها یا کدهای زیر استفاده کرده‌ایم: - -* [Drush](https://github.com/drush-ops/drush) برای خیلی چیزها -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) برای `wp shell` -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) برای `wp media regenerate` -* [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) برای `wp search-replace` -* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) برای `wp export` -* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) برای `wp import` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) برای `wp scaffold plugin-tests` diff --git a/fr/index.md b/fr/index.md index 20570f84..669fd8ad 100644 --- a/fr/index.md +++ b/fr/index.md @@ -1,53 +1,19 @@ --- layout: default title: Interface en ligne de commande pour WordPress -direction: ltr --- -WP-CLI -====== - -[WP-CLI](https://wp-cli.org/fr) est un ensemble d'outils en ligne de commande pour gérer vos installations [WordPress](https://fr.wordpress.org/). Vous pouvez mettre à jour les extensions, configurer des installations multisite et beaucoup plus sans avoir recours à un navigateur web. - -L'entretien continu de ce projet est possible grâce à : - - - -La dernière version stable est la [version 2.11.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). - -Pour rester à jour, suivez [@wpcli sur Twitter](https://twitter.com/wpcli) ou [inscrivez-vous à notre lettre d'information par email](https://make.wordpress.org/cli/subscribe/). - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [![Temps moyen pour traiter un ticket](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Temps moyen pour traiter un ticket") [![Pourcentage de tickets encore ouverts](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Pourcentage de tickets encore ouverts") - - -Liens rapides: [Utilisation](#utilisation) | [Installation](#installation) | [Soutien](#soutien) | [Étendre](#étendre) | [Contribuer](#contribuer) | [Crédits](#crédits) + +[WP-CLI](https://wp-cli.org/) est un ensemble d'outil en ligne de commande pour gérer vos installations [WordPress](https://wordpress.org/). Vous pouvez mettre à jour les extensions, configurer des installations multi-site et beaucoup plus sans avoir recours à un navigateur web. + +Pour rester à jour, suivez [@wpcli sur Twitter](https://twitter.com/wpcli) ou [inscrivez-vous à notre lettre d'information par email](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). + +[![Statut du build](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Statut des dépendances](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Temps moyen pour traiter un ticket](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Temps moyen pour traiter un ticket") [![Pourcentage de tickets encore ouverts](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Pourcentage de tickets encore ouverts") + +Liens rapides: [Utilisation](#utilisation) | [Installation](#installation) | [Support](#support) | [Étendre](#tendre) | [Contribuer](#contribuer) | [Crédits](#crdits) ## Utilisation -L'objectif de WP-CLI est de fournir une interface en ligne de commande pour toute action qu'il serait utile de faire dans l'administration WordPress. Par exemple, `wp plugin install --activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) vous permet d'installer et d'activer une extension WordPress : +L'objectif de WP-CLI est de fournir une interface en ligne de commande pour toute action qu'il serait utile de faire dans l'administration WordPress. Par exemple, `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) vous permet d'installer et activer une extension WordPress : ```bash $ wp plugin install rest-api --activate @@ -60,72 +26,69 @@ Activating 'rest-api'... Success: Plugin 'rest-api' activated. ``` -WP-CLI inclut aussi des commandes pour d'autres actions que vous ne pouvez pas faire dans l'administration WordPress. Par exemple, `wp transient delete-all` ([doc](https://developer.wordpress.org/cli/commands/transient/delete/)) permet de supprimer un ou tous les transients : +WP-CLI inclut aussi des commandes pour d'autres choses que vous ne pouvez pas faire dans l'administration WordPress. Par exemple, `wp transient delete-all` ([doc](https://wp-cli.org/commands/transient/delete-all/)) permet de supprimer un ou tous les "transients" : ```bash $ wp transient delete-all Success: 34 transients deleted from the database. ``` -Pour une introduction plus complète sur l'utilisation de WP-CLI, lisez le [Guide de démarrage rapide (en)](https://make.wordpress.org/cli/handbook/quick-start/). Vous pouvez également en apprendre davantage sur l'utilisation de la ligne de commande via des [informations sur l'utilisation du Shell (en)](https://make.wordpress.org/cli/handbook/shell-friends/). +Pour une introduction plus complète sur l'utilisation de WP-CLI, lisez le [Guide de démarrage rapide (en)](https://wp-cli.org/docs/quick-start/). -Vous vous sentez déjà à l'aise avec les bases ? Allez voir la [liste complète des commandes (en)](https://developer.wordpress.org/cli/commands/) pour avoir des informations détaillées sur la gestion des thèmes et extensions, l'import/export de données, l'exécution de rechercher/remplacer dans la base de données et bien plus. +Vous vous sentez déjà à l'aise avec les bases ? Allez voir la [liste complète des commandes (en)](https://wp-cli.org/commands/) pour avoir des informations détaillées sur la gestion des thèmes et extensions, l'import/export de données, l'exécution de rechercher/remplacer dans la base de données et bien plus. ## Installation -Télécharger le Phar est la méthode d'installation que nous recommandons. Si vous avez besoin, vous pouvez aussi consulter notre documentation sur [d'autres méthodes d'installation (en)](https://make.wordpress.org/cli/handbook/installing/). +Télécharger le Phar est la méthode d'installation que nous recommandons. Si vous avez besoin, vous pouvez aussi consulter notre documentation sur [autres méthodes d'installation (en)](https://wp-cli.org/docs/installing/). -Avant d'installer WP-CLI, veuillez vous assurer que votre environnement répond aux exigences minimales : +Avant d'installer WP-CLI, veuillez vous assurer que votre environnement réponds aux exigences minimales : -- Environnement de type UNIX (OS X, Linux, FreeBSD, Cygwin); le soutien est limité sur les environnements Windows -- PHP 5.6 ou plus récent +- Environnement de type UNIX (OS X, Linux, FreeBSD, Cygwin); le support est limité sur les environnements Windows +- PHP 5.3.29 ou plus récent - WordPress 3.7 ou plus récent -Une fois que vous avez vérifié ces exigences, téléchargez le fichier [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) en utilisant `wget` ou `curl` : +Une fois que vous avez vérifié ces exigences, téléchargez le fichier [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) en utilisant `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 ``` Ensuite, vérifiez que tout fonctionne : ```bash -php wp-cli.phar --info +$ php wp-cli.phar --info ``` -Pour utiliser WP-CLI à partir de la ligne de commande en tapant `wp`, rendez le fichier exécutable et déplacez-le quelque part dans votre `PATH`. Par exemple : +Pour utiliser WP-CLI à partir de la ligne de commande en tapant `wp`, rendez le fichier exécutable et déplacez le quelque part dans votre `PATH`. Par exemple : ```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 ``` Si WP-CLI a été installé correctement, vous devez obtenir le résultat suivant quand vous exécutez `wp --info`: ```bash $ wp --info -OS: Ubuntu 20.04 -Shell: /bin/zsh -PHP binary: /usr/local/bin/php -PHP version: 8.1.0 -php.ini used: /etc/local/etc/php/php.ini -WP-CLI root dir: /home/wp-cli/.wp-cli/vendor/wp-cli/wp-cli -WP-CLI vendor dir: /home/wp-cli/.wp-cli/vendor +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: /home/wp-cli/.wp-cli/config.yml WP-CLI project config: -WP-CLI version: 2.11.0 +WP-CLI version: 0.25.0 ``` ### Mise à jour -Vous pouvez mettre à jour WP-CLI avec la commande `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/)), ou en répétant les étapes d'installation. +Vous pouvez mettre à jour WP-CLI avec la commande `wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)), ou en répétant les étapes d'installation. Vous voulez vivre dangereusement ? Exécutez `wp cli update --nightly` pour installer les derniers nightly build de WP-CLI. Un nightly build est relativement stable pour être utilisé dans votre environnement de développement et inclut toujours les fonctionnalités de WP-CLI les plus récentes. -### Autocomplétion +### Tab completions -WP-CLI contient des scripts d'autocomplétion pour Bash et ZSH. Il suffit de télécharger [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.11.0/utils/wp-completion.bash) et de l'importer dans votre fichier `~/.bash_profile`: +WP-CLI contient des scripts d'autocomplétion pour Bash et ZSH. Il suffit de télécharger [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash) et de l'importer dans votre fichier `~/.bash_profile`: ```bash source /FULL/PATH/TO/wp-completion.bash @@ -141,32 +104,29 @@ bashcompinit source /FULL/PATH/TO/wp-completion.bash ``` -## Soutien +## Support Les mainteneurs de WP-CLI et les contributeurs du projet font de leur mieux pour répondre à tous les nouveaux tickets en temps opportun. Pour utiliser au mieux leur temps bénévole, merci de vérifier s'il n'existe pas déjà une réponse à votre question dans l'une des ressources suivantes : -- [Problèmes courants et leur correction (en)](https://make.wordpress.org/cli/handbook/common-issues/) -- [Bonnes pratiques pour soumettre un rapport de bug (en)](https://make.wordpress.org/cli/handbook/bug-reports/) -- [Documentation (en)](https://make.wordpress.org/cli/handbook/) +- [Problèmes courants et leur correction (en)](https://wp-cli.org/docs/common-issues/) +- [Bonnes pratiques pour soumettre un rapport de bug (en)](https://wp-cli.org/docs/bug-reports/) +- [Documentation (en)](https://wp-cli.org/docs/) - [Tickets ouvert ou fermés sur Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) -- [Forum StackExchange WordPress](https://wordpress.stackexchange.com/questions/tagged/wp-cli) - -Si vous n'arrivez pas à trouver une réponse en utilisant un de ces liens : +- [Forum StackExchange WordPress](http://wordpress.stackexchange.com/questions/tagged/wp-cli) -- Rejoignez le canal `#cli` sur [l'organisation Slack WordPress.org](https://make.wordpress.org/chat/) pour discuter avec les personnes en ligne à ce moment. Cette option est préférable pour des réponses rapides. -- [Créez un nouveau ticket](https://wordpress.org/support/forum/wp-advanced/#new-post) dans le forum de soutien WordPress.org en attachant l'étiquette 'WP-CLI' pour qu'il soit vu par la communauté. +Si vous n'arrivez pas à trouver une réponse en utilisant un de ces liens, rejoignez le canal `#cli` sur [l'organisation Slack WordPress.org](https://make.wordpress.org/chat/) pour voir si un membre de la communauté peut avoir une réponse pour vous. Les professionnels doivent savoir que [runcommand](https://runcommand.io/) fournit du support premium. -Les tickets Github, permettent de suivre l'évolution des bugs et améliorations sur les commandes existantes. Ils ne sont pas utilisés pour faire du soutien. Avant de soumettre un nouveau rapport de bug, merci de passer en revue [nos bonnes pratiques](https://make.wordpress.org/cli/handbook/bug-reports/) pour vous assurer que votre ticket les respecte. +Les tickets Github, permettent de suivre l'évolution des bugs et améliorations sur les commandes existantes. Ils ne sont pas utilisés pour faire du support. Avant de soumettre un nouveau rapport de bug, merci de passer en revue [nos bonnes pratiques](https://wp-cli.org/docs/bug-reports/) pour vous assurer que votre ticket les respectent. -Merci de ne pas demander du soutien sur Twitter. Twitter n'est pas un endroit convenable pour faire du soutien : 1) c'est compliqué d'avoir une conversation en aussi peu de caractères et 2) Twitter n'est pas un endroit où quelqu'un avec la même question peut chercher et obtenir une réponse avant de la poser à nouveau. +Merci de ne pas demander du support sur Twitter. Twitter n'est pas un endroit convenable pour faire du support : 1) c'est compliqué d'avoir une conversation en moins de 140 caractères et 2) Twitter n'est pas un endroit où quelqu'un avec la même question peut chercher et obtenir une réponse avant de la poser à nouveau. Souvenez-vous, libre != gratuit ; la licence open source vous donne la liberté d'utiliser et modifier, mais pas au dépend du temps d'autres personnes. Merci d'être respectueux et de définir vos attentes en conséquence. ## Étendre -Une **commande** est une unité atomique de fonctionnalité WP-CLI. `wp plugin install` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) est une commande. `wp plugin activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/activate/)) en est une autre. +Une **commande** est une unité atomique de fonctionnalité WP-CLI. `wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) est une commande. `wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) en est une autre. -WP-CLI permet d'enregistrer n'importe quelle classe, fonction ou closure comme une commande. Les informations d'utilisation sont lues à partir du bloc PHPdoc de la fonction de rappel. `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) est utilisé aussi bien pour l'enregistrement des commandes internes ou externes. +WP-CLI permet d'enregister n'importe quelle classe, fonction ou closure comme une commande. Les informations d'utilisation sont lues à partir du bloc PHPdoc de la fonction de rappel. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) est utilisé aussi bien pour l'enregistrement des commandes internes ou externes. ```php /** @@ -196,35 +156,35 @@ $delete_option_cmd = function( $args ) { WP_CLI::add_command( 'option delete', $delete_option_cmd ); ``` -WP-CLI est livré avec des douzaines de commandes. Il est plus facile qu'il n'y parait de créer vos propres commandes WP-CLI. Lisez le [commands cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/) pour en apprendre davantage. Parcourez la [documentation sur l'API interne](https://make.wordpress.org/cli/handbook/internal-api/) pour découvrir une variété de fonctions utiles que vous pouvez utiliser dans votre commande WP-CLI personnalisée. +WP-CLI est livré avec des douzaines de commandes. Il est plus facile qu'il n'y parait de créer vos propres commandes WP-CLI. Lisez le [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) pour en apprendre d'avantage. Parcourez la [documentation sur l'API interne](http://wp-cli.org/docs/internal-api/) pour découvrir une variété de fonctions utiles que vous pouvez utiliser dans votre commande WP-CLI personnalisée. ## Contribuer Bienvenue et merci ! -Nous apprécions que vous preniez l'initiative de contribuer à WP-CLI. C'est grâce à vous et à la communauté autour de vous que WP-CLI est un projet aussi important. +Nous apprécions que vous preniez l'iniative de contribuer à WP-CLI. C'est grâce à vous et à la communauté autour de vous que WP-CLI est un project aussi important. -**Contribuer n'est pas limité uniquement à l'écriture de code.** Nous vous encourageons à contribuer de la façon qui vous correspond le mieux, en écrivant des tutoriels, en faisant des démonstrations dans votre groupe d'utilisateurs local, à aider les autres avec leurs questions de soutien, ou en relisant notre documentation. +**Contribuer n'est pas limité uniquement à l'écriture de code.** Nous vous encourageons à contribuer de la façon qui vous correspond le mieux, en écrivant des didactitiels, en faisant des démonstrations dans votre groupe d'utilisateur local, à aider les autres avec leurs questions de support, ou en relisant notre documentation. -Merci de prendre un moment pour [lire le guide du contributeur en profondeur](https://make.wordpress.org/cli/handbook/contributing/). Suivre ces règles aide à communiquer avec le respect du temps des autres contributeurs du projet. En retour, ils feront de leur mieux pour travailler avec ce même respect, à travers les fuseaux horaires et dans le monde lorsque vous en aurez besoin. +Merci de prendre un moment pour [lire le guide du contributeur en profondeur](https://wp-cli.org/docs/contributing/). Suivre ces règles aide à communiquer avec le respect du temps des autres contributeurs du projet. En retour, ils feront de leur mieux pour travailler avec ce même respect, à travers les fuseaux horaires et dans le monde lorsque vous en aurez besoin. ## Leadership -WP-CLI est dirigé et maintenu par : [schlessera](https://github.com/schlessera). - -La version francophone de ce site est maintenue par : [Maxime Jobin](https://github.com/maximejobin) +WP-CLI est dirigé par ces personnes : -À l'occasion, il arrive que certains [contributeurs reçoivent des accès plus permissifs (en)](https://make.wordpress.org/cli/handbook/committers-credo/) après avoir démontré leurs capacités et leur temps investis dans le projet. +* [Daniel Bachhuber](https://github.com/danielbachhuber/) - mainteneur actuel +* [Cristi Burcă](https://github.com/scribu) - mainteneur précédent +* [Andreas Creten](https://github.com/andreascreten) - créateur -Pour en savoir plus sur la [gouvernance (en)](https://make.wordpress.org/cli/handbook/governance/) du projet et voir la [liste complète des contributeurs](https://github.com/wp-cli/wp-cli/contributors). +Pour en savoir plus sur la [gouvernance (en)](https://wp-cli.org/docs/governance/) du projet et voir la [liste complète des contributeurs](https://github.com/wp-cli/wp-cli/contributors). ## Crédits Derrière les librairies définies dans le fichier [composer.json](composer.json), nous avons utilisé du code et des idées venant des projets suivants : -* [Drush](https://www.drush.org/) pour... pas mal de choses -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) pour `wp shell` -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) pour `wp media regenerate` +* [Drush](http://drush.ws/) pour... pas mal de choses +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) pour `wp shell` +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) pour `wp media regenerate` * [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) pour `wp search-replace` * [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) pour `wp export` * [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) pour `wp import` diff --git a/gr/index.md b/gr/index.md index a3692981..3c74866f 100644 --- a/gr/index.md +++ b/gr/index.md @@ -1,14 +1,13 @@ --- layout: default title: Διεπαφή γραμμής εντολών για το WordPress -direction: ltr --- Το [WP-CLI](https://wp-cli.org/) είναι ένα σύνολο από εργαλεία γραμμής εντολών για τη διαχείριση εγκαταστάσεων [WordPress](https://wordpress.org/). Μπορείτε να ενημερώνετε πρόσθετα, να ρυθμίζετε εγκαταστάσεις πολλαπλών ιστοτόπων και πολλά περισσότερα, χωρίς τη χρήση περιηγητή. -Για να μένετε ενημερωμένοι, ακολουθήστε το [@wpcli στο Twitter](https://twitter.com/wpcli) ή [εγγραφείτε για το ενημερωτικό μας δελτίο](https://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). +Για να μένετε ενημερωμένοι, ακολουθήστε το [@wpcli στο Twitter](https://twitter.com/wpcli) ή [εγγραφείτε για το ενημερωτικό μας δελτίο](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). -[![Testing](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") Γρήγοροι σύνδεσμοι: [Χρήση](#using) | [Εγκατάσταση](#installing) | [Υποστήριξη](#support) | [Επέκταση](#extending) | [Συνεισφορά](#contributing) | [Ευχαριστίες](#credits) @@ -48,7 +47,7 @@ Success: 34 transients deleted from the database. - PHP 5.3.29 ή νεότερη - WordPress 3.7 ή νεότερο -Μόλις επιβεβαιώσετε τις απαιτήσεις, μεταφορτώστε το αρχείο [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) χρησιμοποιώντας την εντολή `wget` ή `curl`: +Μόλις επιβεβαιώσετε τις απαιτήσεις, μεταφορτώστε το αρχείο [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) χρησιμοποιώντας την εντολή `wget` ή `curl`: ```bash $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar @@ -113,7 +112,7 @@ source /FULL/PATH/TO/wp-completion.bash - [Βέλτιστες πρακτικές για υποβολή αναφοράς σφάλματος](https://wp-cli.org/docs/bug-reports/) - [Πύλη τεκμηρίωσης](https://wp-cli.org/docs/) - [Ανοιχτά ή κλειστά θέματα στο Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) -- [WordPress StackExchange forums](https://wordpress.stackexchange.com/questions/tagged/wp-cli) +- [WordPress StackExchange forums](http://wordpress.stackexchange.com/questions/tagged/wp-cli) Αν δε μπορείτε να βρείτε απάντηση σε ένα από τις υπάρχουσες πηγές, [δημιουργήστε ένα θέμα](https://github.com/wp-cli/wp-cli/issues/new) με την ερώτησή σας. @@ -181,9 +180,9 @@ WP_CLI::add_command( 'option delete', $delete_option_cmd ); Εκτός τις βιβλιοθήκες που ορίζονται στο [composer.json](composer.json), έχουμε χρησιμοποιήσει κώδικα ή ιδέες από τα ακόλουθα έργα: -* [Drush](https://www.drush.org/) για... πολλά πράγματα -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) για το `wp shell` -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) για το `wp media regenerate` +* [Drush](http://drush.ws/) για... πολλά πράγματα +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) για το `wp shell` +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) για το `wp media regenerate` * [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) για το `wp search-replace` * [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) για το `wp export` * [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) για το `wp import` diff --git a/index.md b/index.md index fe828d3b..6ce37d58 100644 --- a/index.md +++ b/index.md @@ -1,122 +1,88 @@ -WP-CLI -====== - -[WP-CLI](https://wp-cli.org/) is the command-line interface for [WordPress](https://wordpress.org/). You can update plugins, configure multisite installations and much more, without using a web browser. - -Ongoing maintenance is made possible by: - - - -The current stable release is [version 2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). For announcements, follow [@wpcli on X](https://x.com/wpcli) or [sign up for email updates](https://make.wordpress.org/cli/subscribe/). [Check out the roadmap](https://make.wordpress.org/cli/handbook/roadmap/) for an overview of what's planned for upcoming releases. - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") +--- +layout: default +title: Command line interface for WordPress +--- + +[WP-CLI](https://wp-cli.org/) is a set of command-line tools for managing [WordPress](https://wordpress.org/) installations. You can update plugins, configure multisite installs and much more, without using a web browser. + +For announcements, follow [@wpcli on Twitter](https://twitter.com/wpcli) or [sign up for email updates](https://make.wordpress.org/cli/subscribe/). [Check out the roadmap](https://wp-cli.org/docs/roadmap/) for an overview of what's planned for upcoming releases. + +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.svg?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") Quick links: [Using](#using) | [Installing](#installing) | [Support](#support) | [Extending](#extending) | [Contributing](#contributing) | [Credits](#credits) ## Using -WP-CLI provides a command-line interface for many actions you might perform in the WordPress admin. For instance, `wp plugin install --activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) lets you install and activate a WordPress plugin: +WP-CLI's goal is to provide a command-line interface for any action you might want to perform in the WordPress admin. For instance, `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) lets you install and activate a WordPress plugin: ```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. ``` -WP-CLI also includes commands for many things you can't do in the WordPress admin. For example, `wp transient delete --all` ([doc](https://developer.wordpress.org/cli/commands/transient/delete/)) lets you delete one or all transients: +WP-CLI also includes commands for many things you can't do in the WordPress admin. For example, `wp transient delete --all` ([doc](https://wp-cli.org/commands/transient/delete/)) lets you delete one or all transients: ```bash $ wp transient delete --all Success: 34 transients deleted from the database. ``` -For a more complete introduction to using WP-CLI, read the [Quick Start guide](https://make.wordpress.org/cli/handbook/quick-start/). Or, catch up with [shell friends](https://make.wordpress.org/cli/handbook/shell-friends/) to learn about helpful command line utilities. +For a more complete introduction to using WP-CLI, read the [Quick Start guide](https://wp-cli.org/docs/quick-start/). Or, catch up with [shell friends](https://wp-cli.org/docs/shell-friends/) to learn about helpful command line utilities. -Already feel comfortable with the basics? Jump into the [complete list of commands](https://developer.wordpress.org/cli/commands/) for detailed information on managing themes and plugins, importing and exporting data, performing database search-replace operations and more. +Already feel comfortable with the basics? Jump into the [complete list of commands](https://wp-cli.org/commands/) for detailed information on managing themes and plugins, importing and exporting data, performing database search-replace operations and more. ## Installing -Downloading the Phar file is our recommended installation method for most users. Should you need, see also our documentation on [alternative installation methods](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)). +Downloading the Phar file is our recommended installation method. Should you need, see also our documentation on [alternative installation methods](https://wp-cli.org/docs/installing/). Before installing WP-CLI, please make sure your environment meets the minimum requirements: - UNIX-like environment (OS X, Linux, FreeBSD, Cygwin); limited support in Windows environment -- PHP 5.6 or later -- WordPress 3.7 or later. Versions older than the latest WordPress release may have degraded functionality +- PHP 5.3.29 or later +- WordPress 3.7 or later -Once you've verified requirements, download the [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) file using `wget` or `curl`: +Once you've verified requirements, download the [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) file using `wget` or `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 ``` -Next, check the Phar file to verify that it's working: +Next, check if it is working: ```bash -php wp-cli.phar --info +$ php wp-cli.phar --info ``` To use WP-CLI from the command line by typing `wp`, make the file executable and move it to somewhere in your 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 ``` If WP-CLI was installed successfully, you should see something like this when you run `wp --info`: ```bash $ wp --info -OS: Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 -Shell: /usr/bin/zsh -PHP binary: /usr/bin/php8.1 -PHP version: 8.1.0 -php.ini used: /etc/php/8.1/cli/php.ini -MySQL binary: /usr/bin/mysql -MySQL version: mysql Ver 8.0.27-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: 1.1.0 ``` ### Updating -You can update WP-CLI with `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/)), or by repeating the installation steps. +You can update WP-CLI with `wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)), or by repeating the installation steps. If WP-CLI is owned by root or another system user, you'll need to run `sudo wp cli update`. @@ -124,7 +90,7 @@ Want to live life on the edge? Run `wp cli update --nightly` to use the latest n ### Tab completions -WP-CLI also comes with a tab completion script for Bash and ZSH. Just download [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) and source it from `~/.bash_profile`: +WP-CLI also comes with a tab completion script for Bash and ZSH. Just download [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash) and source it from `~/.bash_profile`: ```bash source /FULL/PATH/TO/wp-completion.bash @@ -142,32 +108,29 @@ source /FULL/PATH/TO/wp-completion.bash ## Support -WP-CLI's maintainers and contributors have limited availability to address general support questions. The [current version of WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) is the only officially supported version. +WP-CLI's maintainers and project contributors have limited availability to address general support questions. The [current version of WP-CLI](https://wp-cli.org/docs/roadmap/) is the only officially supported version. -When looking for support, please first search for your question in these venues: +When looking for support, please first look for an answer in one of the following resources: -* [Common issues and their fixes](https://make.wordpress.org/cli/handbook/common-issues/) -* [WP-CLI handbook](https://make.wordpress.org/cli/handbook/) -* [Open or closed issues in the WP-CLI GitHub organization](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -* [Threads tagged 'WP-CLI' in the WordPress.org support forum](https://wordpress.org/support/topic-tag/wp-cli/) -* [Questions tagged 'WP-CLI' in the WordPress StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) +- [Common issues and their fixes](https://wp-cli.org/docs/common-issues/) +- [Documentation portal](https://wp-cli.org/docs/) +- [Open or closed issues on Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [runcommand tips](https://runcommand.io/tips/) +- [WordPress StackExchange forums](https://wordpress.stackexchange.com/questions/tagged/wp-cli) -If you didn't find an answer in one of the venues above, you can: +You can also join the `#cli` channel on the [WordPress.org Slack organization](https://make.wordpress.org/chat/) to see if a community member might have an answer for you. -* Join the `#cli` channel in the [WordPress.org Slack](https://make.wordpress.org/chat/) to chat with whomever might be available at the time. This option is best for quick questions. -* [Post a new thread](https://wordpress.org/support/forum/wp-advanced/#new-post) in the WordPress.org support forum and tag it 'WP-CLI' so it's seen by the community. +Github issues are meant for tracking enhancements and bugs of existing commands, not general support. Before submitting a bug report, please [review our best practices](https://wp-cli.org/docs/bug-reports/) to help ensure your issue is addressed in a timely manner. -GitHub issues are meant for tracking enhancements to and bugs of existing commands, not general support. Before submitting a bug report, please [review our best practices](https://make.wordpress.org/cli/handbook/bug-reports/) to help ensure your issue is addressed in a timely manner. - -Please do not ask support questions on X. X isn't an acceptable venue for support because: 1) it's hard to hold conversations in under 280 characters, and 2) X isn't a place where someone with your same question can search for an answer in a prior conversation. +Please do not ask support questions on Twitter. Twitter isn't an acceptable venue for support because: 1) it's hard to hold conversations in under 140 characters, and 2) Twitter isn't a place where someone with your same question can search for an answer in a prior conversation. Remember, libre != gratis; the open source license grants you the freedom to use and modify, but not commitments of other people's time. Please be respectful, and set your expectations accordingly. ## Extending -A **command** is the atomic unit of WP-CLI functionality. `wp plugin install` ([doc](https://developer.wordpress.org/cli/commands/plugin/install/)) is one command. `wp plugin activate` ([doc](https://developer.wordpress.org/cli/commands/plugin/activate/)) is another. +A **command** is an atomic unit of WP-CLI functionality. `wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) is one command. `wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) is another. -WP-CLI supports registering any callable class, function, or closure as a command. It reads usage details from the callback's PHPdoc. `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) is used for both internal and third-party command registration. +WP-CLI supports registering any callable class, function, or closure as a command. It reads usage details from the callback's PHPdoc. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) is used for both internal and third-party command registration. ```php /** @@ -197,23 +160,27 @@ $delete_option_cmd = function( $args ) { WP_CLI::add_command( 'option delete', $delete_option_cmd ); ``` -WP-CLI comes with dozens of commands. It's easier than it looks to create a custom WP-CLI command. Read the [commands cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/) to learn more. Browse the [internal API docs](https://make.wordpress.org/cli/handbook/internal-api/) to discover a variety of helpful functions you can use in your custom WP-CLI command. +WP-CLI comes with dozens of commands. It's easier than it looks to create a custom WP-CLI command. Read the [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) to learn more. Browse the [internal API docs](https://wp-cli.org/docs/internal-api/) to discover a variety of helpful functions you can use in your custom WP-CLI command. ## Contributing +Welcome and thanks! + We appreciate you taking the initiative to contribute to WP-CLI. It’s because of you, and the community around you, that WP-CLI is such a great project. **Contributing isn’t limited to just code.** We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation. -Read through our [contributing guidelines in the handbook](https://make.wordpress.org/cli/handbook/contributing/) for a thorough introduction to how you can get involved. Following these guidelines helps to communicate that you respect the time of other contributors on the project. In turn, they’ll do their best to reciprocate that respect when working with you, across timezones and around the world. +Please take a moment to [read these guidelines at depth](https://wp-cli.org/docs/contributing/). Following them helps to communicate that you respect the time of the other contributors to the project. In turn, they’ll do their best to reciprocate that respect when working with you, across timezones and around the world. ## Leadership -WP-CLI has two project maintainers: [schlessera](https://github.com/schlessera) and [swissspidy](https://github.com/swissspidy). +WP-CLI is led by these individuals: -On occasion, we [grant write access to contributors](https://make.wordpress.org/cli/handbook/committers-credo/) who have demonstrated, over a period of time, that they are capable and invested in moving the project forward. +* [Daniel Bachhuber](https://github.com/danielbachhuber/) - current maintainer +* [Cristi Burcă](https://github.com/scribu) - previous maintainer +* [Andreas Creten](https://github.com/andreascreten) - founder -Read the [governance document in the handbook](https://make.wordpress.org/cli/handbook/governance/) for more operational details about the project. +Read more about the project's [governance](https://wp-cli.org/docs/governance/) and view a [complete list of contributors](https://github.com/wp-cli/wp-cli/contributors). ## Credits diff --git a/it/index.md b/it/index.md index 7f845b20..15cc55f9 100644 --- a/it/index.md +++ b/it/index.md @@ -1,20 +1,19 @@ --- layout: default title: Interfaccia da linea di comando per WordPress -direction: ltr --- [WP-CLI](https://wp-cli.org/) è un insieme di strumenti da linea di comando per la gestione delle installazioni [WordPress](https://wordpress.org/). Potete aggiornare plugin, configurare installazioni multisito e molto altro, senza utilizzare un browser web. -Per rimanere aggiornati, seguite [@wpcli su Twitter](https://twitter.com/wpcli) oppure [iscrivetevi alla nostra newsletter](https://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). +Per rimanere aggiornati, seguite [@wpcli su Twitter](https://twitter.com/wpcli) oppure [iscrivetevi alla nostra newsletter](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). -[![Testing](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") Collegamenti rapidi: [Utilizzo](#utilizzo) | [Installazione](#installazione) | [Supporto](#supporto) | [Estendere](#estendere) | [Contribuire](#contribuire) | [Crediti](#crediti) ## Utilizzo -L'obiettivo di WP-CLI è quello di fornire un'interfaccia da linea di comando per le azioni che normalmente si possono effettuare attraverso l'area amministrativa. Per esempio, `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) vi permette di installare ed attivare un plugin di WordPress: +L'obiettivo di WP-CLI è quello di fornire un interfaccia da linea di comando per le azioni che normalmente si possono effettuare attraverso l'area amministrativa. Per esempio, `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) vi permette di installare ed attivare un plugin di WordPress: ```bash $ wp plugin install rest-api --activate @@ -48,7 +47,7 @@ Prima di procedere con l'installazione di WP-CLI, vi preghiamo di assicurarvi ch - PHP 5.3.29 o successivo - WordPress 3.7 o successivo -Una volta che avrete verificato i requisiti, scaricate il file [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) mediante `wget` o `curl`: +Una volta che avrete verificato i requisiti, scaricate il file [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) mediante `wget` o `curl`: ```bash $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar @@ -113,7 +112,7 @@ I manutentori e i contributori di WP-CLI sono volontari, hanno limitate disponib - [Portale della documentazione](https://wp-cli.org/docs/) - [Problemi segnalati o estinti su Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) - [Estratti di runcommand](https://runcommand.io/excerpts/) -- [Forum di WordPress su StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) +- [Forum di WordPress su StackExchange](http://wordpress.stackexchange.com/questions/tagged/wp-cli) Se non trovare delle risposte in questi posti, entrate al canale `#cli` su [WordPress.org Slack organization](https://make.wordpress.org/chat/) per vedere se qualche membro della comunità può offrirvele. @@ -185,9 +184,9 @@ Leggi di più riguardo la [politica del progetto](https://wp-cli.org/docs/govern Oltre alle librerie definite in [composer.json](composer.json), abbiamo adottato codice o spunti dai seguenti progetti: -* [Drush](https://www.drush.org/) per... un mucchio di cose -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) per `wp shell` -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) per `wp media regenerate` +* [Drush](http://drush.ws/) per... un mucchio di cose +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) per `wp shell` +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) per `wp media regenerate` * [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) per `wp search-replace` * [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) per `wp export` * [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) per `wp import` diff --git a/ja/index.md b/ja/index.md index 98736e71..29054aef 100644 --- a/ja/index.md +++ b/ja/index.md @@ -1,178 +1,131 @@ --- layout: default title: Command line interface for WordPress -direction: ltr --- -[WP-CLI](https://wp-cli.org/) は [WordPress](https://wordpress.org/) を管理するためのコマンドラインインターフェースです。 -プラグインのアップデートやマルチサイトのセットアップなど、多くのことをブラウザなしで実行できます。 - -下記のサポーターの協力で継続的なメンテナンスが行われています。 - - - -現在の安定バージョンは [2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/) です。 最新情報を得たい人は、[@wpcli on Twitter](https://twitter.com/wpcli) をフォローするか、[メーリングリストにサインアップ](https://make.wordpress.org/cli/subscribe/)してください。[ロードマップ](https://make.wordpress.org/cli/handbook/roadmap/)で今後のリリース予定を知ることができます。 - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") - -Quick links: [使い方](#使い方) | [インストール方法](#インストール方法) | [サポート](#サポート) | [拡張](#拡張) | [貢献](#貢献) | [クレジット](#クレジット) +[WP-CLI](https://wp-cli.org/) は [WordPress](https://wordpress.org/) を管理するためのコマンドラインツールです。 +プラグインのアップデートやマルチサイトのセットアップなどの多くのことをブラウザ無しで行うことができます。 + +最新情報を得たい人は、[@wpcli on Twitter](https://twitter.com/wpcli) をフォローするか、[メーリングリストにサインアップ](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e)してください。[ロードマップ](https://wp-cli.org/docs/roadmap/)で、今後のリリースの予定をしることができます。 + +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.svg?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") + +Quick links: [使い方](#section) | [インストール方法](#section-1) | [サポート](#section-4) | [拡張](#section-5) | [貢献](#section-6) | [クレジット](#section-8) ## 使い方 -WP-CLI は、みなさんが WordPress の管理画面でやりたいと思っていることに対するコマンドラインインターフェースを提供します。 -たとえば、`wp plugin install --activate` ([ドキュメント](https://developer.wordpress.org/cli/commands/plugin/install/)) というコマンドを実行すると、プラグインをインストールした上で有効化できます。 +WP-CLI のゴールは、みなさんが WordPress の管理画面でやりたいと思うことをコマンドラインで提供することです。 +たとえば、`wp plugin install --activate` ([ドキュメント](https://wp-cli.org/commands/plugin/install/)) は、プラグインをインストールし有効化します。 ```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... +$ 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. ``` -さらに WP-CLI では、WordPress の管理画面ではできない多くのことを行えます。たとえば、`wp transient delete --all` ([ドキュメント](https://developer.wordpress.org/cli/commands/transient/delete/)) というコマンドを実行すると、一時的に保存されているすべてのデータが削除されます。 +さらに WP-CLI は、WordPress の管理画面ではできない多くのことが可能です。たとえば、`wp transient delete --all` ([doc](https://wp-cli.org/commands/transient/delete-all/)) は、Transient に保存されているすべてのデータを削除することを可能にしています。 ```bash $ wp transient delete --all Success: 34 transients deleted from the database. ``` -WP-CLI の使い方について詳しく知りたいときは、[クイックスタートガイド](https://make.wordpress.org/cli/handbook/quick-start/)を読んでください。[Shell friends](https://make.wordpress.org/cli/handbook/shell-friends/) では便利なコマンドラインユーティリティについても学べます。 +WP-CLI の使い方に関するさらに詳しい情報は、[クイックスタートガイド](https://wp-cli.org/docs/quick-start/)を読んでください。または、[shell friends](https://wp-cli.org/docs/shell-friends/) で便利なコマンドラインユーティリティについて学ぶことができます。 -基本的なことをすでに理解しているなら、[コマンドリスト](https://developer.wordpress.org/cli/commands/)にジャンプして、テーマやプラグインの管理、データのインポートやエクスポート、データベースの検索・置換操作などの詳細を見てください。 +もし、すでに基本的なことを理解しているなら、[コマンドリスト](https://wp-cli.org/ja/commands/)にジャンプして、テーマやプラグインの管理、データのインポートやエクスポート、データベースの操作などについての詳細をみてください。 ## インストール方法 -Phar ファイルのダウンロードによるインストールを推奨します。必要に応じて[上級者向けインストール方法](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)) も参照してください。 +Phar ファイルをダウンロードする方法が、私たちが推奨するインストール方法です。必要なら[上級者向けインストール方法](https://wp-cli.org/docs/installing/)(英語)を見てください。 -WP-CLI をインストールする前に、動作環境を確認します。 +WP-CLI をインストールする前に、動作環境を確認してください。 -- UNIX 系の環境 (OS X, Linux, FreeBSD, Cygwin) ; Windows では一部の機能に制限があります。 -- PHP 5.6 またはそれ以降のバージョン。 -- WordPress 3.7 またはそれ以降のバージョン。WordPress 最新版ではない古いバージョンでは、機能が低下する可能性があります。 +- UNIX 系の環境 (OS X, Linux, FreeBSD, Cygwin); Windows では一部の機能に制限があります。 +- PHP 5.3.29 またはそれ以降のバージョン +- WordPress 3.7 またはそれ以降のバージョン -動作条件を再度確認し、`wget` または `curl` で [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) をダウンロードします。 +動作条件を再度確認してから、`wget`または`curl`を使用して [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) をダウンロードしてください。 ```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 ``` -次に、Phar ファイルが動作していることを確認します。 +次に、それが動作しているかを確認してください。 ```bash -php wp-cli.phar --info +$ php wp-cli.phar --info ``` -WP-CLI を `wp` コマンドで実行するには、wp-cli.phar が実行可能で、かつ、環境変数 `PATH` に登録された場所に置かれていることが必要です。例を示します。 +WP-CLI コマンドを`wp`で実行するには、それに実行権限があることと環境変数`PATH`に登録されていることが必要です。 ```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 ``` -WP-CLI のインストールが成功していれば、`wp --info` コマンドで以下のように出力されるはずです。 +もし、WP-CLI のインストールが成功していれば、`wp --info`を実行したら以下のように出力されるはずです。 ```bash $ wp --info -OS: Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 -Shell: /usr/bin/zsh -PHP binary: /usr/bin/php8.1 -PHP version: 8.1.0 -php.ini used: /etc/php/8.1/cli/php.ini -MySQL binary: /usr/bin/mysql -MySQL version: mysql Ver 8.0.27-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: 1.1.0 ``` ## アップデート -WP-CLI は、`wp cli update` ([ドキュメント](https://developer.wordpress.org/cli/commands/cli/update/)) コマンド、または上述のインストール方法を再度行うことでアップデートできます。 +WP-CLI をアップデートするには、`wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)) を実行するか、上述のインストール方法を再度行う必要があります。 -ただし、WP-CLI のオーナーが root または他のシステム管理者の場合は、`sudo wp cli update` と実行する必要があります。 +WP-CLI のオーナーが root もしくは他のシステム管理者になっている場合は、`sudo wp cli update` と実行する必要があります。 -チャレンジ精神旺盛な人は `wp cli update --nightly` を実行してみましょう。最新の開発者向けバージョンの WP-CLI を使うことができます。開発者向けバージョンは、あなたの開発環境で使用する上で十分な信頼性があり、常に最新の機能を含んでいます。 +もっととんがった生き方をしたい? `wp cli update --nightly` を実行すれば、最新の開発者向けバージョンの WP-CLI を使用することができます。開発者向けバージョンは、あなたの開発環境で使用するのに十分な信頼性があり、つねに最新の機能を使用することができます。 ## タブ補完 -WP-CLI には、Bash および zsh 向けのタブ補完スクリプトがあります。スクリプトを使うときは [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) をダウンロードして、`~/.bash_profile` で読み込みます。 +WP-CL には、Bash 及び ZSH 用のタブ補完用のスクリプトがあります。 [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash) をダウンロードして、`~/.bash_profile` から読み込んでください。 -```bash -source /FULL/PATH/TO/wp-completion.bash ``` - -`source ~/.bash_profile` を実行するのをお忘れなく。 - -zsh の場合は、`bashcompinit` をロードした後に `wp-completion.bash` を読み込ませる必要があるかもしれません。`.zshrc` に次のコードを追加してください。 - -```bash -autoload bashcompinit -bashcompinit source /FULL/PATH/TO/wp-completion.bash ``` -## サポート +`source ~/.bash_profile` を実行するのを忘れないでください。 -WP-CLI のメンテナーとその貢献者が一般的な質問に答えられる時間は限られています。[最新版](https://make.wordpress.org/cli/handbook/roadmap/)のみが公式にサポートされるバージョンです。 +## サポート -サポートを受けたいときは、まず、以下のリソースの中から答えを探してみましょう。 +WP-CLI のメンテナーとその貢献者たちはボランティアで、一般的な質問に答えられる時間は限られています。[最新版](http://wp-cli.org/docs/roadmap/) のみが公式にサポートされるバージョンです。 -- [Common issues and their fixes](https://make.wordpress.org/cli/handbook/common-issues/) -- [WP-CLI handbook](https://make.wordpress.org/cli/handbook/) -- [Open or closed issues in the WP-CLI GitHub organization](https://github.com/issues?q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -- [Threads tagged 'WP-CLI' in the WordPress.org support forum](https://wordpress.org/support/topic-tag/wp-cli/) -- [Questions tagged 'WP-CLI' in the WordPress StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) +もしサポートを探しているなら、まず初めに以下のリソースの中から答えを探してください。 -上記いずれかの方法で回答を見つけられなかった場合は: +- [Common issues and their fixes](https://wp-cli.org/docs/common-issues/) +- [Best practices for submitting a bug report](https://wp-cli.org/docs/bug-reports/) +- [Documentation portal](https://wp-cli.org/docs/) +- [Open or closed issues on Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [runcommand tips](https://runcommand.io/tips/) +- [WordPress StackExchange forums](http://wordpress.stackexchange.com/questions/tagged/wp-cli) -- [WordPress.org Slack](https://make.wordpress.org/chat/) の `#cli` チャンネルに参加して、そこにいる人に尋ねてみてください。これが最も手っ取り早い方法です。 -- WordPress サポートフォーラムに[新しいスレッドを投稿](https://wordpress.org/support/forum/wp-advanced/#new-post)し、'WP-CLI' というタグを付けてコミュニティ内で見つけやすくします。 +さらに、[WordPress.org Slack organization](https://make.wordpress.org/chat/) の`#cli`チャンネルに参加するとコミュニティメンバーが答えを知っているかもしれません。 -GitHub Issues は、既存のコマンドの改良やバグを追跡するために使われており、一般的なサポートのためには使われていません。バグレポートを投稿する際には、[ベストプラクティス](https://make.wordpress.org/cli/handbook/bug-reports/)を確認して、あなたの抱える問題が適時確実に伝わるように心がけてください。 +GitHub Issues は、既存のコマンドの改良やバグを追跡するために使用されており、一般的なサポートのためには使用されていません。バグレポートを投稿する際には、[ベストプラクティス](https://wp-cli.org/docs/bug-reports/)を確認して、あなたが抱える問題が適時確実に伝わるように心がけてください。 -Twitter でサポート用の質問を尋ねるのはご遠慮ください。Twitter は、1) 文字数が 280 文字以下に制限され会話を行うのが難しい、2) 過去の会話から他の人の同じ質問を検索することが難しい、などの理由によりサポートを行う場としてふさわしくないからです。 +Twitterでサポート用の質問をたずねるのはおやめください。Twitterは、文字数が140文字以下であり会話を行うのが難しい、過去の会話から他の人の同じ質問を検索することが難しい、等の理由によりサポートを行う場としてふさわしくありません。 -自由は無料とは違います。オープンソースライセンスはあなたが自由に使ったり編集したりする権利を保証しますが、他の誰かの時間を浪費することを保証しているわけではありません。サポートを受けるに当たっては、敬意を持ち、過度な期待をしないように心がけてください。 +自由は無料とは違います。オープンソースはあなたに自由に使ったり編集したりする権利を保証しますが、他の誰かの時間を浪費することを保証しているわけではありません。敬意をもって、過度な期待をしないように心がけてください。 ## 拡張 -それぞれの **コマンド** は、WP-CLI の関数の一つとして定義されています。`wp plugin install` ([ドキュメント](https://developer.wordpress.org/cli/commands/plugin/install/)) はその一つで、`wp plugin activate` ([ドキュメント](https://developer.wordpress.org/cli/commands/plugin/activate/)) もまた、その一つです。 +それぞれの **コマンド** は、WP-CLI の関数の一つとして定義されています。`wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) はそのうちのひとつであり、`wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) は別のもうひとつです。 -WP-CLI では、さまざまな実行可能なクラス、関数、クロージャをコマンドとして実行できます。コマンドの実行に必要な情報は PHPDoc で記述します。 `WP_CLI::add_command()` ([ドキュメント](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) は、内部コマンドおよびサードパーティコマンドの登録に使われています。 +WP-CLI では、様々な実行可能なクラス、関数、クロージャをコマンドとして実行することが可能です。コマンドとして実行されるために必要な情報は、PHPdoc によって記述します。 `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) は、内部コマンド及びサードパーティコマンドの登録に使用されています。 ```php /** @@ -202,34 +155,36 @@ $delete_option_cmd = function( $args ) { WP_CLI::add_command( 'option delete', $delete_option_cmd ); ``` -WP-CLI は多くのコマンドで構成され、意外と簡単にカスタムコマンドを作ることができます。詳しくは [commands cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/) を参照してください。[内部 API のドキュメント](https://make.wordpress.org/cli/handbook/references/internal-api/)には、カスタムコマンドで使用できるさまざまな便利機能が載っています。 +WP-CLI は、多くのコマンドにより構成されており、カスタムコマンドを作ることは意外と簡単です。[commands cookbook](https://wp-cli.org/docs/commands-cookbook/)を読んでください。 ## 貢献 -ようこそ ! ありがとう ! +ようこそ、そしてありがとう! -私たちは、みなさんが率先して貢献してくださることに感謝します。あなたやあなたのまわりのコミュニティによって、WP-CLI はすばらしいプロジェクトになります。 +私たちは、みなさんが率先して貢献してくれることに感謝しています。あなたやあなたのまわりのコミュニティによって、WP-CLIはすばらしいプロジェクトになります。 -**貢献はコードを書くことだけに留まりません。** 私たちは、チュートリアルを書いたり、地元のミートアップでデモを行ったり、ユーザーの質問に回答したり、ドキュメントを改訂したりと、あなたの能力に合った方法で貢献していただきたいと思っています。 +**貢献は単にコードだけではありません。** 私たちは、チュートリアルを書く、地元のミートアップでデモを行う、ユーザーの質問への回答、ドキュメントの改訂など、あなたの日々の活動に応じた貢献をお願いしています。 -ハンドブックに掲載されている[貢献者向けガイドライン](https://make.wordpress.org/cli/handbook/contributions/contributing/)を読めば、どのように貢献できるかを詳しく知ることができます。ガイドラインに従うことで、本プロジェクトの他の貢献者たちとのコミュニケーションが円滑になります。彼らは、世界をまたがってあなたと一緒に働くことに、最大限の敬意を払う努力をします。 +すこしだけ時間を使って[ガイドラインをよく読んでください](https://wp-cli.org/docs/contributing/)。ここに書かれていることに従うことで、本プロジェクトの他の貢献者たちとのコミュニケーションを円滑にすることができます。彼らは、世界をまたがってあなたと一緒に働くことに、最大限の敬意を払う努力をします。 ### プロジェクトリーダー -WP-CLI にはプロジェクトメンテナーがいます: [schlessera](https://github.com/schlessera) です。 +WP-CLIは以下の個人によってリードされています。 -能力があり、プロジェクト発展のため時間をかけていることを示してくれた貢献者には[コミット権限を与えることがあります](https://make.wordpress.org/cli/handbook/committers-credo/)。 +* [Daniel Bachhuber](https://github.com/danielbachhuber/) - 現在のメンテナー +* [Cristi Burcă](https://github.com/scribu) - 前メンテナー +* [Andreas Creten](https://github.com/andreascreten) - 創始者 -プロジェクト運営についての詳細を知りたいときは、[ハンドブック内のガバナンス](https://make.wordpress.org/cli/handbook/governance/)を読んでください。 +プロジェクトの[ガバナンス](https://wp-cli.org/docs/governance/)と[完全な貢献者リスト](https://github.com/wp-cli/wp-cli/contributors)も読んでください。 ## クレジット -[composer.json](https://github.com/wp-cli/wp-cli/blob/master/composer.json) に記載されているライブラリに依存しており、以下のプロジェクトからコードやアイディアを得ています。 +[composer.json](composer.json) に記載されているライブラリに依存しており、以下のプロジェクトからコードやアイディアを得ています。 -- [Drush](https://github.com/drush-ops/drush) for... a lot of things -- [wpshell](https://code.trac.wordpress.org/browser/wpshell) for `wp shell` -- [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) for `wp media regenerate` -- [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) for `wp search-replace` -- [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) for `wp export` -- [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) for `wp import` -- [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) for `wp scaffold plugin-tests` +* [Drush](https://drush.ws/) for... a lot of things +* [wpshell](https://code.trac.wordpress.org/browser/wpshell) for `wp shell` +* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) for `wp media regenerate` +* [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) for `wp search-replace` +* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) for `wp export` +* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) for `wp import` +* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) for `wp scaffold plugin-tests` diff --git a/ne/index.md b/ne/index.md index 9be0390e..e2d4d040 100644 --- a/ne/index.md +++ b/ne/index.md @@ -1,14 +1,13 @@ --- layout: default title: वर्डप्रेसको लागि कमाण्ड लाइन इन्टरफेस -direction: ltr --- [WP-CLI](https://wp-cli.org/) कमाण्ड लाइन औजारहरुको संग्रह हो जुन [वर्डप्रेस](https://wordpress.org/) व्यवस्थापन गर्न प्रयोग गरिन्छ । ब्राउजर बिना नै प्लगिन अद्यावधिक गर्न, बहुसाइट कन्फिगर गर्न तथा अन्य धेरै कामको लागि यो प्रयोग गर्न सकिन्छ । -अद्यावधिक हुन, [टुइटरमा @wpcli](https://twitter.com/wpcli) फलो गर्नुहोस् वा [इमेल न्यूजलेटरको लागि साइन अप गर्नुहोस्](https://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e) । +अद्यावधिक हुन, [टुइटरमा @wpcli](https://twitter.com/wpcli) फलो गर्नुहोस् वा [इमेल न्यूजलेटरको लागि साइन अप गर्नुहोस्](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e) । -[![Testing](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "समस्या समाधान गर्न लाग्ने औसत समय") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "खुला मुद्दाहरू प्रतिशतमा") +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "समस्या समाधान गर्न लाग्ने औसत समय") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "खुला मुद्दाहरू प्रतिशतमा") द्रुत लिंकहरु: [प्रयोग](#section) | [स्थापना](#section-1) | [सहायता](#section-4) | [विस्तार](#section-5) | [योगदान](#section-6) | [श्रेय](#section-8) @@ -44,11 +43,11 @@ Phar फाइल डाउनलोड गरेर स्थापना ग स्थापना गर्नु अघि कृपया न्यूनतम आवश्यकताहरू पूरा भएको निश्चित गर्नुहोस्: -- UNIX जस्तै वातावरण (OS X, Linux, FreeBSD, Cygwin); Windows वातावरणमा सीमित समर्थन +- UNIX जस्तै वातावरण (OS X, Linux, FreeBSD, Cygwin); Windows वातावरणमा सीमित समर्थन - PHP 5.3.29 वा पछि - वर्डप्रेस 3.7 वा पछि -आवश्यकताहरु प्रमाणित गरिसकेपछि `wget` वा `curl` प्रयोग गरि [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) फाइल डाउनलोड गर्नुहोस्: +आवश्यकताहरु प्रमाणित गरिसकेपछि `wget` वा `curl` प्रयोग गरि [wp-cli.phar](https://raw.github.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 @@ -113,7 +112,7 @@ source /FULL/PATH/TO/wp-completion.bash - [बग प्रतिवेदनको लागि उत्तम अभ्यासहरू](https://wp-cli.org/docs/bug-reports/) - [दस्तावेज पोर्टल](https://wp-cli.org/docs/) - [Github मा खुल्ला तथा बन्द समस्याहरु](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) -- [वर्डप्रेस StackExchange फोरम](https://wordpress.stackexchange.com/questions/tagged/wp-cli) +- [वर्डप्रेस StackExchange फोरम](http://wordpress.stackexchange.com/questions/tagged/wp-cli) यदि तपाईंले ती स्रोतहरूमा आफ्नो जवाफ पाउन सक्नुभएन भने [WordPress.org Slack organization](https://make.wordpress.org/chat/) मा `#cli` च्यानलमा सामेल भई प्रश्न सोध्न सक्नुहुन्छ। व्यावसायिक प्रयोगकर्ताहरुले प्रिमियम सहायताको लागि [runcommand](https://runcommand.io/) मा पनि सम्पर्क गर्न सक्नुहुन्छ । @@ -179,9 +178,9 @@ WP-CLI मा यी व्यक्तिहरूको नेतृत्व [composer.json](composer.json) मा परिभाषित बाहेक हामीले निम्न परियोजनाहरुबाट कोड वा विचारहरु प्रयोग गरेका छौं: -* [Drush](https://www.drush.org/) धेरै कुराहरुको लागि -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) `wp shell` को लागि -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) `wp media regenerate` को लागि +* [Drush](http://drush.ws/) धेरै कुराहरुको लागि +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) `wp shell` को लागि +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) `wp media regenerate` को लागि * [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) `wp search-replace` को लागि * [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) `wp export` को लागि * [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) `wp import` को लागि diff --git a/restful/index.md b/restful/index.md index 4630c8a2..e747c682 100644 --- a/restful/index.md +++ b/restful/index.md @@ -7,7 +7,7 @@ title: A more RESTful WP-CLI *Landing page last updated: August 1, 2016* -WP-CLI's mission is to be, quantitatively, the *fastest* interface for developers to manage WordPress. "A more RESTful WP-CLI" was a [Kickstarter-backed](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli/description) project to unlock the potential of the [WordPress REST API](https://v2.wp-api.org/) at the command line. This funding supported 232.42 hours of [Daniel Bachhuber](https://danielbachhuber.com/)'s time towards making improvements to WP-CLI and the WP REST API. For a full debrief, [read the Post Status post about the project](https://poststatus.com/kickstarter-open-source-project/). +WP-CLI's mission is to be, quantitatively, the *fastest* interface for developers to manage WordPress. "A more RESTful WP-CLI" was a [Kickstarter-backed](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli/description) project to unlock the potential of the [WordPress REST API](http://v2.wp-api.org/) at the command line. This funding supported 232.42 hours of [Daniel Bachhuber](http://danielbachhuber.com/)'s time towards making improvements to WP-CLI and the WP REST API. Wait a second, what does it mean to "unlock the potential of the WP REST API at the command line"? Pragmatically, it means any endpoints registered in plugins or themes are *automagically* accessible as WP-CLI commands. For instance, if you were to register an endpoint for `GET /my-plugin/v1/product/`, this endpoint is also accessible on the command line as (more or less) `wp @prod product get `. @@ -43,7 +43,7 @@ Just like WordPress has plugins, the future of WP-CLI is [packages of commands]( In this model, WP-CLI becomes the common interface, and supporting application layer, to a rich ecosystem of features. Doing so opens more frontiers for innovation, which leads to a greater selection of ideas to choose from. And because more people are involved in authoring packages, WP-CLI benefits from a larger contributor pool. -As a result of the Kickstarter project, you can install WP-CLI packages from the Package Index with `wp package install`, [read through the commands cookbook](https://wp-cli.org/docs/commands-cookbook/) for a thorough introduction to creating a WP-CLI command, or use `wp scaffold package` ([repo](https://github.com/wp-cli/scaffold-package-command)) for the easiest way to generate the boilerplate for your new WP-CLI package, complete with functional tests. +As a result of the Kickstarter project, you can install WP-CLI packages from the Package Index with `wp package install`, [read through the commands cookbook](http://wp-cli.org/docs/commands-cookbook/) for a thorough introduction to creating a WP-CLI command, or use `wp scaffold package` ([repo](https://github.com/wp-cli/scaffold-package-command)) for the easiest way to generate the boilerplate for your new WP-CLI package, complete with functional tests. ### Documentation portal @@ -80,7 +80,7 @@ Releases: Presentations: * [My condolences, you’re now the maintainer of a popular open source project](https://runcommand.io/2016/06/26/my-condolences-youre-now-the-maintainer-of-a-popular-open-source-project/) - WordCamp Europe (June 25, 2016) -* [Unlocking the potential of the WP REST API at the command line](https://blog.handbuilt.co/2016/01/28/feelingrestful-a-more-restful-wp-cli/) - A Day of REST (January 28, 2016) +* [Unlocking the potential of the WP REST API at the command line](http://blog.handbuilt.co/2016/01/28/feelingrestful-a-more-restful-wp-cli/) - A Day of REST (January 28, 2016) *** @@ -161,17 +161,17 @@ This project is made possible thanks to the backing of many generous organizatio - + - + - + diff --git a/ro/index.md b/ro/index.md deleted file mode 100644 index 7082ed1a..00000000 --- a/ro/index.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -layout: default -title: Interfața liniei de comandă pentru WordPress -direction: ltr ---- - -[WP-CLI](https://wp-cli.org/) este interfața liniei de comandă pentru [WordPress](https://wordpress.org/). Poți actualiza module, configura instalări multisit și multe altele, fără să folosești un navigator web. - -Întreținerea continuă este făcută posibilă de către: - - - -Lansarea stabilă curentă este [versiunea 2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). Pentru anunțuri, urmărește [@wpcli pe Twitter](https://twitter.com/wpcli) sau [înregistrează-te pentru actualizări pe email](https://make.wordpress.org/cli/subscribe/). [Consultă foaia de parcurs](https://make.wordpress.org/cli/handbook/roadmap/) pentru o prezentare generală a ceea ce este plănuit pentru lansările viitoare. - -[![Stare compilare](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Durata medie pentru rezolvarea unei probleme](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Durata medie pentru rezolvarea unei probleme") [![Procentul problemelor încă deschise](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Procentul problemelor încă deschise") - -Legături rapide: [Folosire](#folosire) | [Instalare](#instalare) | [Asistență](#asistenta) | [Extindere](#extindere) | [Contribuție](#contribuire) | [Credite](#credite) - -## Folosire - -WP-CLI oferă o interfață de linie de comandă pentru multe acțiuni pe care le-ai putea executa în administrarea WordPress. De exemplu, `wp plugin install --activate` ([documentație](https://developer.wordpress.org/cli/commands/plugin/install/)) îți permite să instalezi și să activezi un modul 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... -Unpacking the package... -Installing the plugin... -Plugin installed successfully. -Activating 'user-switching'... -Plugin 'user-switching' activated. -Success: Installed 1 of 1 plugins. -``` - -WP-CLI include de asemenea comenzi pentru multe lucruri pe care nu le poți face în administrarea WordPress. De exemplu, `wp transient delete --all` ([documentație](https://developer.wordpress.org/cli/commands/transient/delete/)) îți permite să ștergi unul sau toți tranzienții: - -```bash -$ wp transient delete --all -Success: 34 transients deleted from the database. -``` - -Pentru o introducere mai completă a utilizării WP-CLI, citește [Ghidul de inițiere rapidă](https://make.wordpress.org/cli/handbook/quick-start/). Sau vino alături de [prietenii shell](https://make.wordpress.org/cli/handbook/shell-friends/) pentru a afla despre utilitățile liniei de comandă. - -Deja te simți confortabil cu elementele de bază? Sari în [lista completă de comenzi](https://developer.wordpress.org/cli/commands/) pentru informații detaliate despre gestionarea temelor și modulelor, importarea și exportarea datelor, efectuarea operațiunilor de căutare-înlocuire în baza de date și mai multe. - -## Instalare - -Descărcarea fișierului Phar este metoda noastră de instalare recomandată pentru cei mai mulți utilizatori. Dacă ai nevoie, vezi și documentația noastră despre [metodele de instalare alternative](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)). - -Înainte să instalezi WP-CLI, te rog asigură-te că mediul tău respectă cerințele minime: - -- Mediu asemănător UNIX (OS X, Linux, FreeBSD, Cygwin); asistență limitată pentru mediul Windows -- PHP 5.6 sau mai recent -- WordPress 3.7 sau mai recent. Versiuniile mai vechi decât ultima versiune WordPress ar putea avea funcționalități degradate - -Odată ce ai verificat cerințele, descarcă fișierul [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) folosind `wget` sau `curl`: - -```bash -curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -Mai departe, verifică fișierul Phar pentru a vedea dacă funcționează: - -```bash -php wp-cli.phar --info -``` - -Pentru a folosi WP-CLI din lina de comandă tastând `wp`, fă fișierul executabil și mută-l undeva în PATH-ul tău. De exemplu: - -```bash -chmod +x wp-cli.phar -sudo mv wp-cli.phar /usr/local/bin/wp -``` - -Dacă WP-CLI a fost instalat cu succes, ar trebui să vezi ceva asemănător când rulezi `wp --info`: - -```bash -$ wp --info -OS: Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64 -Shell: /bin/zsh -PHP binary: /usr/local/bin/php -PHP version: 7.0.22 -php.ini used: /etc/local/etc/php/7.0/php.ini -WP-CLI root dir: /home/wp-cli/.wp-cli/vendor/wp-cli/wp-cli -WP-CLI vendor dir: /home/wp-cli/.wp-cli/vendor -WP-CLI packages dir: /home/wp-cli/.wp-cli/packages/ -WP-CLI global config: /home/wp-cli/.wp-cli/config.yml -WP-CLI project config: -WP-CLI version: 2.12.0 -``` - -### Actualizare - -Poți actualiza WP-CLI cu `wp cli update` ([documentație](https://developer.wordpress.org/cli/commands/cli/update/)) sau repetând pașii de instalare. - -Dacă WP-CLI este deținut de root sau un alt utilizator de sistem, trebuie să rulezi `sudo wp cli update`. - -Vrei să trăiești viața la limită? Rulează `wp cli update --nightly` pentru a folosi ultima compilare nocturnă a WP-CLI. Compilarea nocturnă este mai mult sau mai puțin stabilă pentru a fi utilizată în mediul tău de dezvoltare și întotdeauna include ultimele și cele mai grozave funcționalități WP-CLI. - -### Auto-completare - -WP-CLI vine de asemenea cu un script de auto-completare pentru Bash și ZSH. Doar descarcă [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) și rulează source pe el din `~/.bash_profile`: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Nu uita să rulezi apoi și `source ~/.bash_profile`. - -Dacă folosești zsh pentru shell-ul tău, trebuie să încarci și să pornești `bashcompinit` înainte de comanda source. Pune următoarele în `.zshrc`: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## Asistență - -Întreținătorii WP-CLI și contribuitorii au disponibilitate limitată pentru a răspunde la întrebările de asistență generală. [Versiunea curentă WP-CLI](https://make.wordpress.org/cli/handbook/roadmap/) este singura versiune oficială pentru care se oferă asistență. - -Când ai nevoie de asistență, te rog să cauți mai întâi întrebarea ta în aceste locuri: - -* [Probleme comune și remedierea lor](https://make.wordpress.org/cli/handbook/common-issues/) -* [Manual WP-CLI](https://make.wordpress.org/cli/handbook/) -* [Probleme deschise sau închise în WP-CLI GitHub](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -* [Subiecte etichetate cu „WP-CLI” în forumul de asistență WordPress.org](https://wordpress.org/support/topic-tag/wp-cli/) -* [Întrebări etichetate cu „WP-CLI” în WordPress StackExchange](https://wordpress.stackexchange.com/questions/tagged/wp-cli) - -Dacă n-ai găsit un răspuns într-unul dintre locațiile de mai sus, poți: - -* Să te alături canalului `#cli` în [WordPress.org Slack](https://make.wordpress.org/chat/) pentru a vorbi cu cineva care ar putea fi disponibil în acel moment. Această opțiune este cea mai bună pentru întrebări rapide. -* [Să postezi un subiect nou](https://wordpress.org/support/forum/wp-advanced/#new-post) în forumul de asistență WordPress.org și să-l etichetezi „WP-CLI” pentru a fi văzut de comunitate. - -Tichetele GitHub sunt menite să urmărească îmbunătățirile și erorile comenzilor existente, nu pentru asistență generală. Înainte să trimiți un raport de eroare, te rog să [revezi cele mai bune practici ale noastre](https://make.wordpress.org/cli/handbook/bug-reports/) pentru a te asigura că problema ta este abordată în timp util. - -Te rog nu adresa întrebări de asistență pe Twitter. Twitter nu este un loc acceptat pentru asistență pentru că: 1) este greu să ții conversații sub 280 de caractere și 2) Twitter nu este un loc unde cineva cu aceeași întrebare ca a ta poate căuta un răspuns într-o conversație anterioară. - -Ține minte, libre != gratis; licența pentru sursa deschisă îți oferă libertate de folosire și modificare, dar nu angajamentul timpului altor persoane. Te rog fii respectuos și setează-ți așteptările în consecință. - -## Extindere - -O **comandă** este unitatea atomică a funcționalității WP-CLI. `wp plugin install` ([documentație](https://developer.wordpress.org/cli/commands/plugin/install/)) este o comandă. `wp plugin activate` ([documentație](https://developer.wordpress.org/cli/commands/plugin/activate/)) este alta. - -WP-CLI suportă înregistrarea oricărei clase, funcție, sau închidere apelabilă ca o comandă. Ea citește detalii de folosire din blocul PHPdoc al funcției de apel. `WP_CLI::add_command()` ([documentație](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) este folosită și intern, și pentru înregistrarea comenzilor din terțe părți. - -```php -/** - * Delete an option from the database. - * - * Returns an error if the option didn't exist. - * - * ## OPTIONS - * - * - * : Key for the option. - * - * ## EXAMPLES - * - * $ wp option delete my_option - * Success: Deleted 'my_option' option. - */ -$delete_option_cmd = function( $args ) { - list( $key ) = $args; - - if ( ! delete_option( $key ) ) { - WP_CLI::error( "Could not delete '$key' option. Does it exist?" ); - } else { - WP_CLI::success( "Deleted '$key' option." ); - } -}; -WP_CLI::add_command( 'option delete', $delete_option_cmd ); -``` - -WP-CLI vine cu zeci de comenzi. Este mai ușor decât pare să creezi o comandă personalizată WP-CLI. Citește [cartea de bucate a comenzilor](https://make.wordpress.org/cli/handbook/commands-cookbook/) pentru a afla mai multe. Răsfoiește [documentația internă API](https://make.wordpress.org/cli/handbook/internal-api/) pentru a descoperi o varietate de funcții ajutătoare pe care le poți folosi în comanda ta personalizată WP-CLI. - -## Contribuție - -Apreciem că ai inițiativa de a contribui la WP-CLI. Datorită ție și comunității din jurul tău, acest WP-CLI este un proiect grozav. - -**Contribția nu este limitată doar la cod.** Te încurajăm să contribui în modul care se potrivește cel mai bine abilităților tale, scriind tutoriale, oferind un demo la meetup-ul tău local, ajutând alți utilizatori cu întrebările lor de asistență sau revizuind documentația. - -Citește prin [ghidul de contribuire din manual](https://make.wordpress.org/cli/handbook/contributing/) pentru o introducere detaliată a modului în care te poți implica. Urmând aceste instrucțiuni te ajută să comunici că respecți timpul altor contribuitori în proiect. La rândul lor, ei vor face tot ce le stă în putință pentru a-ți întoarce acest respect atunci când lucrează cu tine, în zonele de fus orar și în întreaga lume. - -## Leadership - -WP-CLI are un întreținător de proiect: [schlessera](https://github.com/schlessera). - -Ocazional, noi [acordăm acces de scriere contribuitorilor](https://make.wordpress.org/cli/handbook/committers-credo/) care au demonstrat, de-a lungul unei perioade de timp, că sunt capabili și investesc în avansarea proiectului. - -Citește [documentul de guvernanță din manual](https://make.wordpress.org/cli/handbook/governance/) pentru mai multe detalii operaționale despre proiect. - -## Credite - -Pe lângă bibliotecile definite în [composer.json](composer.json), am folosit cod sau idei din următoarele proiecte: - -* [Drush](https://github.com/drush-ops/drush) pentru... o grămadă de lucruri -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) pentru `wp shell` -* [Regenerează miniaturile](https://wordpress.org/plugins/regenerate-thumbnails/) pentru `wp media regenerate` -* [Caută-Înlocuiește-DB](https://github.com/interconnectit/Search-Replace-DB) pentru `wp search-replace` -* [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) pentru `wp export` -* [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) pentru `wp import` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) pentru `wp scaffold plugin-tests` diff --git a/tr/index.md b/tr/index.md index 14efb39a..ab2a24ce 100644 --- a/tr/index.md +++ b/tr/index.md @@ -1,41 +1,37 @@ --- layout: default title: WordPress için Komut Satırı Arayüzü -direction: ltr --- -[WP-CLI](https://wp-cli.org/), [WordPress](https://wordpress.org/) için komut satırı arayüzüdür. Eklenti güncellemesi, multisite kurulumların yapılandırılması ve daha birçok şeyi web tarayıcısına ihtiyaç duymadan gerçekleştirebilirsiniz. +[WP-CLI](https://wp-cli.org/) [WordPress](https://wordpress.org/) kurulumlarını yönetmek için komutlar sunan bir komut satırı aracıdır. Eklenti güncellemesi, multisite kurulumların yapılandırılması ve daha birçok şeyi web tarayıcısına ihtiyaç duymadan gerçekleştirebilirsiniz. -Süregelen bakım, aşağıdakiler sayesinde: - +Güncel kalmak için [@wpcli Twitter](https://twitter.com/wpcli) hesabını takip edebilir ya da [eposta bültenine abone olabilirsiniz](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e). -Mevcut kararlı sürüm [versiyon 2.3.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/). Duyurular için [@wpcli Twitter](https://twitter.com/wpcli) hesabını takip edebilir ya da [eposta bültenine abone olabilirsiniz](https://make.wordpress.org/cli/subscribe/). Gelecek sürüm planına genel bir bakış için [yol haritasına göz atın](https://make.wordpress.org/cli/handbook/roadmap/). -[![Testing](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/wp-cli/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") +[![Build Status](https://travis-ci.org/wp-cli/wp-cli.png?branch=master)](https://travis-ci.org/wp-cli/wp-cli) [![Dependency Status](https://gemnasium.com/badges/github.com/wp-cli/wp-cli.svg)](https://gemnasium.com/github.com/wp-cli/wp-cli) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](http://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") -Bağlantılar: [Kullanım](#kullanm) | [Kurulum](#kurulum) | [Destek](#destek) | [Genişletmek](#geniletmek) | [Katkıda Bulunmak](#katkda-bulunmak) | [Jenerik](#jenerik) +Bağlantılar: [Kullanım](#kullanm) | [Kurulum](#kurulum) | [Destek](#destek) | [Genişletmek](#geniletmek) | [Katkıda Bulunmak](#katkda-bulunmak) | [Katkıda Bulunanlar](#katkda-bulunanlar) ## Kullanım -WP-CLI, WordPress yönetim panelinden gerçekleştirebileceğiniz çoğu işlem için komut-satırı arabirimi sunar. Örneğin `wp plugin install --activate` ([belge](https://developer.wordpress.org/cli/commands/plugin/install/)) bir WordPress eklentisini kurmanızı ve aktifleştirmenizi sağlar: +WP-CLI, WordPress yönetim panelinden gerçekleştirebileceğiniz tüm işlemler için komut-satırı arabirimi sunmayı amaçlar. Örneğin `wp plugin install --activate` ([belge](https://wp-cli.org/commands/plugin/install/)) bir WordPress eklentisini kurmanızı ve aktifleştirmenizi sağlar: ```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. ``` -WP-CLI ayrıca WordPress yönetim panelinden gerçekleştiremeyeceğiniz komutları da barındırır. Örneğin, `wp transient delete --all` ([belge](https://developer.wordpress.org/cli/commands/transient/delete/)) bir veya daha fazla transient'i silmenizi sağlar: +WP-CLI ayrıca WordPress yönetim panelinden gerçekleştiremeyeceğiniz komutları da barındırır. Örneğin, `wp transient delete --all` ([belge](https://wp-cli.org/commands/transient/delete/)) bir veya daha fazla transient'i silmenizi sağlar: ```bash @@ -43,69 +39,67 @@ $ wp transient delete --all Success: 34 transients deleted from the database. ``` -WP-CLI kullanımı hakkında daha detaylı bilgi için, [Hızlı Giriş belgesini](https://make.wordpress.org/cli/handbook/quick-start/) okuyun. Veya [shell friends](https://make.wordpress.org/cli/handbook/shell-friends/) belgesini okuyarak yararlı komut satırı yardımcı programları hakkında bilgi edinin. +WP-CLI kullanımı hakkında detaylı bilgi için, [Hızlı Giriş belgesini](https://wp-cli.org/docs/quick-start/) okuyun. -Temel şeyleri zaten biliyorum diyorsanız, direkt [komutlara](https://developer.wordpress.org/cli/commands/) dalıp tema ve eklenti yönetimi, veri aktarımı, veritabanı bul-değiştir işlemi ve dahası hakkında detaylı bilgiye ulaşabilirsiniz. +Temel şeyleri zaten biliyorum diyorsanız, direkt [komutlara](https://wp-cli.org/commands/) dalıp tema ve eklenti yönetimi, veri aktarımı, veritabanı bul-değiştir işlemi ve dahası hakkında detaylı bilgiye ulaşabilirsiniz. -## Kurulum -Çoğu kullanıcı için Phar dosyasını indirerek kurmalarını öneririz. Ayrıca, ihtiyacınız olursa [alternatif kurulum yöntemlerine](https://make.wordpress.org/cli/handbook/installing/) kurulum dökümanından ulaşabilirsiniz. ([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)). +## Kurulum +Phar dosyasını indirerek kurmanızı öneririz. İhtiyacınız olursa, [alternatif kurulum yöntemlerine](https://wp-cli.org/docs/installing/) kurulum dökümanından ulaşabilirsiniz. + Lütfen WP-CLI'i kurmadan önce minimum ortam gereksinimlerin karşılandığından emin olunuz: - UNIX-benzeri işletim sistemi (OS X, Linux, FreeBSD, Cygwin); Windows kısıtlı desteklenir -- PHP 5.6 veya sonrası -- WordPress 3.7 veya daha üst sürüm. Son WordPress sürümden eski sürümler daha az işlevsellik sunabilir +- PHP 5.3.29 veya daha üst sürüm +- WordPress 3.7 veya daha üst sürüm -Gerensinimleri karşıladıktan sonra, [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) dosyasını `wget` veya `curl` ile indirin: +Gerensinimleri karşıladıktan sonra, [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) dosyasını `wget` veya `curl` ile indirin: ```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 ``` Sonra, çalışıp çalışmadığını kontrol edin: ```bash -php wp-cli.phar --info +$ php wp-cli.phar --info ``` WP-CLI'e komut satırından `wp` yazarak erişebilmek için dosyayı çalıştırılabilir hale getirin ve PATH'de tanımlı olan bir yere taşıyın. Örneğin: ```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 ``` Eğer kurulum başarılı bir şekilde tamamlandıysa, `wp --info` komutunu çalıştırdığınızda buna benzer birşey göreceksiniz: ```bash $ wp --info -OS: Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64 -Shell: /bin/zsh -PHP binary: /usr/local/bin/php -PHP version: 7.0.22 -php.ini used: /etc/local/etc/php/7.0/php.ini -WP-CLI root dir: /home/wp-cli/.wp-cli/vendor/wp-cli/wp-cli -WP-CLI vendor dir: /home/wp-cli/.wp-cli/vendor +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: /home/wp-cli/.wp-cli/config.yml WP-CLI project config: -WP-CLI version: 2.3.0 +WP-CLI version: 0.25.0 ``` ### Güncelleme -WP-CLI'i `wp cli update` komutu ([belge](https://developer.wordpress.org/cli/commands/cli/update/)) ile veya kurulum adımlarını tekrarlayarak güncelleyebilirsiniz. - -Eğer WP-CLI, root veya başka bir sistem kullanıcısı tarafından sahiplenildiyse `sudo wp cli update` çalıştırmanız gerekecektir. +WP-CLI'i `wp cli update` komutu ([belge](https://wp-cli.org/commands/cli/update/)) ile veya kurulum adımlarını tekrarlayarak güncelleyebilirsiniz. -Sınırda yaşamayı seviyor musunuz? `wp cli update --nightly` komutu ile nightly build sürümüne güncelleyebilirsiniz. Geliştirme ortamınız için nightly build sürümler daha çok ya da az stabil olabilir ve her zaman en son ve yeni WP-CLI özelliklerini içerir. +Sınırda yaşamayı seviyor musunuz? `wp cli update --nightly` komutu ile nightly build sürümüne güncelleyebilirsiniz. Geliştirme ortamınız için nightly build sürümler daha çok yada az stabil olabilir ve her zaman en son ve yeni WP-CLI özelliklerini içerir. ### Sekme tamamlama -WP-CLI ayrıca, Bash ve ZSH için sekme tamamlama scripti sunar. Yapmanız gereken sadece [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) dosyasını indirmek ve kaynak olarak `~/.bash_profile` dosyanıza tanımlamak: +WP-CLI ayrıca, Bash ve ZSH için sekme tamamlama scripti sunar. Yapmanız gereken sadece [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash) dosyasını indirmek ve kaynak olarak `~/.bash_profile` dosyanıza tanımlamak: + + ```bash source /FULL/PATH/TO/wp-completion.bash @@ -121,36 +115,35 @@ bashcompinit source /FULL/PATH/TO/wp-completion.bash ``` -## Destek -WP-CLI'nin bakımcıları ve katılımcıları genel destek soruları için sınırlı müsaitliğe sahiptir. [Mevcut WP-CLI sürümu](https://make.wordpress.org/cli/handbook/roadmap/) resmi olarak desteklenen tek sürümdür. -Lütfen desteğe ihtiyacınız olduğünda, öncelikle sorunuzu aşağıdaki kaynaklarda arayın: +## Destek + +WP-CLI bakımcıları ve katılımcıları tüm yeni gelen soruları cevaplamak için ellerinden geleni yapmaktadır. Onların zamanını verimli kullanmak adına, lütfen öncelikle sorunuzun cevabını aşağıdaki kaynaklarda arayın: -* [Ortak sorunlar ve çözümleri](https://make.wordpress.org/cli/handbook/common-issues/) -* [WP-CLI el kitabı](https://make.wordpress.org/cli/handbook/) -* [GitHub organizasyonu üzerindeki açık veya kapalı konular](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -* ['WP-CLI' ile etiketlenmiş WordPress.org destek forumları](https://wordpress.org/support/topic-tag/wp-cli/) -* ['WP-CLI' ile etiketlenmiş WordPress StackExchange soruları](https://wordpress.stackexchange.com/questions/tagged/wp-cli) -Eğer bu kaynaklarda sorularınıza cevap bulamazsanız: +- [Ortak sorunlar ve çözümleri](https://wp-cli.org/docs/common-issues/) +- [Dökümantasyon](https://wp-cli.org/docs/) +- [Github üzerindeki açık veya kapalı konular](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [runcommand Excerpts](https://runcommand.io/excerpts/) +- [WordPress StackExchange forumları](http://wordpress.stackexchange.com/questions/tagged/wp-cli) -* [WordPress.org Slack](https://make.wordpress.org/chat/) üzerinden `#cli` kanalında müsait olanlarla sohbet edebilirsiniz. Hızlı sorular için en iyi seçenektir. -* WordPress.org destek forumlarında [yeni bir konu](https://wordpress.org/support/forum/wp-advanced/#new-post) açıp, 'WP-CLI' etiketi ekleyin, böylece topluluk tarafından görülür. +Eğer bu kaynaklarda sorularınıza cevap bulamazsanız, [WordPress.org Slack organizasyonu](https://make.wordpress.org/chat/) üzerinden `#cli` kanalına katılın, topluluk üyelerinden birisi yardımcı olabilir. Profesyonel kullanıcılar, premium destek için ayrıca [runcommand](https://runcommand.io/) 'ı düşünebilirler. -Github konuları mevcut komutlar için yenilik ve hata takibi icin kullanılmaktadır, genel destek için değildir. Hata bildirimi göndermeden önce, sorununuz zamanında ele alınması için lütfen [hata bildirimi yöntemini](https://make.wordpress.org/cli/handbook/bug-reports/) gözden geçirin. +Github konuları mevcut komutlar için yenilik ve hata takibi icin kullanılmaktadır, genel destek için değildir. Hata bildirimi göndermeden önce, sorununuz zamanında ele alınması için lütfen [hata bildirimi yöntemini](ttps://wp-cli.org/docs/bug-reports/) gözden geçirin. -Lütfen Twitter üzerinden destek soruları sormayın. Twitter destek için iyi bir yer değildir, çünkü: 1) Yazışmaları 280 karakterin altında tutmak zor, ve 2) Twitter sizinle aynı soruna sahip birisinin önceki cevabı arayarak bulabileceği bir yer değil. +Lütfen Twitter üzerinden destek soruları sormayın. Twitter destek için iyi bir yer değildir çünkü: 1) Yazışmaları 140 karakterin altında tutmak zor, ve 2) Twitter sizinle aynı soruna sahip birisinin önceki cevabı arayarak bulabileceği bir yer değil. Unutmayın, özgür != ücretsiz; açık kaynak lisansı size özgürce kullanma ve değiştirme hakkı verir, başkalarının zamanını değil. Lütfen buna saygı duyun ve beklentilerinizi buna göre ayarlayın. + ## Genişletmek -Bir **Komut** WP-CLI'nin atomik birimidir. `wp plugin install` ([belge](https://developer.wordpress.org/cli/commands/plugin/install/)) bir komuttur. `wp plugin activate` ([belge](https://developer.wordpress.org/cli/commands/plugin/activate/)) başka bir komuttur. +**Komutlar** WP-CLI'nin atomik birimleridir. `wp plugin install` ([belge](https://wp-cli.org/commands/plugin/install/)) bir komuttur. `wp plugin activate` ([belge](https://wp-cli.org/commands/plugin/activate/)) başka bir komuttur. -WP-CLI çağrılabilen herhangi bir sınıfı, fonksiyonu ya da anonim fonksiyonu komut olarak kaydetmeyi destekler. Kullanım detaylarını callback'in PHP dökümanından (PHPdoc) okur. `WP_CLI::add_command()` ([belge](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)) dahili ve üçüncü-parti komutların kaydedilmesi için kullanılmaktadır. +WP-CLI çağrılabilen herhangi bir sınıfı, fonksiyonu yada anonim fonksiyonu komut olarak kaydetmeyi destekler. Kullanım detaylarını callback'in PHP dökümanından (PHPdoc) okur. `WP_CLI::add_command()` ([belge](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) dahili ve üçüncü-parti komutların kaydedilmesi için kullanılmaktadır. ```php /** @@ -181,35 +174,38 @@ WP_CLI::add_command( 'option delete', $delete_option_cmd ); ``` -WP-CLI onlarca komutla hazır olarak gelir. Özel bir WP-CLI komutu oluşturmak görünenden daha kolaydır. Detaylar için [komutlar tarif kitabına](https://make.wordpress.org/cli/handbook/commands-cookbook/) bakabilirsiniz. [Dahili API dökümantasyonunu](https://make.wordpress.org/cli/handbook/internal-api/) gözden geçirerek kendi WP-CLI komutunuzda kullanabileceğiniz faydalı fonksiyonları keşfedebilirsiniz. +WP-CLI onlarca komutla hazır olarak gelir. Özel bir WP-CLI komutu oluşturmak görünenden daha kolaydir. Detaylar için [komutlar belgesine](https://wp-cli.org/docs/commands-cookbook/) bakabilirsiniz. [Dahili API dökümantasyonunu](https://wp-cli.org/docs/internal-api/) gözden geçirerek kendi WP-CLI komutunuzda kullanabileceğiniz faydalı foksyionları keşfedebilirsiniz. ## Katkıda Bulunmak +Hoşgeldiniz ve teşekkürler! + WP-CLI'e katkıda bulunmak istediğiniz için teşekkür ederiz. WP-CLI siz ve sizin gibi topluluk üyeleri sayesinde bu kadar büyük bir proje olmayı başarabildi. -**Katkıda bulunmak sadece kod yazmakla sınırlı değildir.** Kendi yeteneklerinize uygun olacak şekilde; tanıtım yazıları yazarak, yerel etkinliklerde demo göstererek, başkalarının sorunlarına yardımcı olarak veya dökümantasyonumuzu gözden geçirerek katkıda bulunabilirsiniz. +**Katkıda bulunmak sadece kod yazmakla sınırlı değildir.** kendinize yeteneklerinize uygun olacak şekilde; tanıtım yazıları yazarak, yerel etkinliklerde demo göstererek, başkalarının sorunlarına yardımcı olarak veya dökümantasyonumuzu gözden geçirerek katkıda bulunabilirsiniz. Lütfen bir dakikanızı ayırıp [dökümanı detaylıca okuyun](https://wp-cli.org/docs/contributing/). Bunları takip ederek, katkıda bulunan diğer katılımcıların ayırdığı zamana saygı gösteriniz. Buna karşılık, onlar da aynı saygıyı sizinle çalışırken göstereceklerdir (zaman farkı gözetmeksizin, dünya genelinde). -Nasıl katılacağınıza dair kapsamlı bir giriş için [el kitabındaki katkı kurallarını](https://make.wordpress.org/cli/handbook/contributing/) okuyun. Bu kurallara uymak, projeye katkıda bulunan diğer üyelerin zamanına saygı duyduğunuzu bildirmenize yardımcı olur. Buna karşılık, onlar da bu saygıya karşılık vermek için ellerinden geleni zaman farkı gözetmeksizin, dünya genelinde yapacaktır. ## Yönetim +WP-CLI bu kişiler tarafından yönetiliyor: -WP-CLI'nın bir proje sorumlusu vardır: [schlessera](https://github.com/schlessera). +* [Daniel Bachhuber](https://github.com/danielbachhuber/) - şimdiki bakımcı +* [Cristi Burcă](https://github.com/scribu) - eski bakımcı +* [Andreas Creten](https://github.com/andreascreten) - kurucu -Zaman zaman, belli bir süre için yetenekli olduklarını kanıtlamış ve projeyi ileriye taşıyabilecek katılımcılara [yazma izni veriyoruz](https://make.wordpress.org/cli/handbook/committers-credo/). -Proje hakkında daha operasyonel ayrıntılar için [el kitabındaki yönetim belgesini](https://make.wordpress.org/cli/handbook/governance/) okuyabilirsiniz. +Projenin [yönetimi](https://wp-cli.org/docs/governance/) hakkında bilgi edinebilir ve [katkıda bulunanların tam listesini](https://github.com/wp-cli/wp-cli/contributors) görüntüleyebilirsiniz. -## Jenerik +## Katkıda Bulunanlar [composer.json](composer.json) dosyasında tanımlanan kütüphanelerin yanında, aşağıdaki projeleri de kod veya fikir için kullandık: -* [Drush](https://github.com/drush-ops/drush) birçok şey içın -* [wpshell](https://code.trac.wordpress.org/browser/wpshell) `wp shell` komutu için -* [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) `wp media regenerate` komutu için +* [Drush](http://drush.ws/) birçok şey içın +* [wpshell](http://code.trac.wordpress.org/browser/wpshell) `wp shell` komutu için +* [Regenerate Thumbnails](http://wordpress.org/plugins/regenerate-thumbnails/) `wp media regenerate` komutu için * [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB) `wp search-replace` komutu içın * [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter) `wp export` komutu içın * [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer) `wp import` komutu içın diff --git a/zh-cn/index.md b/zh-cn/index.md deleted file mode 100644 index 95a82684..00000000 --- a/zh-cn/index.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -layout: default -title: WP-CLI | WP-CLI -direction: ltr ---- - -[WP-CLI](https://wp-cli.org/) 是 [WordPress](https://wordpress.org/) 的命令行接口。无需使用浏览器,你即可更新插件、配置多站点安装以及完成更多操作。 - -持续维护由以下机构赞助: - - - -当前稳定版本为 [2.12.0](https://make.wordpress.org/cli/2025/05/07/wp-cli-v2-12-0-release-notes/)。获取公告可关注 [Twitter 上的 @wpcli](https://twitter.com/wpcli) 或 [订阅邮件更新](https://make.wordpress.org/cli/subscribe/)。前往[路线图](https://make.wordpress.org/cli/handbook/roadmap/)查看未来版本的规划概览。 - -[![Testing](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/automated-tests/actions/workflows/testing.yml) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Average time to resolve an issue") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-cli/wp-cli.svg)](https://isitmaintained.com/project/wp-cli/wp-cli "Percentage of issues still open") - -快速链接:[使用](#使用) | [安装](#安装) | [支持](#支持) | [扩展](#扩展) | [贡献](#贡献) | [致谢](#致谢) - -## 使用 - -WP-CLI 为许多你可能在 WordPress 管理后台执行的操作提供了命令行界面。例如,`wp plugin install --activate`([文档](https://developer.wordpress.org/cli/commands/plugin/install/))可以让你安装并激活一个 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... -Unpacking the package... -Installing the plugin... -Plugin installed successfully. -Activating 'user-switching'... -Plugin 'user-switching' activated. -Success: Installed 1 of 1 plugins. -``` - -WP-CLI 也包含许多你无法在后台直接完成的命令。例如,`wp transient delete --all`([文档](https://developer.wordpress.org/cli/commands/transient/delete/))可以删除一个或所有 transient(临时缓存): - -```bash -$ wp transient delete --all -Success: 34 transients deleted from the database. -``` - -如需更完整的使用介绍,请阅读[快速入门指南](https://make.wordpress.org/cli/handbook/quick-start/)。或者,查看[shell friends](https://make.wordpress.org/cli/handbook/shell-friends/)学习常用的命令行工具。 - -已经熟悉基础?前往[完整命令列表](https://developer.wordpress.org/cli/commands/)获取关于管理主题与插件、数据导入导出、执行数据库搜索替换等的详细信息。 - -## 安装 - -对于大多数用户,我们推荐通过下载 Phar 文件的方式安装。必要时也可以参阅[其它安装方法](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))。 - -在安装 WP-CLI 之前,请确保你的环境满足以下最低要求: - -- 类 UNIX 环境(OS X、Linux、FreeBSD、Cygwin);Windows 环境支持有限 -- PHP 5.6 或更高版本 -- WordPress 3.7 或更高版本。低于最新版的 WordPress 可能会有功能退化 - -确认满足要求后,使用 `wget` 或 `curl` 下载 [wp-cli.phar](https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) 文件: - -```bash -curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -接着,检查 Phar 文件以确认其是否可用: - -```bash -php wp-cli.phar --info -``` - -若希望在命令行中通过 `wp` 使用 WP-CLI,请将该文件设为可执行并移动到 `PATH` 中的某个位置。例如: - -```bash -chmod +x wp-cli.phar -sudo mv wp-cli.phar /usr/local/bin/wp -``` - -如果 WP-CLI 安装成功,运行 `wp --info` 应看到类似如下的输出: - -```bash -$ wp --info -OS: Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 -Shell: /usr/bin/zsh -PHP binary: /usr/bin/php8.1 -PHP version: 8.1.0 -php.ini used: /etc/php/8.1/cli/php.ini -MySQL binary: /usr/bin/mysql -MySQL version: mysql Ver 8.0.27-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 -``` - -### 更新 - -你可以通过 `wp cli update`([文档](https://developer.wordpress.org/cli/commands/cli/update/))更新 WP-CLI,或重复安装步骤进行更新。 - -如果 WP-CLI 由 root 或其他系统用户拥有,你需要运行 `sudo wp cli update`。 - -想体验前沿版本?运行 `wp cli update --nightly` 以使用最新的每夜构建。每夜构建在开发环境中总体上足够稳定,并且始终包含最新与最棒的 WP-CLI 功能。 - -### Tab 自动补全 - -WP-CLI 还提供适用于 Bash 与 ZSH 的 Tab 补全脚本。只需下载 [wp-completion.bash](https://raw.githubusercontent.com/wp-cli/wp-cli/v2.12.0/utils/wp-completion.bash) 并在 `~/.bash_profile` 中进行 source: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -别忘了随后运行 `source ~/.bash_profile`。 - -如果你的 shell 使用 zsh,在 source 之前可能需要加载并启动 `bashcompinit`。将以下内容放入你的 `.zshrc`: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## 支持 - -WP-CLI 的维护者与贡献者在处理一般支持问题上的时间有限。[WP-CLI 的当前版本](https://make.wordpress.org/cli/handbook/roadmap/)是唯一官方支持的版本。 - -在寻找支持时,请先在以下渠道搜索你的问题: - -- [常见问题与解决方案](https://make.wordpress.org/cli/handbook/common-issues/) -- [WP-CLI 手册](https://make.wordpress.org/cli/handbook/) -- [WP-CLI 组织下的 GitHub 问题(开放或已关闭)](https://github.com/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+org%3Awp-cli+is%3Aissue) -- [WordPress.org 论坛中标记为“WP-CLI”的讨论串](https://wordpress.org/support/topic-tag/wp-cli/) -- [WordPress StackExchange 上标记为“WP-CLI”的问题](https://wordpress.stackexchange.com/questions/tagged/wp-cli) - -如果在上述渠道仍未找到答案,你可以: - -- 加入 [WordPress.org Slack](https://make.wordpress.org/chat/) 的 `#cli` 频道,与当时在线的社区成员交流。该选项最适合快速问题。 -- 在 WordPress.org 支持论坛[发布新帖](https://wordpress.org/support/forum/wp-advanced/#new-post),并添加“WP-CLI”标签,以便被社区看到。 - -GitHub issue 用于跟踪现有命令的增强与缺陷,而不是一般支持。提交缺陷报告之前,请先[阅读我们的最佳实践](https://make.wordpress.org/cli/handbook/bug-reports/),以帮助确保你的问题能得到及时处理。 - -请不要在 Twitter 上提出支持问题。Twitter 并非合适的支持渠道,因为:1)在 280 个字符内难以进行对话;2)Twitter 不是一个可以让有相同问题的人检索以往对话的地方。 - -请记住,libre != gratis;开源许可赋予你使用与修改的自由,但并不意味着他人的时间承诺。请保持尊重,并合理设置你的期望。 - -## 扩展 - -**命令** 是 WP-CLI 功能的原子单位。`wp plugin install`([文档](https://developer.wordpress.org/cli/commands/plugin/install/))是一个命令,`wp plugin activate`([文档](https://developer.wordpress.org/cli/commands/plugin/activate/))是另一个命令。 - -WP-CLI 支持将任意可调用的类、函数或闭包注册为命令。它会从回调的 PHPDoc 中读取用法细节。`WP_CLI::add_command()`([文档](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/))既用于内部命令也用于第三方命令的注册。 - -```php -/** - * Delete an option from the database. - * - * Returns an error if the option didn't exist. - * - * ## OPTIONS - * - * - * : Key for the option. - * - * ## EXAMPLES - * - * $ wp option delete my_option - * Success: Deleted 'my_option' option. - */ -$delete_option_cmd = function( $args ) { - list( $key ) = $args; - - if ( ! delete_option( $key ) ) { - WP_CLI::error( "Could not delete '$key' option. Does it exist?" ); - } else { - WP_CLI::success( "Deleted '$key' option." ); - } -}; -WP_CLI::add_command( 'option delete', $delete_option_cmd ); -``` - -WP-CLI 自带数十个命令。创建自定义 WP-CLI 命令并没有看起来那么难。阅读[命令手册](https://make.wordpress.org/cli/handbook/commands-cookbook/)了解更多。浏览[内部 API 文档](https://make.wordpress.org/cli/handbook/internal-api/),发现可在自定义命令中使用的多种辅助函数。 - -## 贡献 - -感谢你主动为 WP-CLI 做出贡献。正因为有你以及你周围的社区,WP-CLI 才能成为如此优秀的项目。 - -**贡献不局限于代码。** 我们鼓励你以最适合自己能力的方式贡献,比如撰写教程、在本地聚会上进行演示、帮助其他用户解决支持问题,或完善我们的文档。 - -请阅读[手册中的贡献指南](https://make.wordpress.org/cli/handbook/contributing/),以全面了解你可以如何参与。遵循这些指南能传达你尊重项目其他贡献者时间的态度。相应地,他们也会尽力在与你合作时回馈这种尊重,不论时区与地域。 - -## 管理者 - -WP-CLI 项目维护者: [schlessera](https://github.com/schlessera)。 - -在特定情况下,我们会[授予贡献者写入权限](https://make.wordpress.org/cli/handbook/committers-credo/),前提是他们在一段时间内证明了自己有能力并致力于推动项目前进。 - -请阅读[手册中的治理文档](https://make.wordpress.org/cli/handbook/governance/),了解项目的更多运作细节。 - -## 致谢 - -除了在 [composer.json](composer.json) 中定义的库之外,我们还使用或借鉴了以下项目的代码或思想: - -- [Drush](https://github.com/drush-ops/drush) -- [wpshell](https://code.trac.wordpress.org/browser/wpshell)(用于 `wp shell`) -- [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)(用于 `wp media regenerate`) -- [Search-Replace-DB](https://github.com/interconnectit/Search-Replace-DB)(用于 `wp search-replace`) -- [WordPress-CLI-Exporter](https://github.com/Automattic/WordPress-CLI-Exporter)(用于 `wp export`) -- [WordPress-CLI-Importer](https://github.com/Automattic/WordPress-CLI-Importer)(用于 `wp import`) -- [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/)(用于 `wp scaffold plugin-tests`)