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/.bundle/config b/.bundle/config deleted file mode 100644 index 9bc01b4c..00000000 --- a/.bundle/config +++ /dev/null @@ -1,3 +0,0 @@ ---- -BUNDLE_PATH: "vendor/bundle" -BUNDLE_DISABLE_SHARED_GEMS: "true" 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/.gitignore b/.gitignore index accb727e..5ae67303 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ _site -.DS_Store + Gemfile.lock composer.lock vendor 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/Gemfile b/Gemfile index 11cd392c..4d3fad9b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,3 @@ source 'https://rubygems.org' gem 'jekyll' -gem 'kramdown' -gem 'rouge' -gem 'jekyll-paginate' +gem 'kramdown' \ No newline at end of file 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/Phakefile.php b/Phakefile.php new file mode 100644 index 00000000..4240bc06 --- /dev/null +++ b/Phakefile.php @@ -0,0 +1,129 @@ +render( $template, $binding ); +} + +desc( 'Generate a list of commands with all accepted arguments on STDOUT.' ); +task( 'syn-list', function( $app ) { + function generate_synopsis( $command, $path = '' ) { + $full_path = $path . ' ' . $command['name']; + + if ( !isset( $command['subcommands'] ) ) { + echo $full_path . ' ' . $command['synopsis'] . "\n"; + } else { + foreach ( $command['subcommands'] as $subcommand ) { + generate_synopsis( $subcommand, $full_path ); + } + } + } + + generate_synopsis( invoke_wp_cli( 'wp cli cmd-dump', $app ) ); +}); + +function gen_cmd_pages( $cmd, $parent = array() ) { + $parent[] = $cmd['name']; + + $binding = $cmd; + $binding['synopsis'] = implode( ' ', $parent ); + $binding['path'] = implode( '/', $parent ); + $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 ); + + // hack to prevent double encoding in code blocks + $docs = preg_replace( '/ < /', ' < ', $docs ); + $docs = preg_replace( '/ > /', ' > ', $docs ); + $docs = preg_replace( '/ <</', ' <<', $docs ); + $docs = preg_replace( '/"/', '"', $docs ); + + $binding['docs'] = $docs; + } + + $path = __DIR__ . "/commands/" . $binding['path']; + if ( !is_dir( $path ) ) { + mkdir( $path ); + } + file_put_contents( "$path/index.md", render( 'subcmd-list.mustache', $binding ) ); + + if ( !isset( $cmd['subcommands'] ) ) + return; + + foreach ( $cmd['subcommands'] as $subcmd ) { + gen_cmd_pages( $subcmd, $parent ); + } +} + +desc( 'Update the /commands/ page.' ); +task( 'cmd-list', function( $app ) { + $wp = invoke_wp_cli( 'wp cli cmd-dump', $app ); + + // generate main page + file_put_contents( '_includes/cmd-list.html', render( 'cmd-list.mustache', $wp ) ); + + foreach ( $wp['subcommands'] as $cmd ) { + gen_cmd_pages( $cmd ); + } +}); + +desc( 'Update the /config/ page.' ); +task( 'param-list', function( $app ) { + $config_spec = invoke_wp_cli( 'wp cli param-dump', $app ); + + $out = ''; + + 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' ) ); + } + + file_put_contents( '_includes/param-list.html', $out ); +}); + +desc( 'Build the site.' ); +task( 'default', 'cmd-list', 'param-list' ); + diff --git a/README.md b/README.md index 51421adb..57ece493 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,16 @@ -These files comprise wp-cli.org*. +### Setup -All command documentation is dynamically generated from the PHPDoc for each command. If you'd like to suggest command documentation changes, please submit a pull request against the [primary repo](https://github.com/wp-cli/wp-cli). Command documentation changes are deployed to the website with each release. +1. Install [Composer](http://getcomposer.org/). -### Regenerate website +2. Install dev dependencies with `composer install --dev` -The website uses a series of WP-CLI commands to generate its documentation: +3. Build: ```bash -NAME - - wp website - -SYNOPSIS - - wp website - -SUBCOMMANDS - - generate Run all generation commands to generate full website. - generate-commands Generate the /commands/ page. - generate-config Generate the /config/ page. - generate-contributing Generate the contributing page from WP-CLI's CONTRIBUTING.md - generate-docs Generate the /docs/ page. - generate-homepage Generate the homepage from WP-CLI's README.md - generate-internal-api-docs Generate the /docs/internal-apis/ page. +vendor/bin/phake ``` ### Preview locally 1. [Install Bundler gem](http://jekyllrb.com/docs/installation/): `gem install bundler`. -2. [Install dependencies](http://jekyllrb.com/docs/installation/): `bundle install` -3. Run `jekyll serve --watch` - -*wp-cli.org/package-index is generated by the [package index repo](https://github.com/wp-cli/package-index), and won't be present in your local instance. - -### How to translate - -1. Add your language to `[_config.yml](https://github.com/wp-cli/wp-cli.github.com/blob/main/_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. -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. +2. Run `jekyll serve --watch` diff --git a/_config.yml b/_config.yml index 99a9a947..93c65aff 100644 --- a/_config.yml +++ b/_config.yml @@ -1,11 +1,8 @@ safe: true lsi: false -highlighter: rouge +pygments: true 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 @@ -13,57 +10,15 @@ include: - _s exclude: - bin - - vendor - Phakefile.php - 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: Packages + url: /package-index/ - text: Blog - url: https://make.wordpress.org/cli/ -- text: Contributing - url: https://make.wordpress.org/cli/handbook/contributing/ -languages: -- label: English - iso-alpha2: en - path: / -- label: Japanese - iso-alpha2: ja - path: /ja/ -- label: Persian (Farsi) - iso-alpha2: fa - path: /fa/ -- label: Français - iso-alpha2: fr - path: /fr/ -- label: Português (Brasil) - iso-alpha2: br - path: /br/ -- label: Türkçe - iso-alpha2: tr - path: /tr/ -- label: Deutsch - iso-alpha2: de - path: /de/ -- label: नेपाली - iso-alpha2: ne - path: /ne/ -- label: ελληνικά - iso-alpha2: gr - path: /gr/ -- 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/ + url: /blog/ + layout: post \ No newline at end of file diff --git a/_includes/cmd-list.html b/_includes/cmd-list.html new file mode 100644 index 00000000..19acaa39 --- /dev/null +++ b/_includes/cmd-list.html @@ -0,0 +1,124 @@ + + cache + Manage the object cache. + + + cap + Manage user capabilities. + + + cli + Get information about WP-CLI itself. + + + comment + Manage comments. + + + core + Download, install, update and otherwise manage WordPress proper. + + + cron + Manage WP-Cron events and schedules. + + + db + Perform basic database operations. + + + eval + Execute arbitrary PHP code after loading WordPress. + + + eval-file + Load and execute a PHP file after loading WordPress. + + + export + Export content to a WXR file. + + + help + Get help on a certain command. + + + import + Import content from a WXR file. + + + media + Manage attachments. + + + menu + List, create, assign, and delete menus + + + network + + + + option + Manage options. + + + plugin + Manage plugins. + + + post + Manage posts. + + + rewrite + Manage rewrite rules. + + + role + Manage user roles. + + + scaffold + Generate code for post types, taxonomies, etc. + + + search-replace + Search/replace strings in the database. + + + shell + Interactive PHP console. + + + sidebar + Manage sidebars. + + + site + Perform site-wide operations. + + + super-admin + List, add, and remove super admins from a network. + + + term + Manage terms. + + + theme + Manage themes. + + + transient + Manage transients. + + + user + Manage users. + + + widget + Manage sidebar widgets. + diff --git a/_includes/disqus.html b/_includes/disqus.html index c2357dd9..adcf9e92 100644 --- a/_includes/disqus.html +++ b/_includes/disqus.html @@ -6,9 +6,9 @@ /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; + dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); - -comments powered by Disqus + +comments powered by Disqus diff --git a/_includes/footer.html b/_includes/footer.html index b5e45176..765991a9 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,52 +1,8 @@ - {% if page.display_global_parameters %} - {% include global-parameters.html %} - {% endif %} - - + {% include analytics.html %} - - diff --git a/_includes/global-parameters.html b/_includes/global-parameters.html deleted file mode 100644 index a66200ff..00000000 --- a/_includes/global-parameters.html +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/_includes/header.html b/_includes/header.html index f9985180..96b9c55d 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,52 +1,30 @@ -{% 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

+

A command line interface for WordPress

- {% include navigation.html %} - {% include languages.html %} + {% include navigation.html %}
+ diff --git a/_includes/languages.html b/_includes/languages.html deleted file mode 100644 index 487fc9df..00000000 --- a/_includes/languages.html +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/_includes/navigation.html b/_includes/navigation.html index cacac288..819c0007 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -13,15 +13,13 @@ {{ link.text }} {% endfor %} - - - diff --git a/_includes/param-list.html b/_includes/param-list.html index 856c941b..39d68c25 100644 --- a/_includes/param-list.html +++ b/_includes/param-list.html @@ -1,40 +1,14 @@ - Path to the WordPress files. + Path to the WordPress files
Default value: null - - --path=<path> - path: <path> - - - - Perform operation against a remote server over SSH. -
- Default value: null - - - --ssh=[<user>@]<host>[:<port>][<path>] - - - ssh: [<user>@]<host>[:<port>][<path>] - - - - - Perform operation against a remote WordPress install over HTTP. -
- Default value: null - - --http=<http> - - - http: <http> + --path=<path> @@ -44,152 +18,126 @@ Default value: null - --url=<url> + url: <url> - url: <url> + --url=<url> - Set the WordPress user. + Set the WordPress user
Default value: null - - --user=<id|login|email> - user: <id|login|email> - - - - Skip loading all or some plugins. Note: mu-plugins are still loaded. -
- Default value: "" - - --skip-plugins[=<plugin>] - - - skip-plugins: <list> + --user=<id|login|email> - Skip loading all or some themes. + Skip loading all or some plugins
Default value: "" - --skip-themes[=<theme>] - - - skip-themes: <list> - - - - - Skip loading all installed packages. -
- Default value: false - - - --skip-packages + skip-plugins: <list> - skip-packages: <bool> + --skip-plugins[=<plugin>] - Load PHP file before running the command (may be used more than once). + Load PHP file before running the command (may be used more than once)
Default value: [] - --require=<path> + require: <path> - require: <path> + --require=<path> - (Sub)commands to disable. + (Sub)commands to disable
Default value: [] - Not available as a flag + disabled_commands: <list> - disabled_commands: <list> + - Whether to colorize the output. + Whether to colorize the output
Default value: "auto" - --[no-]color + color: <bool> - color: <bool> + --[no-]color - Show all PHP errors; add verbosity to WP-CLI bootstrap. + Show all PHP errors
Default value: false - --debug[=<group>] + debug: <bool> - debug: <group> + --debug - Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. + Prompt the user to enter values for all command arguments
Default value: false - --prompt[=<assoc>] + - Not available as an option + --prompt - Suppress informational messages. + Suppress informational messages
Default value: false - --quiet + quiet: <bool> - quiet: <bool> + --quiet - List of Apache Modules that are to be reported as loaded. + List of Apache Modules that are to be reported as loaded
Default value: [] - Not available as a flag + apache_modules: <list> - apache_modules: <list> + 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-03-29-scaffolding-custom-post-types-and-taxonomies.md b/_posts/2013-03-29-scaffolding-custom-post-types-and-taxonomies.md index 62666a5c..2ad0bf25 100644 --- a/_posts/2013-03-29-scaffolding-custom-post-types-and-taxonomies.md +++ b/_posts/2013-03-29-scaffolding-custom-post-types-and-taxonomies.md @@ -20,7 +20,7 @@ wp scaffold post-type zombie The following command generates the code for registering the taxonomy to the zombie post type: ~~~bash -wp scaffold taxonomy zombie-speed --post_types=zombie +wp scaffold taxonomy zombie-speed --post-type=zombie ~~~ ### But I only want the registration of the post-type... 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 deleted file mode 100644 index 9da1aa59..00000000 --- a/_posts/2014-11-18-version-0.17.1.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.17.1 released ---- - -Consider yourself lucky there were less bugs in 0.17 than sugar ants in our kitchen. The changelog for 0.17.1: - -* Fixes use of `wp plugin uninstall --no-delete` by changing it to `wp plugin uninstall --skip-delete`. `--no-*` is a special class of argument which negates a flag, and the behavior for `--no-delete` had been broken for several releases. -* Fixes creating and editing posts in Vim or another system editor. -* Fixes use of `mkdir` on Windows. -* Fixes activating and deactivating plugins located in the same directory. -* Plugin and theme names with HTML-encoded characters are decoded for presentation. -* PHP magic methods like `__construct()` and `__destruct()` are ignored as subcommands. You can still use `__invoke()` to register one command to a class. -* Forces https for requests to WordPress.org. -* Fixes blank response for `wp comment list --format-ids`. -* 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. - -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-01-14-version-0.18.0.md b/_posts/2015-01-14-version-0.18.0.md deleted file mode 100644 index 0de80a63..00000000 --- a/_posts/2015-01-14-version-0.18.0.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.18.0 released ---- - -Hello 2015! Here's your first release for the new year. - -### Update WP-CLI using WP-CLI - -We've made it even easier to keep WP-CLI up to date. If you're using the Phar file and it's writable, you can call `wp cli update` to install the latest version. - - - $ ./wp-cli.0.17.1.phar cli update - You have version 0.17.1. Would you like to update to 0.18.0? [y/n] y - Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.18.0/wp-cli.phar... - New version works. Proceeding to replace. - Success: Updated WP-CLI to 0.18.0 - -Of course, if you've installed WP-CLI via Composer or Git, you should run master to always get the latest and greatest. - -### Manage post and user terms - -WP-CLI supports managing terms associated with posts and users: - - $ wp post term add 1 post_tag foo - Success: Added term. - - $ wp post term add 1 post_tag bar - Success: Added term. - - $ wp post term list 1 post_tag - +---------+------+------+----------+ - | term_id | name | slug | taxonomy | - +---------+------+------+----------+ - | 4 | bar | bar | post_tag | - | 3 | foo | foo | post_tag | - +---------+------+------+----------+ - - $ wp post term remove 1 post_tag foo bar - Success: Deleted term. - -### Consistent behavor for plugin activation and deactivation - -We've cleaned up the behavior for activating and deactivating plugins: - -* If a plugin is already active, it's allowed to become network active. -* If a plugin is already network active, it's *not* allowed to become active. -* Network active plugins must be deactivated with the `--network` flag. -* A warning will be thrown when an inactive plugin is attempted to be deactivated. - -Previously, the behavior was quite inconsistent — sometimes you'd get errors, sometimes silent success, etc. - -### What's coming in 2015 - -If I may editorialize a bit, I think 2015 could be an interesting year for WP-CLI. - -The [WP-API project](http://github.com/wp-api/wp-api) has more overlap than you may think. The task of building a RESTful API for WordPress is also a task of preparing a useful abstraction to interact with WordPress internals. Instead of directly calling `wp_update_post()`, the API uses `WP_JSON_Posts_Controller::update_item()`, which is a consistent interface with `WP_JSON_Terms_Controller::update_item()` and `WP_JSON_Users_Controller::update_item()`. - -Similarly, we too have had to invent our own pattern of abstraction for interacting with WordPress internals. It would be nice if we could drop much of our code, and leverage WP-API instead. And, what if `WP_JSON_Controller` was the pattern we adopted for listing, getting, creating, updating, or deleting any WordPress primitive, which means that plugins implementing it would automatically have WP-CLI commands? - -Plus, I'd think it would be quiet useful to have feature parity between what I can do locally with WP-CLI, and what I can do against a remote site via WP-API. - -### Other changes - -Enhancements: - -* Migrate users between sites in one go — `wp user import-csv ` supports CSV produced by `wp user list --format=csv > `. -* Use `wp user list --network` to list all users in your network. -* All subcommand help docs also include global parameters, to give those global parameters more visibility. -* If `--help` flag is passed, a command will now show the help screen instead of erroring on invalid parameters. Useful for debugging aforementioned errored parameters. -* Similar to `--skip-plugins=,`, the `--skip-themes` global parameter allows you to skip loading specific themes when using WP-CLI. If you run a hosting company, this can be a useful way to blacklist known problem themes when performing maintenance. -* `wp core language` improvements: Use `wp core language list --fields=language --status=active` to get the active language; install and activate a language with `wp core language install --activate`; active language can't be uninstalled. -* `wp (post|comment|term|user) get ` supports `--fields` parameter for getting specific fields. -* Use `wp post update ` to update a post's content from a ``. -* Activate all installed plugins at once with `wp plugin activate --all`. -* `wp plugin list` now indicates version numbers for mu plugins when they have properly formatted plugin headers. -* Added support for specifying any version for `wp plugin update ... --version=`. Previously, the parameter only supported 'dev'. -* `wp option update ` will supply a friendly message when the option is already set to the supplied value. -* Added alias from `wp theme uninstall` to `wp theme delete`, giving greater parity between theme and plugin interfaces. -* Adopted a Debian package build script. - -Bug fixes: - -* Resolved a nasty file cache collision between `wp core update` and `wp core download`. `WP_CLI\CoreUpgrader` was renaming ZIP files to `.tar.gz`, which `wp core download` would then attempt to use. -* If a file required by `wp-cli.yml` or `--require` is missing, WP-CLI will throw a human-friendly error instead of fataling. -* `wp cli info` runs early to protect from invalid runtime configurations. -* `wp core config` will only define WPLANG for WP < 4.0. -* `/bin/install-wp-tests.sh` fixes: Properly marked executable when scaffolding plugin unit tests; works on older versions of Bash; added support for `WP_CORE_DIR` environment variable. -* `wp comment (approve|unapprove)` will actually change comment status. -* `wp_is_mobile()` is defined, avoiding fatals in some themes and plugins. -* Windows fixes: disabled colors by default; allows deleting plugins that aren't in folders (e.g. Hello Dolly). -* Throws an error when trying to get meta on a missing object, instead of silently failing. -* Throws an error when trying to install multisite with subdomains when domain is `localhost`. -* Doesn't force update check on `wp plugin install` to reduce dependency on WordPress.org. - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.18.0+is%3Aclosed) on Github. - -Contributors to this release: [viper007bond](https://github.com/viper007bond), [boonebgorges](https://github.com/boonebgorges), [borekb](https://github.com/borekb), [bparbs](https://github.com/bradp), [danielbachhuber](https://github.com/danielbachhuber), [here](https://github.com/here), [miya0001](https://github.com/miya0001), [nyordanov](https://github.com/nyordanov), [oneumyvakin](https://github.com/oneumyvakin), [ozh](https://github.com/ozh), [pippinsplugins](https://github.com/pippinsplugins), [rodrigoprimo](https://github.com/rodrigoprimo), [spacedmonkey](https://github.com/spacedmonkey), [ntwb](https://github.com/ntwb), [lordspace](https://github.com/lordspace), [szepeviktor](https://github.com/szepeviktor), [tiagohillebrandt](https://github.com/tiagohillebrandt), [wturrell](https://github.com/wturrell) diff --git a/_posts/2015-04-25-version-0.19.0.md b/_posts/2015-04-25-version-0.19.0.md deleted file mode 100644 index d6f32c84..00000000 --- a/_posts/2015-04-25-version-0.19.0.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.19.0 released ---- - -2015 is an exciting time for WP-CLI. 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. - -### Plugin scaffolding - -`wp plugin scaffold` is a great way to get started on your next WordPress plugin. It automates many procedural steps you can easily forget to do, or need to copy and paste out of another plugin. v0.19.0 brings these improvements: - -* `bin/install-wp-tests.sh` will use either cURL or wget, depending on which is available. The script is also more fault tolerant. -* Use the `--dir=` argument to scaffold your new plugin to an arbitrary directory (e.g. mu-plugins or a theme folder). -* For custom projects, use the `--activate-network` flag to network activate the plugin after creation. -* Generates a Gruntfile with two helpful tasks: `grunt readme` to build a `README.md` from your `readme.txt`, and `grunt i18n` to create a `.pot` file. -* The default `.travis.yml` has increased maximum tested PHP version to 5.5, is more smart about the build matrix it generates, and changes notifications preferences to only email developers on build failures. - -### Other changes in v0.19.0 - -Enhancements: - -* `wp option list` lists all options, or searching for specific options based on a pattern. Use `--format=total_bytes` to get the total bytes for the matching options. -* Use `--all-tables` flag for `wp search-replace` to perform replacements against all tables in the database. In 0.17.0, we changed the behavior of `wp search-replace` to only affect tables registered to `$wpdb`. This new flag permits users to opt-in to all tables. -* When scaffolding a child theme, the parent theme's stylesheet is enqueued, instead of being loaded via `@import`. -* Added a `wp core language update` command to update language files. -* Added a `--dashicon` argument to `wp scaffold post-type` which will specify the icon for the post type. -* Added a `--sassify` argument to `wp scaffold _s` to download the SASS version of `_s`. -* MySQL binary commands execute with `--no-auto-rehash` for a substantial performance boost on larger databases. -* On export, taxonomy terms with missing parents are explicitly identified to make them easier to fix. -* When updating an option or post/user/comment meta and the supplied value is the same as the stored value, the success message indicates such. -* Added `--format=ids` to `wp post term list`. -* Added `--skip-delete` flag to `wp media regenerate`. This is helpful on sites where thumbnails might've been linked to within post content. Skipping deletion prevents breaking image references. -* Added `after_invoke` hook for any post-command execution tasks. -* Supports filtering by site value in `wp site list`. -* Added archive/unarchive, activate/deactivate and spam/not-spam subcommands to `wp site`. -* Added a summary table to output of `wp theme update` and `wp plugin update`. This makes it easier to parse the final results when you're updating a number of themes or plugins in one go. -* On multisite, user creation is run through `wpmu_validate_user_signup()` and `wpmu_create_user()`, which perform multisite-specific validation rules. -* The object cache is periodically cleared on import to prevent excess memory usage. -* Nightly builds are accompanied by checksums. - -Bug fixes: - -* Introduces `\WP_CLI\Utils\get_flag_value()` helper function to fix a systemic problem throughout WP-CLI. [Read through this issue](https://github.com/wp-cli/wp-cli/issues/1696) for the full details. -* Provides a human-friendly error when an invalid class is specified for a command. The prior behavior was to fatal error. -* Correctly sets `sslverify` argument when testing WP-Cron. -* Importer throws a hard error if process to import a file returns `WP_Error`. `create_author_mapping_file()` uses `WP_Error` to report that an author mapping file needs to be updated. However, when importing a directory of WXR files, the prior logic to use `WP_CLI::warning()` means the second file will use the author mapping file of the first, which should've been edited. -* Comment meta values are wrapped in CDATA tags on export. -* `wp core multisite-install` and `wp core multisite-convert` will properly include `define( 'WP_ALLOW_MULTISITE', true );` constant. -* https scheme is honored for the `--url` argument. -* `wp post term list` displays error for an invalid taxonomy. -* `WP_CLI::error()` respects `$exit` argument. -* Provides a human-friendly error when an incorrect version or locale was supplied for `wp core download` The prior behavior was to fatal error. -* `wp cron event schedule` respects the `` argument. -* Child themes aren't permitted to be activated without their parent installed. -* Themes are network enabled based on stylesheet value, not template. Previously, it wasn't possible to network-enable a child theme because of this bug. - - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.19.0+is%3Aclosed) on Github. - -Contributors to this release: [2ndkauboy](https://github.com/2ndkauboy), [acusti](https://github.com/acusti), [bobbywalters](https://github.com/bobbywalters), [bmackinney](https://github.com/bmackinney), [danielbachhuber](https://github.com/danielbachhuber), [francescolaffi](https://github.com/francescolaffi), [heiglandreas](https://github.com/heiglandreas), [hirozed](https://github.com/hirozed), [jeichorn](https://github.com/jeichorn), [johnbillion](https://github.com/johnbillion), [joshbetz](https://github.com/joshbetz), [jpry](https://github.com/jpry), [keeth](https://github.com/keeth), [mavin](https://github.com/mavin), [morganestes](https://github.com/morganestes), [mwithheld](https://github.com/mwithheld), [nyordanov](https://github.com/nyordanov), [rodrigoprimo](https://github.com/rodrigoprimo), [sebastiaandegeus](https://github.com/sebastiaandegeus), [szepeviktor](https://github.com/szepeviktor), [wrnx](https://github.com/wrnx), [yivi](https://github.com/yivi) diff --git a/_posts/2015-05-13-version-0.19.1.md b/_posts/2015-05-13-version-0.19.1.md deleted file mode 100644 index ce1166a6..00000000 --- a/_posts/2015-05-13-version-0.19.1.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.19.1 released ---- - -We shipped some improvements to `wp scaffold plugin-tests` in v0.19.0. Unfortunately, we also shipped some bugs. - -This release fixes those, so the tests actually execute after you've scaffolded a new plugin. This release also fixes an undefined notice when creating a new user. - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?milestone=30&page=1&state=closed) on Github. - -Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber), [JanVoracek](https://github.com/JanVoracek), [miya0001](https://github.com/miya0001) diff --git a/_posts/2015-06-20-version-0.19.2.md b/_posts/2015-06-20-version-0.19.2.md deleted file mode 100644 index 62ee0222..00000000 --- a/_posts/2015-06-20-version-0.19.2.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: post -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. - -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. - -Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) diff --git a/_posts/2015-08-26-version-0.20.0.md b/_posts/2015-08-26-version-0.20.0.md deleted file mode 100644 index ca759760..00000000 --- a/_posts/2015-08-26-version-0.20.0.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.20.0 released ---- - -Even though WP-CLI is a mature project, we still manage to pack a great set of improvements into each release. Here's what's coming to you in v0.20.0. - -### Regex, verbose search-replace - -Use the `--regex` flag to `wp search-replace` to... wait for it... use regex in your search and replace operations. And, with the `--verbose` flag, you'll see each column with affected rows as the operation is performed: - - $ wp post get 1 --field=title - Hello world - $ wp search-replace '(Hello)\s(world)' '$2, $1' --regex --verbose - ... - Checking: wp_posts.post_content - 0 rows affected - Checking: wp_posts.post_title - 1 rows affected - Checking: wp_posts.post_excerpt - 0 rows affected - ... - $ wp post get 1 --field=title - world, Hello - -Note: search-replace with `--regex` is 15-20x slower than without. Make sure you plan for the performance hit in your migration plans, and use wisely. - -### Major bug fix: cached partial upgrade files masquerading as full upgrades - -Since v0.17.0 ([pull request](https://github.com/wp-cli/wp-cli/pull/1320)), WP-CLI mistakenly cached partial archives in a lossy manner. More specifically, a ZIP file for a partial upgrade would be cached with the same key as a ZIP file for a full upgrade. With the file incorrectly cached, subsequent full upgrades would use the cached partial upgrade archive. - -If you can't immediately upgrade to v0.20.0, we've also released [v0.17.2](https://github.com/wp-cli/wp-cli/releases/tag/v0.17.2), [v0.18.1](https://github.com/wp-cli/wp-cli/releases/tag/v0.18.1), and [v0.19.3](https://github.com/wp-cli/wp-cli/releases/tag/v0.19.3) with the bug fix ([pull request](https://github.com/wp-cli/wp-cli/pull/1901)). The cache key was changed as well, so prior invalid WordPress archives are silently ignored. - -Use `wp core verify-checksums` to make sure a given WordPress install has the correct copy of each file. If it doesn't verify, use `wp core download --version=$(wp core version) --force` to re-install WordPress. - -### WP-API CLI - -We [released v0.19.0](https://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. - -Well... it was a bold declaration. Follow [danielbachhuber/wp-rest-cli](https://github.com/danielbachhuber/wp-rest-cli) for progress on the implementation. 1.0.0 will still likely be WP-CLI based on WP-API, but it'll take a fair bit of work to get there. - -### Helpful one-liners - -There were a couple issues opened for "how do I do X?", which you might find helpful too: - - # 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) - - -### Other changes in v0.20.0 - -Enhancements: - -* The `wp server` command is bundled with WP-CLI. Use PHP's built-in web server for a specific WordPress instance. -* Keep up with the latest and greatest by using `wp cli update --nightly`. When downloading a nightly, the hash is appended to the version. -* Added a simple `wp comment generate` command. -* Cache invalidation is deferred until the end of the command when using `wp term generate`. This improves performance of the command. -* `wp term list` supports filtering by `--term_id=`. -* Use `--start_id=` to start `wp export` from a given post ID, or use `--post_type=,` to export a selection of post types. -* Throws a helpful error when an invalid `--url=` is specified on multisite. Previously, WP-CLI would fail silently, leaving the user confused as to why their command wasn't running. -* Create a new role from another role with `wp role --clone=`. -* Use `--format=summary` to get one-liner messages with `wp (plugin|theme) update`. -* Switched away from using `wp_download_language_pack()` so languages can be installed with the `DISALLOW_FILE_MODS` constant set. - -Bug fixes: - -* `wp term generate` tries to generate unique term names on subsequent executions. Previously, it would start its index at `0`, and then error for duplicate terms. -* Internalized `wp_clean_update_cache()` (used in `wp core language list` and `wp core language update`) to prevent fatals in WordPress 4.0. The function was introduced in WordPress 4.1. -* When WordPress is detected, WP-CLI will wait until WordPress is fully loaded before executing `wp help`. This means plugins which add commands to an existing namespace can have theri help docs appear. -* Corrected Travis notification syntax produced by `wp scaffold plugin-tests` command. -* Supports `Requests` installed to parent project in `WP_CLI\Utils\http_request()` -* Passes thru `--allow-root` in `cli update` to let root update WP-CLI. -* Restored apt-get tab completion after using WP-CLI tab completion. -* Permits categories to be assigned with `wp post update`. -* Prevents `wp import` from using double the memory it actually needs, and save 100s of MBs on large imports. - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.20.0+is%3Aclosed) on Github. - -Contributors to this release: [boonebgorges](https://github.com/boonebgorges), [danielbachhuber](https://github.com/danielbachhuber), [janvoracek](https://github.com/janvoracek), [gedex](https://github.com/gedex), [johnbillion](https://github.com/johnbillion), [kdoole](https://github.com/kdoole), [marcaddeo](https://github.com/marcaddeo), [miya0001](https://github.com/miya0001), [montchr](https://github.com/montchr), [morganestes](https://github.com/morganestes), [rodrigoprimo](https://github.com/rodrigoprimo), [rmccue](https://github.com/rmccue), [scribu](https://github.com/scribu), [stevegrunwell](https://github.com/stevegrunwell), [szepeviktor](https://github.com/szepeviktor) diff --git a/_posts/2015-09-16-version-0.20.1.md b/_posts/2015-09-16-version-0.20.1.md deleted file mode 100644 index 5f0b4e56..00000000 --- a/_posts/2015-09-16-version-0.20.1.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.20.1 released ---- - -Curious as to why you're getting error messages in the theme update summary table? The bug, introduced in v0.20.0, is fixed in v0.20.1 - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.20.1) on Github. - -Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) diff --git a/_posts/2015-10-14-user-survey-2015.md b/_posts/2015-10-14-user-survey-2015.md deleted file mode 100644 index 7108f523..00000000 --- a/_posts/2015-10-14-user-survey-2015.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: WP-CLI and you, 2015 edition ---- - -We’d like to know how people are using WP-CLI so we set up a [quick survey](https://docs.google.com/forms/d/1SlT8vG9jDzLIwEUT944OFNL1lLMnjdL2GR1FMOQvtDk/viewform) (just 5 questions). We’d appreciate it if you would fill it out. The results will be posted here, in a future blog post. - -Thanks! diff --git a/_posts/2015-10-14-version-0.20.2.md b/_posts/2015-10-14-version-0.20.2.md deleted file mode 100644 index 0ea6b0be..00000000 --- a/_posts/2015-10-14-version-0.20.2.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.20.2 released ---- - -Since the beginning, `install-wp-tests.sh` (the setup script for plugin unit tests) has installed the WordPress testing framework from trunk. However, the WordPress project recently made changes to the testing framework which mean the trunk version is incompatible with older, tagged WordPress releases. - -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. - -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 deleted file mode 100644 index c568503c..00000000 --- a/_posts/2015-10-30-version-0.20.3.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: post -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. - -**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. - -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 deleted file mode 100644 index 342b1195..00000000 --- a/_posts/2015-11-04-version-0.21.0.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.21.0 released ---- - -It's been a pretty crazy week so far, and it's only Wednesday. - -As many of you are aware of, I launched a Kickstarter campaign Monday night: [A more RESTful WP-CLI](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli). Incredibly, it was 100% funded in just under 12 hours. Check out the link for more details on what I'll be working on in early 2016. - -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)). - -This important note may apply to you in some way -- please take action accordingly. - -WP-CLI v0.21.0 represents [109 resolved issues and pull requests](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.21.0+is%3Aclosed). Here's what's new. - -### Load WordPress with `WP_CLI::get_runner()->load_wordpress();` - -For a while now, you've been able to run a WP-CLI command before WordPress loads by adding `@when before_wp_load` to your command docs. Now, you can load WordPress that same command. - -See how `wp eval` makes use of `WP_CLI::get_runner()->load_wordpress()`: - - class Eval_Command extends WP_CLI_Command { - - /** - * Execute arbitrary PHP code. - * - * - * : The code to execute, as a string. - * - * [--skip-wordpress] - * : Execute code without loading WordPress. - * - * @when before_wp_load - * - * ## EXAMPLES - * - * wp eval 'echo WP_CONTENT_DIR;' - */ - public function __invoke( $args, $assoc_args ) { - if ( null === Utils\get_flag_value( $assoc_args, 'skip-wordpress' ) ) { - WP_CLI::get_runner()->load_wordpress(); - } - eval( $args[0] ); - } - } - -Use `wp eval --skip-wordpress ` to execute PHP without loading WordPress. Or, use `wp eval-file --skip-wordpress ` to, say, execute a quick and dirty script leveraging WP-CLI utilities without needing a WordPress install present. - -Similarly, when you specify a `--version=` with `wp core verify-checksums`, WP-CLI will check to ensure core files haven't been modified -- without loading WordPress. - -Creating this new feature was almost like replacing the engine on a moving car. - -### More verbosity with `--debug` - -When you supply the `--debug` flag, you'll get more context into how WP-CLI is executing your command. - -Before: - - $ wp option get home --debug - http://wordpress-test.dev - -After: - - $ wp option get home --debug - Debug: Using default global config: /home/vagrant/.wp-cli/config.yml (0.026s) - Debug: No project config found (0.027s) - Debug: Required file from config: /srv/www/wp-rest-cli/wp-rest-cli.php (0.059s) - Debug: ABSPATH defined: /srv/www/wordpress-test.dev/ (0.06s) - Debug: Begin WordPress load (0.063s) - Debug: wp-config.php path: /srv/www/wordpress-test.dev/wp-config.php (0.065s) - Debug: Set URL: wordpress-test.dev/ (0.066s) - Debug: Loaded WordPress (0.515s) - Debug: Running command: option get (0.516s) - http://wordpress-test.dev - -Make your own commands more helpful by including `WP_CLI::debug( $debug_message );` at key checkpoints. - -### Other changes in v0.21.0 - -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. -* 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. -* In `wp theme list`, indicates a parent theme by setting the `status=parent`. This more clearly distinguishes between a genuinely inactive theme vs. an "inactive" theme being used as a parent theme. -* Displays error message when trying to use `wp rewrite flush --hard` on a multisite install, because WordPress doesn't generate a `.htaccess` file for multisite installs. -* Permits `--path` for `wp core download`, even when WP is detected. This lets a custom WP-CLI command download WP to a subdirectory, when loaded from the scope of an existing WP install. -* Adds `--post_type__not_in` argument to `wp export`, which can now produce an export without, say, `feedbacks`. -* Permits space-delimited IDs for `wp export --post__in`. This makes it easier to pass IDs returned by `wp post list --format=ids`. -* Includes an `.editorconfig` when using `wp scaffold plugin`. -* Newly-generated `install-wp-tests.sh` files support `$WP_VERSION=trunk` or `$WP_VERSION=nightly` for running your plugin tests against WordPress trunk. -* Warns user when `wp-config.php` isn't writable for `wp core multisite-convert`. -* Provides a more helpful error message when an invalid subcommand has a valid parent command. -* Supports using WP-CLI on a WordPress instance backed by APC cache, but only after warning and requiring confirmation. -* Sniffs out the custom vendor path if WP-CLI is a part of a larger Composer project. -* Deprecates `wp post url` in favor of `wp post list --field=url`, but includes a backwards compatability shim for `wp post url`. -* Supports `--autoload=(yes|no)` when using `wp option update` (requires WordPress 4.2). -* Supports multiple comment ids for `wp comment (spam|trash|approve)`. -* Paginates help output on Windows using `more`. -* Provides human-friendly output when rewrite rules successfully flush. - -Bug fixes: - -* Generic arguments are no longer required for `wp post create` and `wp comment create`, allowing use of those commands without supplying, say, a title. -* Accepts associative args with no right-side data. -* Exhausts all possible options when looking for PHP binary with `wp cli update`. Previously, WP-CLI would try to call `php` directly, which would fail on systems where PHP wasn't exposed as such. -* Accommodates `wp_new_user_notification()`'s deprecated second argument, depending on WordPress version. - -You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.21.0+is%3Aclosed) on Github. - -Contributors to this release: [aaemnnosttv](https://github.com/aaemnnosttv), [borekb](https://github.com/borekb), [danielbachhuber](https://github.com/danielbachhuber), [gmcinnes](https://github.com/gmcinnes), [JRGould](https://github.com/JRGould), [johnbillion](https://github.com/johnbillion), [kraftbj](https://github.com/kraftbj), [miya0001](https://github.com/miya0001), [ntwb](https://github.com/ntwb), [rodrigoprimo](https://github.com/rodrigoprimo), [rmccue](https://github.com/rmccue) [szepeviktor](https://github.com/szepeviktor), [torounit](https://github.com/torounit), [voldemortensen](https://github.com/voldemortensen), [ypid](https://github.com/ypid) 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 deleted file mode 100644 index 0be51db5..00000000 --- a/_posts/2015-11-23-versions-0.21.1-and-0.20.4.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: post -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. - -**Importantly, due to the nature of these changes, WP-CLI versions prior to 0.20.4 will be incompatible with WordPress 4.4.** - -Inspect the nature of the change in [this pull request](https://github.com/wp-cli/wp-cli/pull/2218). - -Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) diff --git a/_posts/2015-12-01-survey-results-2015.md b/_posts/2015-12-01-survey-results-2015.md deleted file mode 100644 index 4d8b639f..00000000 --- a/_posts/2015-12-01-survey-results-2015.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: post -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. - -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. - -### By the numbers - -**85% of respondents use WP-CLI regularly** - -Of this 85%, 48% use WP-CLI multiple times per day. 37% use it a couple or few times per week. Only 15% of respondents use WP-CLI infrequently or rarely. - -94% of respondents use WP-CLI interactively at the command line, 66% have incorporated it into bash scripts, and 23% are using WP-CLI with Puppet, Chef, or another provisioning system. Other tools mentioned include: [Capistrano](http://capistranorb.com/), [Codeception](http://codeception.com/), [EasyEngine](https://easyengine.io/), [Fabric](http://www.fabfile.org/), [Grunt](http://gruntjs.com/), and [SaltStack](http://saltstack.com/). - -**Most users keep WP-CLI up to date** - -Over 70% of respondents keep WP-CLI up to date. Here's how the numbers break down: - -* 13% run the latest alpha. You can too with `wp cli update --nightly`. -* 58% use the latest stable release (v0.20.x at time of survey). -* 24% are using one or two versions below the latest stable. Only 5% use a very old version of WP-CLI. - -Good news — if you're writing custom commands, you can reasonably assume it's safe to use the latest features in WP-CLI. - -**WP-CLI is used for an increasing variety of tasks** - -Like last year, the survey included "What do you use WP-CLI for?" as a free-form field. To produce a statistical summary, I tagged each response with keywords. Of 170 interpreted values: - -* 38% (65) use WP-CLI for updating WordPress core, themes, or plugins. -* 22% (38) transform their database in some way using `wp search-replace`. -* 17% (29) rely upon WP-CLI when performing migrations. -* 15% (26) make use of WP-CLI's database management features: `wp db export`, `wp db import` and `wp db optimize`. -* 11% (18) depend upon WP-CLI in provisioning scripts. -* 10% (17) scaffold new themes and plugins with `wp scaffold`. -* 9% (16) write custom commands for their own needs. -* 6% (10) generate mock posts, users and comments. -* 3% (5) are hearty souls who use `wp shell`, `wp eval`, and `wp eval-file` for debugging and quick scripts. - -In no particular order, here are some third-party commands and workflows mentioned: [Jetpack CLI](https://jetpack.me/support/jetpack-cli/), [WP Parser](https://github.com/WordPress/phpdoc-parser), [ElasticPress](https://github.com/10up/ElasticPress), [WP Migrate DB Pro](https://deliciousbrains.com/wp-migrate-db-pro/doc/cli-addon/), [WP CFM](http://forumone.github.io/wp-cfm/), [BackWPUp](https://github.com/inpsyde/backwpup), [wp-cli-ssh](https://github.com/xwp/wp-cli-ssh), [wp-instant-setup](https://github.com/miya0001/wp-instant-setup), [project-template-wordpress](https://github.com/QoboLtd/project-template-wordpress), and [provisioning a new WordPress.org Theme Review environment](http://th-daily.shinichi.me/2014/10/27/memo-wp-cli-commands-for-the-theme-reviewers/). - -One person said they use WP-CLI to make coffee. On behalf of everyone, I look forward to the day I can install this command from the [package directory](https://github.com/wp-cli/wp-cli/issues/1564). - -### Feature requests - -Feel like contributing to WP-CLI over the holidays? Here's a grab bag of enhancements you could work on: - -* Better documentation (internals, extending, common workflows). -* One single uber-command to install WordPress, including downloading files, creating the MySQL database, setting up wp-config.php, and populating database tables. -* Suggest correct syntax when a command is incorrectly entered (e.g. `git staus`). -* Improved support for managing multiple networks: `wp network list`, `wp network create`. -* Install plugins favorited by a given WordPress.org user. -* Verify theme and plugin checksums. -* Report when extra files are present in wp-admin or wp-includes (e.g. checksums of directories) -* Save a template of a WordPress setup (similar to `grunt {my-task}`). -* Disable all plugins except for a specific one. Or, load WP-CLI with only a given plugin active. -* Install WordPress nightly builds without needing the beta plugin. -* Provide a command to execute WP-Cron without requiring a HTTP request. -* Define custom scaffolds for themes and plugins. -* Generate posts, pages from a sitemap CSV. -* Magically migrate data between environments (production -> staging). -* 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. - -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 deleted file mode 100644 index 1f913b24..00000000 --- a/_posts/2016-01-07-version-0.22.0.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.22.0 released ---- - -Happy 2016! I thought you might enjoy a new WP-CLI release before I dive into the RESTful CLI project. - -Use `wp cli update` to install v0.22.0, representing [137 resolved issues and pull requests](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.22.0+is%3Aclosed). Here's what's new. - -### search-replace for love and profit - -Last month, [Pantheon](https://pantheon.io/) generously sponsored 15 hours of my time to address some of the long-standing bugs in the backlog, and make a few substantial enhancements too. - -Let's start with the good stuff: - -* Performance boost! Instead of running a MYSQL LIKE statement every 1000 rows, WP-CLI now just runs it once [[#2304](https://github.com/wp-cli/wp-cli/pull/2304)]. On a post meta table of ~3.5 million rows where 75,610 rows were affected, this change improved execution time from 734.926s to 225.509s (3.3x faster). -* Use the `--export=` argument to create a SQL file of your transformed data, instead of making updates to the database [[#2254](https://github.com/wp-cli/wp-cli/pull/2254)]. This is a helpful feature when you want to prepare a database for a new environment without having to import and then run search-replace. -* Wildcards can be used in table names [[#2233](https://github.com/wp-cli/wp-cli/pull/2233)]. search-replace against just meta tables with `wp search-replace '*meta*'`. Note: the pattern needs to be quoted, as `*` is a special character in Bash. - -I also landed a number of search-replace bug fixes and minor enhancements: - -* Recurses objects by default when replacing inside of serialized data [[#2222](https://github.com/wp-cli/wp-cli/pull/2222)]. Among other things, this ensures theme mods are transformed as expected. You can disable the behavior with `--no-recurse-objects`. But, if you do disable the behavior, I'd like to hear from you. I think this is an unnecessary option we could remove at a later date. -* Properly escapes quotes used in search or replace strings [[#2230](https://github.com/wp-cli/wp-cli/pull/2230)]. -* Lets users know to flush their persistent object cache after a search-replace procedure is performed [[#2236](https://github.com/wp-cli/wp-cli/pull/2236)]. -* Bails early when the replacement string is the same as the search string [[#2235](https://github.com/wp-cli/wp-cli/pull/2235)]. -* Indicates execution time when running search/replace with `--verbose` [[#2242](https://github.com/wp-cli/wp-cli/pull/2242)]. -* Prevents unnecessary calls to `$wpdb->update()` when there are no replacements to be made [[#2245](https://github.com/wp-cli/wp-cli/pull/2245)]. -* Drops unnecessary `REGEXP` query when in regex mode [[#2305](https://github.com/wp-cli/wp-cli/pull/2305)]. - -### Changes to supported versions - -WP-CLI's minimum supported WordPress version is now 3.7 [[#2261](https://github.com/wp-cli/wp-cli/pull/2261)]. - -We also officially support PHP 7 [[#2330](https://github.com/wp-cli/wp-cli/pull/2330)]. - -### Everything else in v0.22.0 - -Improvements to `wp scaffold (plugin|plugin-tests)`: - -* Makes Travis less noisy by only sending email notifications on the initial build failure for a branch [[#2194](https://github.com/wp-cli/wp-cli/pull/2194)]. -* Plugin header follows WordPress' PHPDoc standards [[#2197](https://github.com/wp-cli/wp-cli/pull/2197)]. -* Adds `.dist` extension to PHPUnit config file to permit overriding with a local config file [[#2247](https://github.com/wp-cli/wp-cli/pull/2247)] -* Parses `readme.txt` to find WordPress versions to use as Travis tested versions [[#2255](https://github.com/wp-cli/wp-cli/pull/2255)]. -* Includes a default `.gitignore` [[#2297](https://github.com/wp-cli/wp-cli/pull/2297)]. - -New flags for existing commands: - -* `wp core update --minor` to only perform minor updates [[#2256](https://github.com/wp-cli/wp-cli/pull/2256)]. -* `wp (post|comment|user) meta delete --all` to delete all meta values on a given object [[#2265](https://github.com/wp-cli/wp-cli/pull/2265)]. -* `wp core update-db --dry-run` to see whether a database needs an upgrade [[#2293](https://github.com/wp-cli/wp-cli/pull/2293)]. -* `wp media regenerate --only-missing` for faster performance on sites with lots of images where only a small number are missing sizes [[#2292](https://github.com/wp-cli/wp-cli/pull/2292)]. -* `wp cron event run --all` to execute all registered cron events [[#2323](https://github.com/wp-cli/wp-cli/pull/2323)]. -* `wp site empty --uploads` to empty a site and delete its uploads directory too [[#2339](https://github.com/wp-cli/wp-cli/pull/2339)]. -* `wp core install --skip-email` to install without email notifications [[#2345](https://github.com/wp-cli/wp-cli/pull/2345)]. -* `wp transient (get|set|delete) --network` to manage site transients [[#2351](https://github.com/wp-cli/wp-cli/pull/2351)]. - -Framework enhancements: - -* Introduces `wp_version_compare()` when comparing WordPress versions [[#2237](https://github.com/wp-cli/wp-cli/pull/2237)]. SVN and Git tags include `-src` in `$wp_version`, which -`version_compare()` doesn't like. -* Defers to the `$PAGER` environment variable when set [[#2264](https://github.com/wp-cli/wp-cli/pull/2264)]. -* Introduces a `composer.lock` file to the project, to fix dependencies to specific hashes [[#2280](https://github.com/wp-cli/wp-cli/pull/2280)]. -* Magically globalizes any new variables defined in wp-config.php, as they're expected to be global [[#2318](https://github.com/wp-cli/wp-cli/pull/2318)]. -* If a `--require=` is missing, specifies the context of where the missing file is referenced for easier debugging [[#2336](https://github.com/wp-cli/wp-cli/pull/2336)]. -* Use `mustangostang/spyc` instead of bundling our own copy [[#2350](https://github.com/wp-cli/wp-cli/pull/2350)]. The `Spyc` class is still available in the global namespace. -* Introduces `WP_CLI\Utils\get_temp_dir()` for safer temp directories [[#2353](https://github.com/wp-cli/wp-cli/pull/2353)]. - -Improvements to other commands: - -* Includes `not_found` label when scaffolding a custom taxonomy [[#2196](https://github.com/wp-cli/wp-cli/pull/2196)]. -* Permits installing remote plugin files without `.zip` in filename [[#2193](https://github.com/wp-cli/wp-cli/pull/2193)]. -* Warns when adding a user as a super admin when the user is already a super admin [[#2202](https://github.com/wp-cli/wp-cli/pull/2202)]. -* Uses `WP_CLI::log()` instead of `WP_CLI::line()` in `wp import`, so `--quiet` flag is respected [[#2234](https://github.com/wp-cli/wp-cli/pull/2234)]. -* Adds support to `wp db tables` for wildcard tables (e.g. `*meta*`), `--all-tables-with-prefix`, and `--format=csv` [[#2250](https://github.com/wp-cli/wp-cli/pull/2250)]. -* Improves error message when installing a plugin or theme and the resource isn't found [[#2253](https://github.com/wp-cli/wp-cli/pull/2253),[#2267](https://github.com/wp-cli/wp-cli/pull/2267)]. -* Supports custom `wp export` filename formats with `--filename_format=` [[#2230](https://github.com/wp-cli/wp-cli/pull/2300)] -* Assumes db errors during `wp install` to be installation failures, and reports accordingly [[#2337](https://github.com/wp-cli/wp-cli/pull/2337)]. -* Exposes plugin header details at runtime for `wp scaffold plugin` [[#2338](https://github.com/wp-cli/wp-cli/pull/2338)]. -* Includes `ci/behat-tags.php` in `wp scaffold package-tests` [[#2342](https://github.com/wp-cli/wp-cli/pull/2342)]. - -Bug fixes across the board: - -* Lets `help` run early when WP is detected, but not installed (e.g. `wp core config --help`) [[#2190](https://github.com/wp-cli/wp-cli/pull/2190)]. Bug was introduced in v0.20.0. -* When scaffolding a child theme, creates a safe version of the parent theme slug for the child enqueue function [[#2203](https://github.com/wp-cli/wp-cli/pull/2203)]. Previously, if the parent slug included dashes, an invalid enqueue function would be scaffolded. -* Suppresses error notices when looking for `wp-config.php` and PHP's `open_basedir` is in effect [[#2211](https://github.com/wp-cli/wp-cli/pull/2211)]. -* Fixes error notice in `WP_CLI\Loggers\Quiet` [[#2210](https://github.com/wp-cli/wp-cli/pull/2210)]. -* Fixes `all_items` label in custom post type scaffolding [[#2213](https://github.com/wp-cli/wp-cli/pull/2213)]. -* Ensures `install-package-tests.sh` actually downloads the nightly WP-CLI Phar build, and not a redirect [[#2214](https://github.com/wp-cli/wp-cli/pull/2214)]. -* Sets the `upload_space_check_disabled` to `1` when installing multisite [[#2238](https://github.com/wp-cli/wp-cli/pull/2238)]. This mirrors core's behavior on new installs. -* Provides a more helpful message when image regeneration fails [[#2239](https://github.com/wp-cli/wp-cli/pull/2239)]. -* Properly updates menu sub-item parent when parent is deleted [[#2262](https://github.com/wp-cli/wp-cli/pull/2262)]. -* Stops prefixing rewrite rules with `index.php` when using `wp rewrite structure` [[#2279](https://github.com/wp-cli/wp-cli/pull/2279)]. -* Fixes typo in `wp transient set` synopsis [[#2282](https://github.com/wp-cli/wp-cli/pull/2282)]. -* Restores `wp core verify-checksums` for non-US English locales [[#2287](https://github.com/wp-cli/wp-cli/pull/2287)]. Bug was introduced in v0.21.0. -* Switches to the readline library, when available, for better support of arrow keys using `--prompt` [[#2325](https://github.com/wp-cli/wp-cli/pull/2325)]. -* `WP_CLI\Formatter` properly checks for null values on objects [[#2322](https://github.com/wp-cli/wp-cli/pull/2322)]. -* In `wp media import`, uses host instead of scheme to determine whether a file is remote or local, for Windows compatibility [[#2324](https://github.com/wp-cli/wp-cli/pull/2324)]. -* Ensures updating a plugin with an invalid `--version=` specified doesn't delete the plugin [[#2346](https://github.com/wp-cli/wp-cli/pull/2346)]. - -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. diff --git a/_posts/2016-01-12-restful-wp-cli-update-1.md b/_posts/2016-01-12-restful-wp-cli-update-1.md deleted file mode 100644 index 84077027..00000000 --- a/_posts/2016-01-12-restful-wp-cli-update-1.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: RESTful WP-CLI - The journey begins ---- - -And so the journey begins. As with most journeys, I have a mixture of emotions: excitement, anticipation, trepidation, and eagerness. Although the destination may be far away, I know I can get there as long as I consistently take steps in the right direction. - -Today marks the formal kickoff of my Kickstarter project, "[A more RESTFul WP-CLI](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli/description)". To celebrate the occasion, I've [launched a project page](/restful/) to capture high-level goals and document my progress along the journey. I'll keep it updated as I write blog posts every couple or few weeks. Consider these blog posts both a development log and an invitation to participate — I look forward to your comments, issues and pull requests. - -*** - -For the past month or so, the question at the top of my mind has been: what does it mean to "unlock the potential of the WP REST API at the command line"? Or, even more broadly, why do this project? - -These are big questions, and I consider myself fortunate to be able to explore them over the next six months or so. Here's how I've unpacked them so far, in a series of loosely connected ideas: - -* WP-CLI's goal is to be, quantitatively, the *fastest* interface for developers to manage WordPress. For anything you want to do with WordPress, using WP-CLI should save you multitudes of time over doing it some other way. -* WP-CLI and WP REST API both offer CRUD interfaces to WordPress resources. `wp post list` is more or less `GET /wp/v2/posts`. But, `wp widget list` doesn't yet have an equivalent in WP REST API. We still have a ton of work to do. -* Building the WP REST API has been, and will continue to be, an exercise of modeling how WordPress works to a consistent (RESTful) interface. Furthermore, this model is declared in a common language for clients to interpret. -* At some point in the future, WP-CLI will be able to ditch a substantial amount of its internals when it can use the WP REST API as its interface to WordPress. WP-CLI can continue to serve as the fastest way for developers to manage WordPress, offering higher-level meta operations like `generate`, `(push|pull)`, and `clone` in addition to being a seamless command line interface to WordPress internals. -* As WordPress developers write new endpoints for the WP REST API, it will be quite powerful to have those endpoints instantly accessible through the command line, and as accessible as core resources. For instance, where WP-CLI currently has the `wp post *` commands, WP-CLI requires Easy Digital Downloads to produce its own `wp edd *` commands. -* It appears to be supremely possible to deliver this project as a series of improvements to WP-CLI, shipped over one or more versions in the next couple of quarters. - -Lots of threads to pull on. - -*** - -I'm starting development by working towards making `wp tag list` work interchangably with local and remote sites. Doing so already raises a few issues: - -* WP-CLI needs to be easier to register commands on the fly. In my prototype, I had to `eval()` a [dynamically generated class](https://github.com/danielbachhuber/wp-rest-cli/commit/f5ec393632fe841aaaecfc664c419ed1bdbcc566#diff-6bd9ca08588aaa4472208db14aae6750R112). It would be much nicer to be able to [register an arbitrary function, closure, or method](https://github.com/wp-cli/wp-cli/issues/2204) as a WP-CLI command. -* When we register REST endpoints to WP-CLI on the fly, there's the potential for them to conflict with existing commands. Furthermore, the endpoints will vary from site to site. Ideally, the commands you see should represent the commands available on the target site. I think [site aliases](https://github.com/wp-cli/wp-cli/issues/2039) may offer us a backwards-compatible implementation; for instance, specifying an alias like `wp @prod` would only expose commands available on production. -* Remote calls will need authentication. Ideally, it should be possible to authenticate once through a supported protocol (basic, oAuth1, API key, etc.), and store these authentication details somewhere on the file server. This is potential rationale for a [config management command](https://github.com/wp-cli/wp-cli/issues/515). If you aren't blocking web requests to `wp-cli.yml` and `wp-cli.local.yml` already, you should be. - -*** - -This project is made possible thanks to the backing of many generous organizations and individuals. Thank you again for supporting me on this journey. - -### Platinum - - - - - - - - - - -
- -
- Pressed offers white-label, fully managed, WordPress hosting, built on Amazon’s cloud infrastructure. Launch your own managed WordPress hosting brand and let us handle all the maintenance, updates, customer support and billing while building a new recurring revenue stream for your business. -
- -### Gold - - - - - - - - - - - - - - -
Chris Lema is the CTO & Chief Strategist at Crowd Favorite. He’s also a WordPress evangelist, public speaker & advisor to product companies.Human Made is a leading WordPress Development, Hosting and Consultancy Firm with a global team covering Europe, The USA, and Asia/Australia.
- - - - - - - - - - - - - - -
Pagely® is the World’s first and most scalable WordPress Hosting platform: We help the biggest brands scale and secure WordPress.Pantheon is a website management platform used to build, launch, and run awesome Drupal & WordPress websites.
- -### Silver - - - - - - - - - - - - - - - - - - - -
- -### Individual - -Aaron Jorbin, Aki Björklund, Anu Gupta, Bjørn Ensover Johansen, Brian Krogsgard, Bronson Quick, Chuck Reynolds, Corey McKrill, Daniel Hüsken, Dave McDonald, Dave Wardle, Eli Silverman, Felix Arntz, Howard Jacobson, Japh Thomson, Jason Resnick, Jeremy Felt, Justin Kopepasah, Kailey Lampert, Kevin Cristiano, Max Cutler, Mike Little, Mike Waggoner, Nate Wright, Pippin Williamson, Quasel, Ralf Hortt, Richard Aber, Richard Wiggins, Ryan Duff, Scott Kingsley Clark, Shinichi Nishikawa, Sven Hofmann, Takayuki Miyauchi, Tom McFarlin, rtCamp - -*** - -Let's go! diff --git a/_posts/2016-02-04-restful-wp-cli-update-2.md b/_posts/2016-02-04-restful-wp-cli-update-2.md deleted file mode 100644 index 0c331103..00000000 --- a/_posts/2016-02-04-restful-wp-cli-update-2.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: RESTful WP-CLI - No rest for the weary ---- - -Like my title? Get the pun? Te he he. - -I'm just back from [A Day of REST](https://feelingrestful.com/), where I spoke about [a more RESTful WP-CLI](/restful/), and unlocking the potential of the WP REST API at the command line. It was probably the best talk I've ever done. You can [check out my annotated slides](http://blog.handbuilt.co/2016/01/28/feelingrestful-a-more-restful-wp-cli/) if you haven't already. - -The talk covered the progress I've already made, and the hypotheticals on my mind every day when I go for a swim. - -### wp-rest-cli v0.1.0 - -Today marks v0.1.0 for [wp-rest-cli](https://github.com/danielbachhuber/wp-rest-cli). This initial release makes WP REST API endpoints available as WP-CLI commands. It does so by: - -* Auto-discovering endpoints from any WordPress site running WordPress 4.4 or higher. -* Registering WP-CLI commands for the endpoints it understands. - -**Warning:** This project is at a very early stage. Treat it as an experiment, and understand that breaking changes will be made without warning. The sky may also fall on your head. - -Here's how it works: - - $ wp rest - usage: wp rest attachment - or: wp rest category - or: wp rest comment - or: wp rest meta - or: wp rest page - or: wp rest pages-revision - or: wp rest post - or: wp rest posts-revision - or: wp rest status - or: wp rest tag - or: wp rest taxonomy - or: wp rest type - or: wp rest user - - $ wp --http=demo.wp-api.org rest tag get 65 --format=json - { - "id": 65, - "link": "http://demo.wp-api.org/tag/dolor-in-sunt-placeat-molestiae-ipsam/", - "name": "Dolor in sunt placeat molestiae ipsam", - "slug": "dolor-in-sunt-placeat-molestiae-ipsam", - "taxonomy": "post_tag" - } - -Notice how you can use `--http=` to interact with a remote WordPress site. `--http=` must be supplied as the second argument to be used. Without it, wp-rest-cli will look for endpoints of a WordPress site in a directory specified by `--path=` (or the current directory, if `--path= 'List callbacks registered to a given action or filter.', - 'synopsis' => array( - array( - 'name' => 'hook', - 'type' => 'positional', - 'description' => 'The key for the action or filter.', - ), - array( - 'name' => 'format', - 'type' => 'assoc', - 'description' => 'List callbacks as a table, JSON, or CSV. Default: table.', - 'optional' => true, - ), - ), - ) ); - -Then, when you run `wp hook init`, you'll see: - - $ wp hook init - +---------------------------------+----------+---------------+ - | function | priority | accepted_args | - +---------------------------------+----------+---------------+ - | create_initial_post_types | 0 | 1 | - | create_initial_taxonomies | 0 | 1 | - | wp_widgets_init | 1 | 1 | - | smilies_init | 5 | 1 | - | wp_cron | 10 | 1 | - | _show_post_preview | 10 | 1 | - | rest_api_init | 10 | 1 | - | kses_init | 10 | 1 | - | wp_schedule_update_checks | 10 | 1 | - | ms_subdomain_constants | 10 | 1 | - | maybe_add_existing_user_to_blog | 10 | 1 | - | check_theme_switched | 99 | 1 | - +---------------------------------+----------+---------------+ - -Want to use this command locally? Update to the nightly, and then run `wp package install danielbachhuber/wp-hook-command`. - -### What's next - -Well... I've spent a ton of hours over the last month on the WP REST API. 67.03 hours of 83 budgeted, to be precise. Given there doesn't yet seem to be an end in sight, I may reallocate ~30 hours or so out of the WP-CLI budget for continued involvement with the WP REST API. But, I do need to slow down the pace of my involvement a bit, because it's not sustainable. - -On the wp-rest-cli front, the product problems at the top of my mind are authentication and aliases. - -Instead of: - - wp --http=demo.wp-api.org --user=daniel:daniel rest tag create - -I'd much prefer: - - wp @wpapi tag create - -In the example preceding, `@wpapi` is an alias for both the target and authentication. - -In this hypothetical universe, aliases would also be injected into the WP-CLI runtime: - - $ wp @wpapi - usage: wp @wpapi attachment - or: wp @wpapi category - or: wp @wpapi comment - or: wp @wpapi meta - or: wp @wpapi page - or: wp @wpapi pages-revision - or: wp @wpapi post - or: wp @wpapi posts-revision - or: wp @wpapi status - or: wp @wpapi tag - or: wp @wpapi taxonomy - or: wp @wpapi type - or: wp @wpapi user - -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). diff --git a/_posts/2016-03-22-version-0.23.0.md b/_posts/2016-03-22-version-0.23.0.md deleted file mode 100644 index 7bcf7522..00000000 --- a/_posts/2016-03-22-version-0.23.0.md +++ /dev/null @@ -1,223 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.23.0 released ---- - -It's hard to believe the last WP-CLI release was only two months ago because this is the longest release post I've ever written. My apologies in advance. - -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. - -Now that I've given away all of the surprises, let's get on with the release post. - -Oh darn, I forgot two more things: - -* For those using the Phar file, which should be most of you, WP-CLI now automatically checks for updates, and will prompt you to update as applicable. It even works for those using the nightly build. This behavior is configurable, see below. -* I've settled on [runcommand](http://runcommand.io/) as the name for my new WP-CLI venture. [Sign up for email updates](http://runcommand.io/) on the website, or follow [@runcommand](https://twitter.com/runcommand) on Twitter. - -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. - -**Importantly, due to the nature of these changes, WP-CLI versions prior to 0.23.0 will be incompatible with WordPress 4.5.** - -Inspect the nature of the change in [this pull request](https://github.com/wp-cli/wp-cli/pull/2486). - -Want to help fix this? Refill your cup of coffee and dive into [#34936](https://core.trac.wordpress.org/ticket/34936) on WordPress Trac. - -### Install community commands from the Package Index - -Consider the following situation ([#2523](https://github.com/wp-cli/wp-cli/issues/2523)): - -> Using the `theme list` command without `--url` parameter shows if a theme is enabled for the network and active in the default site. - -> If you pass the `--url` of a site of the network, this command shows if a theme is active in that site. - -> But I can't find a way to list which themes are inactive in every site of the network so I can safely disable and delete them, and i'd love to have this feature - -If you had to complete this task using the WordPress network admin, it would take you hours, if not days. Simply _writing_ the WP-CLI command for this issue took me only 3 minutes ([runcommand/find-unused-themes](https://github.com/runcommand/find-unused-themes)). WP-CLI is genuinely the fastest interface to manage WordPress. - -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/)): - - $ wp package install runcommand/find-unused-themes - Installing runcommand/find-unused-themes (dev-master) - Updating /home/vagrant/.wp-cli/packages/composer.json to require the package... - Using Composer to install the package... - --- - Loading composer repositories with package information - Updating dependencies - Analyzed 2223 packages to resolve dependencies - Analyzed 29243 rules to resolve dependencies - - Installing package - Writing lock file - Generating autoload files - --- - Success: Package installed successfully. - $ wp find-unused-themes - Checking http://wordpress-develop.dev/ for unused themes... - Checking http://wordpress-develop.dev/foo/ for unused themes... - +----------------+---------+ - | name | version | - +----------------+---------+ - | default | 1.7.2 | - | mystore | 1.0.6 | - | p2 | 1.5.5 | - | twentyeleven | 2.3 | - | twentyfourteen | 1.6 | - | twentyten | 2.1 | - | twentythirteen | 1.8 | - | twentytwelve | 1.9 | - +----------------+---------+ - -Pretty cool, huh? Consider WP-CLI's package management to be a beta feature at this time. You may run into [one of the open issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3Acommand%3Apackage), or find a bug that hasn't been reported yet. If you're keen to take a deep dive into Composer's internals, helping to improve `wp package` would be a great way to start. - -Relevant pull requests for `wp package` include [#2442](https://github.com/wp-cli/wp-cli/pull/2442), [#2460](https://github.com/wp-cli/wp-cli/pull/2460), [#2491](https://github.com/wp-cli/wp-cli/pull/2491), [#2512](https://github.com/wp-cli/wp-cli/pull/2512), [#2514](https://github.com/wp-cli/wp-cli/pull/2514), [#2533](https://github.com/wp-cli/wp-cli/pull/2533), [#2534](https://github.com/wp-cli/wp-cli/pull/2534), [#2537](https://github.com/wp-cli/wp-cli/pull/2537), [#2540](https://github.com/wp-cli/wp-cli/pull/2540), [#2543](https://github.com/wp-cli/wp-cli/pull/2543), [#2546](https://github.com/wp-cli/wp-cli/pull/2546), [#2547](https://github.com/wp-cli/wp-cli/pull/2547), [#2555](https://github.com/wp-cli/wp-cli/pull/2555), [#2561](https://github.com/wp-cli/wp-cli/pull/2561) - -### Register more commands - -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)): - - /** - * Reset passwords for one or more WordPress users. - * - * ... - * : Specify one or more user logins or IDs. - */ - $reset_password_command = function( $args ) { - $fetcher = new \WP_CLI\Fetchers\User; - $users = $fetcher->get_many( $args ); - foreach( $users as $user ) { - wp_update_user( array( 'ID' => $user->ID, 'user_pass' => wp_generate_password() ) ); - WP_CLI::log( "Reset password for {$user->user_login}." ); - } - WP_CLI::success( 'Passwords reset.' ); - }; - WP_CLI::add_command( 'user reset-passwords', $reset_password_command ); - -Want to reuse argument definition between commands? You can now register command synopsis as the third argument to `WP_CLI::add_command()` ([runcommand/hook](https://github.com/runcommand/hook)): - - WP_CLI::add_command( 'hook', $hook_command, array( - 'shortdesc' => 'List callbacks registered to a given action or filter.', - 'synopsis' => array( - array( - 'name' => 'hook', - 'type' => 'positional', - 'description' => 'The key for the action or filter.', - ), - array( - 'name' => 'format', - 'type' => 'assoc', - 'description' => 'List callbacks as a table, JSON, or CSV.', - 'optional' => true, - 'options' => array( 'table', 'json', 'csv' ), - 'default' => 'table', - ), - ), - ) ); - -Note the `default` argument attribute for `format`. WP-CLI accepts `default` and `options` as a part of argument registration to make it easier to process user input within your command. These attributes can be also defined in the callable's PHPDoc: - - /** - * List callbacks registered to a given action or filter. - * - * - * : The key for the action or filter. - * - * [--format=] - * : List callbacks as a table, JSON or CSV. - * --- - * options: - * - table - * - json - * - csv - * default: table - * --- - */ - $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). - -### 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. -* 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). - -### Automatic update checks - -For those using WP-CLI as a Phar file, which should be most of you, version 0.23.0 and later will automatically check for updates. If an update is found, you'll be prompted to install it. - -Automatic update checks even work for those using the nightly build! Use `wp cli update --nightly` to get back on the nightly track after each major release. - -By default, the automatic update check will run once a day for users with a _writable_ WP-CLI Phar file. Distribution file or directory not writable? Then the check won't run. Automatic update checks are triggered when a user, not a script, runs `wp help `. This frequency can be configured with the `WP_CLI_AUTO_CHECK_UPDATE_DAYS` environment variable, or disabled entirely with the `WP_CLI_DISABLE_AUTO_CHECK_UPDATE` environment variable. - -Relevant pull requests for this feature includes [#2536](https://github.com/wp-cli/wp-cli/pull/2536) and [#2538](https://github.com/wp-cli/wp-cli/pull/2538). - -### Everything else in 0.23.0 - -Command improvements: - -* Better performance for `wp (user|post) list --format=count` by only fetching the data we need [[#2370](https://github.com/wp-cli/wp-cli/pull/2370), [#2387](https://github.com/wp-cli/wp-cli/pull/2387)]. -* Prevents dupe builds with Travis default settings in `wp scaffold plugin-tests` [[#2377](https://github.com/wp-cli/wp-cli/pull/2377)]. -* Generate comments for a specific post with `wp comment generate --post_id=` [[#2388](https://github.com/wp-cli/wp-cli/pull/2388)]. -* Cleans up files from the prior version when using `wp core (update|download) --force` [[#2382](https://github.com/wp-cli/wp-cli/pull/2382), [#2406](https://github.com/wp-cli/wp-cli/pull/2406), [#2413](https://github.com/wp-cli/wp-cli/pull/2413), [#2432](https://github.com/wp-cli/wp-cli/pull/2432)]. -* Adds a timer to individual events in `wp cron event run` [[#2437](https://github.com/wp-cli/wp-cli/pull/2437)]. -* Introduces `wp term meta` for managing term meta [[#2444](https://github.com/wp-cli/wp-cli/pull/2444)]. -* Adds CSV and JSON output format to `wp (theme|plugin) update` [[#2452](https://github.com/wp-cli/wp-cli/pull/2452)]. -* Verifies MD5 hash of downloaded archive file with `wp core download` [[#2461](https://github.com/wp-cli/wp-cli/pull/2461)] -* Entirely avoids loading WordPress in `wp core verify-checksums` [[#2459](https://github.com/wp-cli/wp-cli/pull/2459)]. -* Supports emptying term meta with `wp site empty` [[#2506](https://github.com/wp-cli/wp-cli/pull/2506)]. -* Adds WP REST API registration args to `scaffold (post-type|taxonomy)` [[#2551](https://github.com/wp-cli/wp-cli/pull/2551)]. -* Adds documentation to `test-sample.php` and `bootstrap.php` when running `wp scaffold plugin-tests` [[#2577](https://github.com/wp-cli/wp-cli/pull/2577), [#2578](https://github.com/wp-cli/wp-cli/pull/2578)]. - -Framework enhancements: - -* Switches `WP_CLI::confirm()` to automatically lowercase the response, permitting use of `Y` or `y` [[#2366](https://github.com/wp-cli/wp-cli/pull/2366)]. -* Adds `(before|after)_wp(_config)_load` hooks in WP load process, permitting code injected via `--require` to make modifications during the bootstrap process [[#2375](https://github.com/wp-cli/wp-cli/pull/2375)]. -* Adds `.editorconfig` to project root based on WordPress Coding Standards [[#2395](https://github.com/wp-cli/wp-cli/pull/2395)]. -* Encodes `WP_Error` data as JSON in `WP_CLI::error_to_string()` so that the data is actually human-readable [[#2397](https://github.com/wp-cli/wp-cli/pull/2397)]. -* Supports custom exit codes in `WP_CLI::error()` [[#2440](https://github.com/wp-cli/wp-cli/pull/2440)]. -* Introduces `--format=yaml` for easily displaying data as YAML [[#2453](https://github.com/wp-cli/wp-cli/pull/2453)]. -* Supports config deep merging and inheritance [[#2496](https://github.com/wp-cli/wp-cli/pull/2496)]. -* Updates Composer dependencies [[#2554](https://github.com/wp-cli/wp-cli/pull/2554)] - -Bug fixes across the board: - -* In `bin/install-wp-tests.sh`, don't cd in `WP_TESTS_DIR` before dowloading and setting up `wp-tests-config.php` [[#2371](https://github.com/wp-cli/wp-cli/pull/2371)]. -* When using `--prompt`, now only prompts for the first command in the execution thread. Previously, any use of `WP_CLI::run_command()` within a command would cause the prompting UX to appear again [[#2400](https://github.com/wp-cli/wp-cli/pull/2400)]. -* Removes unnecessary `exit` on premature success for `wp theme activate` [[#2412](https://github.com/wp-cli/wp-cli/pull/2412)]. -* Checks if a taxonomy exists before listing its terms [[#2414](https://github.com/wp-cli/wp-cli/pull/2414)]. -* When trying to update a version of core that doesn't exist, check the HTTP response code before trying to unzip an invalid archive [[#2368](https://github.com/wp-cli/wp-cli/pull/2368)]. -* Fixes use of `wp server` when the PHP binary contains spaces [[#2422](https://github.com/wp-cli/wp-cli/pull/2422)]. -* Respects `--skip_comments` flag for `wp export`, which has been broken for quite a while [[#2427](https://github.com/wp-cli/wp-cli/pull/2427)] -* Persists IPTC data in `wp media import` when missing a title or caption; removes extension from default title [[#2438](https://github.com/wp-cli/wp-cli/pull/2438), [#2466](https://github.com/wp-cli/wp-cli/pull/2466)]. -* Disables check translation updates when updating themes or plugins [[#2439](https://github.com/wp-cli/wp-cli/pull/2439)]. -* Corrects parameter sequence order when creating a new user on multisite [[#2443](https://github.com/wp-cli/wp-cli/pull/2443)]. -* Disables automatic colorization when `--format=table` [[#2458](https://github.com/wp-cli/wp-cli/pull/2458)]. -* Uses core's version check API for finding updates, which gives us exact URLs to download offers [[#2469](https://github.com/wp-cli/wp-cli/pull/2469)]. -* Uses more robust failed download checking in `wp cli update` [[#2488](https://github.com/wp-cli/wp-cli/pull/2488)]. -* Runs help early for `wp core` commands used when core isn't yet installed [[#2497](https://github.com/wp-cli/wp-cli/pull/2497)]. -* Fixes formatting of GLOBAL PARAMETERS when command has subcommands [[#2516](https://github.com/wp-cli/wp-cli/pull/2516)]. -* Properly handles multi-column keys in `wp search-replace` [[#2531](https://github.com/wp-cli/wp-cli/pull/2531)]. -* Uses correct path to autoloader when WP-CLI is installed to a parent Composer project [[#2550](https://github.com/wp-cli/wp-cli/pull/2550)]. -* Properly passes `wp plugin search` fields to `plugins_api()` request; adds `page` parameter [[#2570](https://github.com/wp-cli/wp-cli/pull/2570), [#2571](https://github.com/wp-cli/wp-cli/pull/2571)]. -* Add `parent` as a potential status in `wp theme status` [[#2573](https://github.com/wp-cli/wp-cli/pull/2573)] - -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. diff --git a/_posts/2016-04-14-restful-wp-cli-update-3.md b/_posts/2016-04-14-restful-wp-cli-update-3.md deleted file mode 100644 index 94f919de..00000000 --- a/_posts/2016-04-14-restful-wp-cli-update-3.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -layout: post -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/)). - -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. - -Before we proceed: most of the, if not all, RESTful WP-CLI features have required under the hood changes to WP-CLI. You'll want to `wp cli update --nightly` to play with this new functionality locally. Once you've done so, you can `wp package install danielbachhuber/wp-rest-cli` to install the latest. - -### Use `--debug` and `--debug=rest` to profile your REST endpoints - -REST APIs are all about speed. Milliseconds matter, and every one you manage to shave off will have a real world impact on user experience. - -To make it *much*, much easier to understand how many queries your endpoint is performing, and how long they take, I've added some lightweight profiling to RESTful WP-CLI. - -Use `--debug` to get a summary of your queries for any command. - - $ wp rest post list --debug - Debug (rest): REST command executed 7 queries in 0.001954 seconds. Use --debug=rest to see all queries. (1.446s) - +----+-----------------------------+ - | id | title | - +----+-----------------------------+ - | 1 | {"rendered":"Hello world!"} | - +----+-----------------------------+ - -Use `--debug=rest` to get the full list of queries executed. - - $ wp rest post list --fields=id,title --debug=rest - Debug: REST command executed 7 queries in 0.001696 seconds. Ordered by slowness, the queries are: - 1: - - 0.000291 seconds - - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts - - SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 10 - 2: - - 0.000257 seconds - - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, WP_Query->set_found_posts - - SELECT FOUND_ROWS() - 3: - - 0.000256 seconds - - WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, setup_postdata, WP_Query->setup_postdata, get_userdata, get_user_by, WP_User::get_data_by - - SELECT * FROM wp_users WHERE ID = '1' - 4: - - 0.000244 seconds - - WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, setup_postdata, WP_Query->setup_postdata, get_userdata, get_user_by, WP_User->init, WP_User->for_blog, WP_User->_init_caps, get_user_meta, get_metadata, update_meta_cache - - SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1) ORDER BY umeta_id ASC - 5: - - 0.000233 seconds - - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches - - SELECT wp_posts.* FROM wp_posts WHERE ID IN (1) - 6: - - 0.000209 seconds - - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_object_term_cache, wp_get_object_terms - - SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (1) ORDER BY t.name ASC - 7: - - 0.000206 seconds - - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_postmeta_cache, update_meta_cache - - SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (1) ORDER BY meta_id ASC - (1.598s) - +----+-----------------------------+ - | id | title | - +----+-----------------------------+ - | 1 | {"rendered":"Hello world!"} | - +----+-----------------------------+ - -Profiling works for any CRUD operation. - - $ wp rest post create --title="Test post" --user=daniel --debug - Debug (rest): REST command executed 28 queries in 0.023962 seconds. Use --debug=rest to see all queries. (1.777s) - Success: Created post. - $ wp rest post update 3 --content="Foo bar" --user=daniel --debug - 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). - -### Use `wp rest * edit` to edit a resource in your system editor - -Most people probably don't know this, but you can use `wp post edit ` to edit post content in your system editor (e.g. vim). Now, with `wp rest * edit`, you can edit any REST resource in your system editor. - - $ wp rest post edit 3 --user=daniel - -When you run `wp rest * edit`, RESTful WP-CLI fetches the resource, transforms it into a YAML document, and puts it in your system editor: - - --- - date: 2016-04-14T14:02:57 - date_gmt: null - password: - slug: - status: draft - title: - raw: Test post - rendered: Test post - content: - raw: Foo bar - rendered: | - | -

Foo bar

- excerpt: - raw: - rendered: | - | -

Foo bar

- author: 1 - featured_media: 0 - comment_status: open - ping_status: open - sticky: false - format: standard - categories: - - 1 - tags: [ ] - -If you make changes to any of the fields, then the command sends it back to WordPress (through the WP REST API) to update. - -On WordPress installs that support Basic Auth, editing also works over HTTP: - - $ wp --http=http://daniel:daniel@wordpress-develop.dev rest post edit 1 - -Et, voila. - -### Get involved! - -I'd love your input on the dozens of ideas I have for a more RESTful WP-CLI: - -* Render the help docs in formats like API Blueprint and Swagger [[#36](https://github.com/danielbachhuber/wp-rest-cli/issues/36)] -* Introduce `wp rest * generate` to generate mock data in the format your application expects [[#55](https://github.com/danielbachhuber/wp-rest-cli/issues/55)]. -* 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). diff --git a/_posts/2016-04-28-version-0.23.1.md b/_posts/2016-04-28-version-0.23.1.md deleted file mode 100644 index 3e128300..00000000 --- a/_posts/2016-04-28-version-0.23.1.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.23.1 released ---- - -WP-CLI v0.23.1 is a compatibility release for those who've installed WP-CLI with Composer and require a minimum-stability. See [#2664](https://github.com/wp-cli/wp-cli/issues/2664) for related conversation. - -If you're using the Phar distribution of WP-CLI, you *should* `wp cli update`, but don't need to prioritize it, as the release doesn't change WP-CLI's behavior in any significant way. - -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. diff --git a/_posts/2016-06-23-future-wp-cli.md b/_posts/2016-06-23-future-wp-cli.md deleted file mode 100644 index 6f62578b..00000000 --- a/_posts/2016-06-23-future-wp-cli.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: post -author: danielbachhuber -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: - -> how do I reduce WP-CLI's bus factor, and more generally lay a foundation for WP-CLI's long-term organizational stability? - -Although things seem to be going reasonably well now, I want to make sure we're taking steps towards ensuring the long-term continuity of the project. Today, Andreas (WP-CLI's founder) and I sat down for breakfast to discuss our options and how we want to proceed. - -Based on our conversation, we think the most important task is to reduce WP-CLI's bus factor and onboard one or more additional maintainers to focus on a few non-code roles: - -* 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. - -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. - -At this time, we don't have plans to establish a legal WP-CLI organization. We've decided the operational complexities exceed the benefits. While many companies and individuals want to donate to WP-CLI, introducing money always has the possibility of causing more harm than good. Instead, we'll use Kickstarter to fund larger endeavors (e.g. a logo and website redesign) on an as-needed basis. - -If you would like to become a maintainer of WP-CLI in a non-code role, please email [info@wp-cli.org](mailto:info@wp-cli.org). Expect to participate in a trial period of 2-3 months. - -We have a Mailchimp mailing list now too. [Sign up](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e) for email notifications of new versions and occasional announcements about the project. - -Thanks, - -Daniel Bachhuber, maintainer -Andreas Creten, founder diff --git a/_posts/2016-07-20-restful-wp-cli-update-4.md b/_posts/2016-07-20-restful-wp-cli-update-4.md deleted file mode 100644 index 3de4801b..00000000 --- a/_posts/2016-07-20-restful-wp-cli-update-4.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: RESTful WP-CLI - The final update? ---- - -Last November, I [published a Kickstarter](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli), and was completely blown away by the support. This month, the funding ran out, so I thought I'd post one last [RESTful WP-CLI](https://github.com/wp-cli/restful) update. - -Actually, the story doesn't end here. I'm writing a massive retrospective post about using Kickstarter to fund open source, so keep an eye out for that. Also, WP-CLI v0.24.0 is due out a week from now, July 27th, and it's looking to be the largest release ever. When you do a Kickstarter, it's really just the beginning of something bigger. - -Enough with the superlatives, let's dive into some new features. Remember: RESTful WP-CLI features require under the hood changes to WP-CLI. You'll want to `wp cli update --nightly` to play with this new functionality locally. Once you've done so, you can `wp package install wp-cli/restful` to install the latest. - -### Effortlessly use WP-CLI against any WordPress install - -WP-CLI aliases are shortcuts you register in your `wp-cli.yml` or `config.yml` to effortlessly run commands against any WordPress install. - -For instance, if I'm working locally on the runcommand theme, have registered a new rewrite rule, and need to flush rewrites inside my Vagrant-based virtual machine, I can run: - - $ wp @dev rewrite flush - Success: Rewrite rules flushed. - -Then, once the code goes to production, I can run: - - $ wp @prod rewrite flush - Success: Rewrite rules flushed. - -Look ma! No more SSH'ing into machines, changing directories, and generally spending a full minute to get to a given WordPress install. - -Additionally, alias groups let you register groups of aliases. If I want to run a command against both runcommand WordPress instances, I can use `@both`: - - $ wp @both core check-update - Success: WordPress is at the latest version. - Success: WordPress is at the latest version. - -Aliases can be registered in your project's `wp-cli.yml` file, or your user's global `~/.wp-cli/config.yml` file: - - @prod: - ssh: runcommand@runcommand.io~/webapps/production - @dev: - ssh: vagrant@192.168.50.10/srv/www/runcommand.dev - @both: - - @prod - - @dev - -### But wait, what's the 'ssh' in there? - -WP-CLI now natively supports a `--ssh=` global parameter for running a command against a remote WordPress install. Many thanks to XWP and their community for paving the way with [WP-CLI SSH](https://github.com/xwp/wp-cli-ssh). - -Under the hood, WP-CLI proxies commands to the `ssh` executable, which then passes them to WP-CLI installed on the remote machine. Your syntax for `-ssh=` can be any of the following: - -* Just the host (e.g. `wp --ssh=runcommand.io`), which means the user will be inferred from your current system user, and the path will be the SSH user's home directory. -* The user and the host (e.g. `wp --ssh=runcommand@runcommand.io`). -* The user, the host, and the path to the WordPress install (e.g. `wp --ssh=runcommand@runcommand.io~/webapps/production`). The path comes immediately after the TLD of the host. - -Or, if you use a `~/.ssh/config`, `` can be any host alias stored in the SSH config (e.g. `wp --ssh=rc` for me). - -Note you do need a copy of WP-CLI on the remote server, accessible as `wp`. Futhermore, `--ssh=` won't load your `.bash_profile` if you have a shell alias defined, or are extending the `$PATH` environment variable. If this affects you, [here's a more thorough explanation](https://runcommand.io/to/wp-ssh-custom-path/) of how you can make `wp` accessible. - -### RESTful WP-CLI v0.2.0 and beyond - -Today marks the release of [RESTful WP-CLI](https://github.com/wp-cli/restful) v0.2.0. Among [43 closed issues and pull requests](https://github.com/wp-cli/restful/milestone/2?closed=1), I'd like to highlight two new features. - -First, use `wp rest (post|user|comment|*) generate` to create an arbitrary number of any resource: - - $ wp @wpdev rest post generate --count=50 --title="Test Post" - Generating items 100% [==============================================] 0:01 / 0:02 - -When working on a site locally, you often need dummy content to work with. There are a myriad of ways custom post types can store data in the database though, so generating dummy content can be a painstaking process. Because the WP REST API represents a layer of abstraction between the client (e.g. WP-CLI in this case) and the database, it's much easier to produce a general purpose content generation command. - -In the future, I'd love to see [dummy data generated for each field based on the resource schema](https://github.com/wp-cli/restful/issues/69). - -Second, use `wp rest (post|user|comment|*) diff` to compare resources between two enviroments: - - # "command" isn't a typo in this example; "command" is a content type expressed through the WP REST API on runcommand.io - $ wp @dev rest command diff @prod find-unused-themes --fields=title - (-) http://runcommand.dev/api/ (+) https://runcommand.io/api/ - command: - + title: find-unused-themes - -When working with multiple WordPress environments, you may want to know how these environments differ. Because the WP REST API represents a higher-level abstraction on top of WordPress, computing the difference between two environments becomes a matter of fetching the data and producing a comparison. - -There are a [number of ways the diff command could be improved](https://github.com/wp-cli/restful/issues?q=is%3Aissue+is%3Aopen+label%3Acommand%3Adiff), so consider this implementation to be the prototype. - -What's next? - -More immediately, I'd like to start looking at how well RESTful WP-CLI works with plugins and themes. If you've written custom endpoints for the WP REST API, [please weigh in on this Github issue](https://github.com/wp-cli/restful/issues/85) so I can check it out. - -Ultimately, the goal is for `wp rest post` to replace `wp post`, but there are many months between here and there. In this future where WP-CLI packages are first-class citizens amongst the commands in WP-CLI core, RESTful WP-CLI gets to serve as a testbed for figuring out how that actually works. We shall see, we shall see. - -As always, thanks for your support! diff --git a/_posts/2016-07-27-version-0.24.0.md b/_posts/2016-07-27-version-0.24.0.md deleted file mode 100644 index 99ea9a4e..00000000 --- a/_posts/2016-07-27-version-0.24.0.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.24.0 released ---- - -As I [mentioned in my WordCamp Europe talk](https://runcommand.io/2016/06/26/my-condolences-youre-now-the-maintainer-of-a-popular-open-source-project/): - -> Just like WordPress has plugins, the future of WP-CLI is packages of commands. For this future, I’m trying to proactively solve the problems WordPress has with plugins: -> -> * Where WordPress plugins are considered second-class to what’s included in core, I’d like WP-CLI packages to be considered first-class citizens amongst the commands in WP-CLI. -> * All too often, WordPress plugins have just one author. I’d like for each WP-CLI package to have two or three active maintainers. - -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. - -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). - -Let's get on with the show. Use `wp cli update` to install v0.24.0, representing [449 resolved issues and pull requests](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.24.0+is%3Aclosed). Here's what's new. - -### Forked `wp-settings.php` no more - -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). - -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. - -### More documentation in more languages - -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/). - -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). - -### Effortlessly use WP-CLI against any WordPress install - -WP-CLI aliases are shortcuts you register in your `wp-cli.yml` or `config.yml` to effortlessly run commands against any WordPress install. - -For instance, if I'm working locally on the runcommand theme, have registered a new rewrite rule, and need to flush rewrites inside my Vagrant-based virtual machine, I can run: - - $ wp @dev rewrite flush - Success: Rewrite rules flushed. - -Then, once the code goes to production, I can run: - - $ wp @prod rewrite flush - Success: Rewrite rules flushed. - -Look ma! No more SSH'ing into machines, changing directories, and generally spending a full minute to get to a given WordPress install. - -Additionally, alias groups let you register groups of aliases. If I want to run a command against both runcommand WordPress instances, I can use `@both`: - - $ wp @both core check-update - Success: WordPress is at the latest version. - Success: WordPress is at the latest version. - -Aliases can be registered in your project's `wp-cli.yml` file, or your user's global `~/.wp-cli/config.yml` file: - - @prod: - ssh: runcommand@runcommand.io~/webapps/production - @dev: - ssh: vagrant@192.168.50.10/srv/www/runcommand.dev - @both: - - @prod - - @dev - -### But wait, what's the 'ssh' in there? - -WP-CLI now natively supports a `--ssh=` global parameter for running a command against a remote WordPress install. Many thanks to XWP and their community for paving the way with [WP-CLI SSH](https://github.com/xwp/wp-cli-ssh). - -Under the hood, WP-CLI proxies commands to the `ssh` executable, which then passes them to WP-CLI installed on the remote machine. Your syntax for `-ssh=` can be any of the following: - -* Just the host (e.g. `wp --ssh=runcommand.io`), which means the user will be inferred from your current system user, and the path will be the SSH user's home directory. -* The user and the host (e.g. `wp --ssh=runcommand@runcommand.io`). -* The user, the host, and the path to the WordPress install (e.g. `wp --ssh=runcommand@runcommand.io~/webapps/production`). The path comes immediately after the TLD of the host. - -Or, if you use a `~/.ssh/config`, `` can be any host alias stored in the SSH config (e.g. `wp --ssh=rc` for me). - -Note you do need a copy of WP-CLI on the remote server, accessible as `wp`. Futhermore, `--ssh=` won't load your `.bash_profile` if you have a shell alias defined, or are extending the `$PATH` environment variable. If this affects you, [here's a more thorough explanation](https://runcommand.io/to/wp-ssh-custom-path/) of how you can make `wp` accessible. - -Relevant pull requests for aliases and SSH support include: [#2755](https://github.com/wp-cli/wp-cli/pull/2755), [#2974](https://github.com/wp-cli/wp-cli/pull/2974), [#3012](https://github.com/wp-cli/wp-cli/pull/3012), [#3013](https://github.com/wp-cli/wp-cli/pull/3013), [#3014](https://github.com/wp-cli/wp-cli/pull/3014), [#3016](https://github.com/wp-cli/wp-cli/pull/3016), [#3026](https://github.com/wp-cli/wp-cli/pull/3026), [#3040](https://github.com/wp-cli/wp-cli/pull/3040), [#3070](https://github.com/wp-cli/wp-cli/pull/3070), [#3093](https://github.com/wp-cli/wp-cli/pull/3093), [#3100](https://github.com/wp-cli/wp-cli/pull/3100), [#3117](https://github.com/wp-cli/wp-cli/pull/3117), [#3134](https://github.com/wp-cli/wp-cli/pull/3134), [#3135](https://github.com/wp-cli/wp-cli/pull/3135), [#3145](https://github.com/wp-cli/wp-cli/pull/3145), [#3161](https://github.com/wp-cli/wp-cli/pull/3161), [#3180](https://github.com/wp-cli/wp-cli/pull/3180). - -### Everything else in 0.24.0 - -Command improvements: - -* Adds a newline when using the `wp shell` interactive prompt [[#2601](https://github.com/wp-cli/wp-cli/pull/2601), [#2659](https://github.com/wp-cli/wp-cli/pull/2659)]. -* Improves formatting of scaffolded plugins [[#2588](https://github.com/wp-cli/wp-cli/pull/2588), [#2598](https://github.com/wp-cli/wp-cli/pull/2598)]. -* Introduces `--format=ids` to `wp (*) generate` commands for easier chaining [[2622](https://github.com/wp-cli/wp-cli/pull/2622)]. -* Adds `term recount` command for trigger a recount of taxonomy terms assigned to posts [[#2625](https://github.com/wp-cli/wp-cli/pull/2625), [#2628](https://github.com/wp-cli/wp-cli/pull/2628)]. -* Normalizes plugin / theme version numbers and header formatting when scaffolding [[#2644](https://github.com/wp-cli/wp-cli/pull/2644)]. -* Introduces `--due-now` to run all cron events due or overdue [[#2658](https://github.com/wp-cli/wp-cli/pull/2658)]. -* Permits `wp cron (event|schedule) list` and `wp option list` to output a single field [[#2657](https://github.com/wp-cli/wp-cli/pull/2657), [#3033](https://github.com/wp-cli/wp-cli/pull/3033)]. -* Adds field filtering in cron event list command [[#2674](https://github.com/wp-cli/wp-cli/pull/2674)]. -* Includes a `.distignore` file when scaffolding a new plugin, to define files and folders excluded from distributions [[#2697](https://github.com/wp-cli/wp-cli/pull/2697), [#2756](https://github.com/wp-cli/wp-cli/pull/2756), [#3042](https://github.com/wp-cli/wp-cli/pull/3042), [#3088](https://github.com/wp-cli/wp-cli/pull/3088)]. -* Displays a summary success message when using `--dry-run` with `wp search-replace` [[#2740](https://github.com/wp-cli/wp-cli/pull/2740)]. -* Scaffolds plugin based on supported WordPress version [[#2751](https://github.com/wp-cli/wp-cli/pull/2751)]. -* Applies extended insert format to search-replace SQL export, for a substantial performance boost [[#2745](https://github.com/wp-cli/wp-cli/pull/2745)]. -* Warns with `wp core verify-checksums` when extra files exist in wp-admin or wp-includes [[#2638](https://github.com/wp-cli/wp-cli/pull/2638)]. -* Supports `--format=` argument for `wp cap list`, `wp user list-caps`, and `wp super-admin list` [[#2851](https://github.com/wp-cli/wp-cli/pull/2851), [#2961](https://github.com/wp-cli/wp-cli/pull/2961), and [#2949](https://github.com/wp-cli/wp-cli/pull/2949)]. -* Accepts multiple term IDs with `wp term url` [[#2865](https://github.com/wp-cli/wp-cli/pull/2865)]. -* Supports PHP 5.5 Memcache extension when checking cache type [[#2945](https://github.com/wp-cli/wp-cli/pull/2945)]. -* Uses `WP_CLI::warning()` when a theme is already active, to make behavior more consistent with plugin activation [[#3015](https://github.com/wp-cli/wp-cli/pull/3015)]. -* Adds `--porcelain` flag to `wp db export` [[#3032](https://github.com/wp-cli/wp-cli/pull/3032)]. -* Allow the author field to be selected in `wp theme list --fields=` [[#3043](https://github.com/wp-cli/wp-cli/pull/3043)]. -* Introduces `wp widget reset `, for removing all widgets from a sidebar and placing them in the inactive sidebar [[#3077](https://github.com/wp-cli/wp-cli/pull/3077)]. -* Supports 'trunk' and 'nightly' version arguments for `wp core download` [[#3127](https://github.com/wp-cli/wp-cli/pull/3127)]. -* Adds verbosity to `wp role reset` [[#3132](https://github.com/wp-cli/wp-cli/pull/3132), [#3141](https://github.com/wp-cli/wp-cli/pull/3141)]. -* Adds `--include-columns=` argument to `wp search-replace` [[#3142](https://github.com/wp-cli/wp-cli/pull/3142)]. -* Adds `--ci=` argument for `wp plugin test scaffold`, which supports 'travis', 'circle', or 'gitlab' [[#3144](https://github.com/wp-cli/wp-cli/pull/3144), [#3163](https://github.com/wp-cli/wp-cli/pull/3163)]. - -Framework enhancements: - -* Uses `is_callable()` in `WP_CLI::add_command()`, instead of custom logic [[#2595](https://github.com/wp-cli/wp-cli/pull/2595)]. -* Introduces `CompositeCommand->remove_subcommand()`, and modifies the bootstrap process to always register core commands [[#2629](https://github.com/wp-cli/wp-cli/pull/2629)]. -* Runs `before_invoke` and `after_invoke` callbacks on subcommands, such that you can hook into immediately before and after subcommand execution [[#2647](https://github.com/wp-cli/wp-cli/pull/2647), [#2686](https://github.com/wp-cli/wp-cli/pull/2686)]. -* Introduces `--debug=` to limit debug output to a particular group of debug calls [[#2648](https://github.com/wp-cli/wp-cli/pull/2648)]. -* Interacts with the Package Index over SSL [[#2720](https://github.com/wp-cli/wp-cli/pull/2720)]. -* Supports CSV with spaces when using `--fields=` [[#2750](https://github.com/wp-cli/wp-cli/pull/2750)]. -* Disables WP cron when `ALTERNATE_WP_CRON` is defined [[#3118](https://github.com/wp-cli/wp-cli/pull/3118)]. -* Supports positional arguments defined in `wp-cli.yml` [[#3120](https://github.com/wp-cli/wp-cli/pull/3120)]. -* Introduces `WP_CLI_STRICT_ARGS_MODE` for dealing with arg ambiguity [[#3128](https://github.com/wp-cli/wp-cli/pull/3128)]. -* Registers `--http=` global parameter for use with RESTful WP-CLI [[#3130](https://github.com/wp-cli/wp-cli/pull/3130)]. -* Introduces `WP_CLI::add_wp_hook()`, for adding actions and filters when you don't yet have access to actions and filters [[#3195](https://github.com/wp-cli/wp-cli/pull/3195)]. -* Increases minimum supported PHP version to 5.3.29 [[#2672](https://github.com/wp-cli/wp-cli/pull/2672)]. - -Bug fixes across the board: - -* Mitigates a DateTime fatal when instantiating the Composer object [[#2607](https://github.com/wp-cli/wp-cli/pull/2607)]. -* Squashes `wp export` notice about `skip_comments` [[#2620](https://github.com/wp-cli/wp-cli/pull/2620)]. -* Avoids regex to fix greedy parsing of parameter arguments [[#2587](https://github.com/wp-cli/wp-cli/pull/2587), [#2717](https://github.com/wp-cli/wp-cli/pull/2717)]. -* Ensures `default` and `options` are used when supplied as arg args [[#2741](https://github.com/wp-cli/wp-cli/pull/2741)]. -* Considers image sizes missing when using `wp media regenerate` and `sizes` doesn't have registered sizes [[#2645](https://github.com/wp-cli/wp-cli/pull/2645)]. -* Catches `WP_Error` from `translations_api()` [[#2671](https://github.com/wp-cli/wp-cli/pull/2671), [#3179](https://github.com/wp-cli/wp-cli/pull/3179)]. -* Doesn't erroneously try to (de)activate plugins with `--all` flag [[#2692](https://github.com/wp-cli/wp-cli/pull/2692)]. -* Defines `DOING_CRON` before WordPress is loaded when running `wp cron event run` [[#2691](https://github.com/wp-cli/wp-cli/pull/2691)]. -* Only attempts to use `add_user_to_blog()` on multisite when importing users from CSV [[#2690](https://github.com/wp-cli/wp-cli/pull/2690)]. -* 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)]. -* 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)]. -* Displays error if theme directory exists but is erred; permits force install [[#2821](https://github.com/wp-cli/wp-cli/pull/2821)]. -* Fixes PHP notice when installing a child theme, and running `wp theme status` [[#2976](https://github.com/wp-cli/wp-cli/pull/2976), [#3047](https://github.com/wp-cli/wp-cli/pull/3047)]. -* Ensures YAML formatter handles objects and `--fields=` arg [[#3060](https://github.com/wp-cli/wp-cli/pull/3060)]. -* Fixes exception in `wp menu list` if `--format=ids` [[#3075](https://github.com/wp-cli/wp-cli/pull/3075)]. -* Populates recently active plugins list when deactivating a plugin [[#3068](https://github.com/wp-cli/wp-cli/pull/3068)]. -* Respects `wp-cli.yml` default values when applying argument defaults [[#3111](https://github.com/wp-cli/wp-cli/pull/3111)]. -* Calls `wp_slash()` on data passed to post, comment, term, and user commands [[#3156](https://github.com/wp-cli/wp-cli/pull/3156), [#3157](https://github.com/wp-cli/wp-cli/pull/3157), [#3158](https://github.com/wp-cli/wp-cli/pull/3158), [#3159](https://github.com/wp-cli/wp-cli/pull/3159), [#3167](https://github.com/wp-cli/wp-cli/pull/3167), [#3173](https://github.com/wp-cli/wp-cli/pull/3173)]. -* Appropriately lists duplicated cron events [[#3175](https://github.com/wp-cli/wp-cli/pull/3175)]. - -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. - -Back to work! diff --git a/_posts/2016-08-09-support-policy.md b/_posts/2016-08-09-support-policy.md deleted file mode 100644 index 6142fd6a..00000000 --- a/_posts/2016-08-09-support-policy.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Support policy updates ---- - -To help keep the maintenance burden manageable by volunteers, our support policies have changed: Github issues are now reserved for bug reports and enhancements of existing commands; they are no longer a venue for general support questions. - -Have a question about something related to WP-CLI? You might find an answer in one of the following resources: - -- [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 Excerpts](https://runcommand.io/excerpts/) -- [WordPress StackExchange forums](http://wordpress.stackexchange.com/questions/tagged/wp-cli) - -If you can’t find your answer at one of those links, 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. Professional users may also consider [runcommand](https://runcommand.io/) for premium support. - -Using WP-CLI professionally? We encourage you to purchase support from a [regular WP-CLI contributor](https://github.com/wp-cli/wp-cli/graphs/contributors). Libre != gratis; the open source license grants you the freedom to use and modify, but not commitments of other people's time. Participating responsibly in the economic ecosystem around an open source tool you depend upon helps to ensure the long-term health of the project. diff --git a/_posts/2016-08-09-version-0.24.1.md b/_posts/2016-08-09-version-0.24.1.md deleted file mode 100644 index 917b549c..00000000 --- a/_posts/2016-08-09-version-0.24.1.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.24.1 released ---- - -Curious as to why you're getting a warning message when updating an option? Or why `--skip-plugins=` skips all of your network-activated plugins? - -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. - -Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber) diff --git a/_posts/2016-08-16-remaining-releases-2016.md b/_posts/2016-08-16-remaining-releases-2016.md deleted file mode 100644 index 1b2feae1..00000000 --- a/_posts/2016-08-16-remaining-releases-2016.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Two more major releases in 2016 ---- - -Just a heads up there will be two more major releases in 2016: - -* v0.25.0 will be released on Tuesday, October 25th. -* v1.0.0 will be released on Tuesday, November 29th. - -Want to help out? We'll be focusing on framework refinement; in particular, there are a [number of improvements that can be made](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+is%3Aissue+label%3Acommand%3Apackage) to the package management experience. diff --git a/_posts/2016-10-25-version-0.25.0.md b/_posts/2016-10-25-version-0.25.0.md deleted file mode 100644 index 7982485c..00000000 --- a/_posts/2016-10-25-version-0.25.0.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 0.25.0 released ---- - -Happy release day! - -Today, I'm excited to bring you WP-CLI v0.25.0. Check out the [newly published roadmap](/docs/roadmap/) for details on upcoming releases and product focus (hint: there's a future where WP-CLI no longer supports PHP 5.3). - -Let's dive in. - -### Compatibility with WordPress 4.7 - -WordPress 4.7 introduces a new `WP_Hook` implementation for registering and executing actions and filters. Because WP-CLI has its own `WP_CLI::add_wp_hook()` that was erroneously accessing the `$wp_filter` global even when the `add_filter()` function was available, WP-CLI could fatal in certain circumstances. WP-CLI now appropriately calls `add_filter()` when it's available. - -**Importantly, due to the nature of these changes, WP-CLI versions prior to 0.25.0 will be incompatible with WordPress 4.7.** - -Inspect the change in [this pull request](https://github.com/wp-cli/wp-cli/pull/3384). - -### New packages in the Package Index - -The WP-CLI community has been quite active in creating new tools for you to use (and contribute back to): - -* [aaemnnosttv/wp-cli-login-command](https://github.com/aaemnnosttv/wp-cli-login-command) - Log in to WordPress with secure passwordless magic links. -* [alessandrotesoro/wp-cli-helpscout-docs-parser](https://github.com/alessandrotesoro/wp-cli-helpscout-docs-parser) - Extract helpscout docs articles and categories to build an offline documentation. -* [alessandrotesoro/wp-usergen-cli](https://github.com/alessandrotesoro/wp-usergen-cli) - Generate random users for testing purposes. -* [anhskohbo/wp-cli-themecheck](https://github.com/anhskohbo/wp-cli-themecheck) - Run Themecheck in WP-CLI. -* [BeAPI/wp-cli-light-db-export](https://github.com/BeAPI/wp-cli-light-db-export) - Allows you to export big databases with all the tables but not all the data. -* [binarygary/db-checkpoint](https://github.com/binarygary/db-checkpoint) - Treat your DB like a save point in a video game. -* [brightoak/wp-cli-envoyer](https://github.com/brightoak/wp-cli-envoyer) - Invoke an Envoyer deployment via WP-CLI. -* [getshifter/wp-cli-shifter](https://github.com/getshifter/wp-cli-shifter) - Enables you to import/export your WordPress site for the Shifter. -* [eriktorsner/wp-checksum](https://github.com/eriktorsner/wp-checksum) - Verify checksums for themes and plugins. -* [iandunn/wp-cli-plugin-active-on-sites](https://github.com/iandunn/wp-cli-plugin-active-on-sites) - List all sites in a multisite network that have activated a given plugin. -* [markri/wp-sec](https://github.com/markri/wp-sec) - Checks for WordPress CVE security issues at wpvulndb.com. -* [mattgrshaw/wp-installer](https://github.com/mattgrshaw/wp-installer) - Simple commands to install and uninstall WordPress. -* [pressbooks/pb-cli](https://github.com/pressbooks/pb-cli) - A suite of wp-cli commands for Pressbooks. -* [runcommand/assign-featured-images](https://github.com/runcommand/assign-featured-images) - Assign featured images to posts that support thumbnails. -* [runcommand/manifest](https://github.com/runcommand/manifest) - Produces an overview of WordPress' configuration for a high-level understanding of what's going on inside of WordPress. -* [rxnlabs/wp-composer](https://github.com/rxnlabs/wp-composer) - Manage your WordPress site dependencies using the power of Composer. -* [trendwerk/faker](https://github.com/trendwerk/faker) - Fake post data with WP-CLI. -* [trepmal/blog-extractor](https://github.com/trepmal/blog-extractor) - Extract a single blog from multisite. -* [trepmal/wp-revisions-cli](https://github.com/trepmal/wp-revisions-cli) - Manage revisions. -* [welaika/wp-cli-db2utf8](https://github.com/welaika/wp-cli-db2utf8) - Downgrade db encoding of a new WP installation to UTF8. - -Install any one of these with `wp package install ` (where `` is typically the `/`). When you do, go say thanks to the author! - -### More ways to install WP-CLI packages - -Although we'd love to see your package listed in the Package Index, we realize there are reasons you might not be able to do so. `wp package install` now supports installing an arbitrary Git URL [[#3482](https://github.com/wp-cli/wp-cli/pull/3482)], `.zip` file [[#3485](https://github.com/wp-cli/wp-cli/pull/3485)], or directory path [[#3484](https://github.com/wp-cli/wp-cli/pull/3484)] as a package. - - $ wp package install git@github.com:runcommand/doctor.git - $ wp package install https://github.com/runcommand/doctor.zip - $ wp package install doctor - -(doctor is the [second premium WP-CLI command from runcommand](https://runcommand.io/wp/doctor/)) - -It's worth noting Composer's behavior is slightly different for each package type: - -* Git URLs are treated as VCS repositories, and cloned to `~/.wp-cli/packages/vendor`. -* ZIP archives (remote and local) are extracted to `~/.wp-cli/packages/local`, and added as path repositories. -* Local directory paths are added as path repositories, which means Composer creates a symlink to the existing directory path. If the directory you've provided is removed, then the installation will break. - -### Everything else in 0.25.0 - -New commands: - -* `wp db check` - Runs `mysqlcheck` with the default `--check` option [[#3332](https://github.com/wp-cli/wp-cli/pull/3332)]. -* `wp site option *` - CRUD commands for managing WordPress site options [[#3386](https://github.com/wp-cli/wp-cli/pull/3386)]. -* `wp user session *` - CRUD commands for managing user sessions [[#3307](https://github.com/wp-cli/wp-cli/pull/3307)]. - -Command improvements: - -* `wp cli update`: - * Introduces `--stable` to install or reinstall the latest stable version [[#3430](https://github.com/wp-cli/wp-cli/pull/3430)]. -* `wp core config`: - * Adds comments to generated `wp-config.php` to better match the one provided by WordPress core [[#3312](https://github.com/wp-cli/wp-cli/pull/3312)]. -* `wp core download`: - * Preserves case for `--version` argument to properly handle release candidates [[#3283](https://github.com/wp-cli/wp-cli/pull/3283)]. - * Ensures `wp core download --version=latest` produces correctly-versioned cache key [[#3467](https://github.com/wp-cli/wp-cli/pull/3467)]. -* `wp core language update`: - * Fixes strict standard error about variable reference [[#3380](https://github.com/wp-cli/wp-cli/pull/3380)]. - * Permits updating language packs even when `en_US` is set as locale [[#3397](https://github.com/wp-cli/wp-cli/pull/3397)]. -* `wp core multisite-(install|convert)`: - * Warns when multisite constants can't be inserted into `wp-config.php`, instead of erroneously inserting at the end [[#3272](https://github.com/wp-cli/wp-cli/pull/3272)]. - * Includes adequate vertical spacing around inserted constants [[#3267](https://github.com/wp-cli/wp-cli/pull/3267)]. -* `wp core update-db`: - * Ensures `wp core update-db --network --dry-run` is actually dry [[#3347](https://github.com/wp-cli/wp-cli/pull/3347)]. -* `wp core version`: - * Displays default core language in `wp core version --extra` [[#3221](https://github.com/wp-cli/wp-cli/pull/3221)]. -* `wp import`: - * Indicates current file in WXR import progress indicator to communicate the total count is of the current file, not all files [[#3270](https://github.com/wp-cli/wp-cli/pull/3270)]. -* `wp media regenerate`: - * Adds a simple progress indicator [[#3407](https://github.com/wp-cli/wp-cli/pull/3407)]. -* `wp option list`: - * Adds `--no-transients` flag to ignore transients [[#3452](https://github.com/wp-cli/wp-cli/pull/3452)]. - * Adds `--exclude=` argument to list options excluding a specific pattern [[#3455](https://github.com/wp-cli/wp-cli/pull/3455)]. -* `wp package install` - * Displays package dependency details when installing a package with a dependency [[#3418](https://github.com/wp-cli/wp-cli/pull/3418), [#3425](https://github.com/wp-cli/wp-cli/pull/3425)]. -* `wp package uninstall` - * Removes a package's dependencies when the package is removed [[#3343](https://github.com/wp-cli/wp-cli/pull/3343)]. - * Properly assigns `$composer_backup` when uninstalling [[#3399](https://github.com/wp-cli/wp-cli/pull/3399)]. -* `wp plugin install`: - * Removes branch names from directories created for Github-based ZIPs [[#3314](https://github.com/wp-cli/wp-cli/pull/3314), [#3451](https://github.com/wp-cli/wp-cli/pull/3451)]. -* `wp scaffold plugin-tests`: - * Uses PHP version specific to Trusty on CircleCI [[#3359](https://github.com/wp-cli/wp-cli/pull/3359)]. - * Uses correct default user for MySQL on CircleCI [[#3457](https://github.com/wp-cli/wp-cli/pull/3457)]. - * Uses the latest version of PHPUnit on Travis, depending on PHP version [[#3463](https://github.com/wp-cli/wp-cli/pull/3463)]. - * Adds WordPress Coding Standards to newly-scaffolded plugins [[#3472](https://github.com/wp-cli/wp-cli/pull/3472)]. -* `wp search-replace`: - * Ensures tables are quoted to support all permitted characters [[#3318](https://github.com/wp-cli/wp-cli/pull/3318)]. - * Prevents error notice when `export_insert_size` isn't defined [[#3357](https://github.com/wp-cli/wp-cli/pull/3357)]. - * Fails back to PHP if SQL triggers an error for some reason [[#3387](https://github.com/wp-cli/wp-cli/pull/3387)]. -* `wp server`: - * Supports passing a custom `.ini` file to configure the server [[#3330](https://github.com/wp-cli/wp-cli/pull/3330)]. -* `wp site create`: - * Use `get_blog_details()` for the site URL when creating a new site to ensure the correct URL is displayed [[#3416](https://github.com/wp-cli/wp-cli/pull/3416)]. -* `wp site empty`: - * Ensures the entire uploads directory is empty [[#3400](https://github.com/wp-cli/wp-cli/pull/3400)]. -* `wp theme install`: - * Correctly installs parent theme when installing a child theme [[#3301](https://github.com/wp-cli/wp-cli/pull/3301)]. -* `wp transient`: - * Consolidates `wp transient delete-all` and `wp transient delete-expired` to flags of `wp transient delete` [[#3389](https://github.com/wp-cli/wp-cli/pull/3389)]. -* `wp user create`: - * Prevents email notifications when users are created because email notifications should only be sent when `--send-email` is provided [[#3331](https://github.com/wp-cli/wp-cli/pull/3331)]. - -Framework enhancements: - -* Updates Composer-based dependencies to latest [[#3257](https://github.com/wp-cli/wp-cli/pull/3257), [#3429](https://github.com/wp-cli/wp-cli/pull/3429), [#3460](https://github.com/wp-cli/wp-cli/pull/3460), [#3468](https://github.com/wp-cli/wp-cli/pull/3468)]. -* Properly handles registering an instantiated object as a command [[#3269](https://github.com/wp-cli/wp-cli/pull/3269)]. -* Splits the `ProcessRun` class out to its own file [[#3377](https://github.com/wp-cli/wp-cli/pull/3377), [#3422](https://github.com/wp-cli/wp-cli/pull/3422)]. -* Permits running test suite with `WP_VERSION` env variable [[#3383](https://github.com/wp-cli/wp-cli/pull/3383), [#3392](https://github.com/wp-cli/wp-cli/pull/3392)]. -* Prevents error notice when using `Utils\get_named_sem_ver()` with WP versions [[#3404](https://github.com/wp-cli/wp-cli/pull/3404)]. -* Fixes fatal error for failed early database connection by handling `dead_db()` error on `nocache_headers` filter [[#3440](https://github.com/wp-cli/wp-cli/pull/3440)]. -* Assigns a default `$_SERVER['SERVER_NAME']` to prevent uncaught exception when `wp_mail()` is used [[#3449](https://github.com/wp-cli/wp-cli/pull/3449)]. -* Ignores `url:` in `wp-cli.yml` when alias is used, because aliases completely override user, url, path, ssh, and http [[#3450](https://github.com/wp-cli/wp-cli/pull/3450)]. -* Warns when `WP_CLI::launch()` ends up with `return_code=-1`, which could be caused by a custom compiled version of PHP that uses the `--enable-sigchild` option [[#3458](https://github.com/wp-cli/wp-cli/pull/3458)]. -* Provides more verbosity in `wp_die()` handler to give the end user more detail when a database connection fails [[#3459](https://github.com/wp-cli/wp-cli/pull/3459)]. -* Supports passing arguments to `WP_CLI::do_hook()` [[#3470](https://github.com/wp-cli/wp-cli/pull/3470)]. -* Logs the current alias when executing an alias group [[#3471](https://github.com/wp-cli/wp-cli/pull/3471)]. -* Only checks `options` for a positional argument when a value is present [[#3481](https://github.com/wp-cli/wp-cli/pull/3481)]. -* Variety of bash completion improvements [[#3490](https://github.com/wp-cli/wp-cli/pull/3490), [#3491](https://github.com/wp-cli/wp-cli/pull/3491), [#3492](https://github.com/wp-cli/wp-cli/pull/3492)]. - -Bug fixes across the board: - -* Defines all requisite dependencies for PHP 7 on Debian-based systems [[#3208](https://github.com/wp-cli/wp-cli/pull/3208)]. -* Ensures `site --site_id= -> site --network_id=` backwards compat shim only affects `wp site create` [[#3227](https://github.com/wp-cli/wp-cli/pull/3227)]. -* Catches exceptions thrown by `RecursiveDirectoryIterator` when verifying core checksums [[#3266](https://github.com/wp-cli/wp-cli/pull/3266)]. -* Passes slashed data in meta commands [[#3274](https://github.com/wp-cli/wp-cli/pull/3274)]. -* Ensures appropriate WP-CLI package index URL is used in the `composer.json` [[#3276](https://github.com/wp-cli/wp-cli/pull/3276)]. -* Corrects reference of `WP_CLI` to use global namespace in `WP_CLI\Utils\get_temp_dir()` [[#3369](https://github.com/wp-cli/wp-cli/pull/3369)]. - -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. diff --git a/_posts/2016-11-29-version-1.0.0.md b/_posts/2016-11-29-version-1.0.0.md deleted file mode 100644 index 0dd8ba7d..00000000 --- a/_posts/2016-11-29-version-1.0.0.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: Version 1.0.0 released ---- - -Woohoo! - -Over the course of 5+ years, hundreds of contributors have worked to bring you WP-CLI v1.0.0, which I'm proud to announce today. - -This release represents a level of maturity few open source projects achieve. It also marks a moment of transition. The WP-CLI project will shift its focus to the WP-CLI package ecosystem, where it will enable innovation by building and encouraging new features as standalone packages. We hope this approach will promote faster iteration and more creativity, and more sustainably distribute the maintenance burden. As these community packages find success, we'll bring their learnings back into WP-CLI, alongside bug fixes and minor enhancements. - -Now that the issue backlog is [down to zero](https://twitter.com/danielbachhuber/status/802951083354009600), I'm personally looking forward to getting more ideas cooking for [runcommand](https://runcommand.io/), my own WP-CLI innovation studio. - -Headed to Philly this week? I'll be at Post Status Publish and WCUS (although only until mid-afternoon Friday). Say hello - I'm [@danielbachhuber](https://twitter.com/danielbachhuber) on Twitter. - -On with the show... - -### Introducing `WP_CLI::runcommand()` - -`WP_CLI::runcommand()` ([doc](/docs/internal-api/wp-cli-runcommand/)) is the new best way to run WP-CLI commands from within your WP-CLI command. It's as though `WP_CLI::run_command()` and `WP_CLI::launch_self()` grew up, married, and had the perfect child. - -With `WP_CLI::runcommand()`, you can: - -* Launch a new child process (default), or reuse the existing process. -* Optionally prevent the process from exiting on error. -* Return STDOUT generated by the command, or all command execution details (STDOUT, STDERR, return_code) as an object. -* Optionally parse captured STDOUT as JSON. - -Relevant pull requests include: [#3605](https://github.com/wp-cli/wp-cli/pull/3605), [#3619](https://github.com/wp-cli/wp-cli/pull/3619), [#3621](https://github.com/wp-cli/wp-cli/pull/3621). - -### Breaking change: Uses return code 1 when batch operation partially fails - -Some commands support performing the same operation against multiple resources (e.g. updating two or more plugins with `wp plugin update akismet hello`). Previously, if one of the operations failed (e.g. a plugin update failed to be downloaded), WP-CLI would display a warning, continue on, and exit with return code 0. Beginning in v1.0.0, WP-CLI uses return code 1 when one or more operations fails. - -See [this issue](https://github.com/wp-cli/wp-cli/issues/3577) for more background and rationale. - -Affected commands include: - -* `wp media (regenerate|import)` -* `wp menu delete` -* `wp menu item delete` -* `wp plugin (install|activate|update|toggle|deactivate|uninstall|delete)` -* `wp super-admin add` -* `wp theme (install|update)` -* `wp term delete` -* `wp widget (delete|deactivate|reset)` - -Use `WP_CLI\Utils\report_batch_operation_results()` ([doc](/docs/internal-api/wp-cli-utils-report-batch-operation-results/)) in your custom WP-CLI commands to more easily support this behavior. - -Relevant pull requests include: [#3584](https://github.com/wp-cli/wp-cli/pull/3584), [#3583](https://github.com/wp-cli/wp-cli/pull/3583), [#3582](https://github.com/wp-cli/wp-cli/pull/3582), [#3585](https://github.com/wp-cli/wp-cli/pull/3585), [#3586](https://github.com/wp-cli/wp-cli/pull/3586), [#3588](https://github.com/wp-cli/wp-cli/pull/3588). - -### Everything else in 1.0.0 - -New commands: - -* `wp package update` - Update all installed WP-CLI packages to their latest version. -* `wp scaffold theme-tests` - Scaffold PHPUnit tests for themes. - -Command improvements: - -* `wp cache type`: - * Supports WP LCache as a cache type [[#3504](https://github.com/wp-cli/wp-cli/pull/3504)]. -* `wp cli aliases`: - * Adds `alias` to subcommand for easier access [[#3512](https://github.com/wp-cli/wp-cli/pull/3512)]. -* `wp cli update`: - * Verifies release hash when updating [[#3515](https://github.com/wp-cli/wp-cli/pull/3515)]. - * No longer requires `--allow--root` flag when running as root [[#3576](https://github.com/wp-cli/wp-cli/pull/3576)]. -* `wp core config`: - * Ensures WordPress Coding Standards are applied to the generated wp-config [[#3496](https://github.com/wp-cli/wp-cli/pull/3496)]. -* `wp core (install|multisite-install)` - * Defaults to a randomly generated password for `--admin_password=`, which is now optional [[#3535](https://github.com/wp-cli/wp-cli/pull/3535), [#3573](https://github.com/wp-cli/wp-cli/pull/3573)]. -* `wp core language (install|update)`: - * Caches language pack downloads [[#3595](https://github.com/wp-cli/wp-cli/pull/3595)]. -* `wp core update`: - * Uses global namespace for `WP_Error` in `CoreUpgrader` class [[#3593](https://github.com/wp-cli/wp-cli/pull/3593)]. -* `wp core update-db`: - * Sets the `WP_INSTALLING` constant for the update process [[#3503](https://github.com/wp-cli/wp-cli/pull/3503)]. -* `wp package install`: - * Uses supplied version in package composer.json, instead of "dev-master" [[#3519](https://github.com/wp-cli/wp-cli/pull/3519)]. - * Adds WP-CLI version to package manager's `composer.json`, to gracefully handle WP-CLI version constraints [[#3603](https://github.com/wp-cli/wp-cli/pull/3603)]. -* `wp package list`: - * Indicates when a package has an update available [[#3611](https://github.com/wp-cli/wp-cli/pull/3611), [#3612](https://github.com/wp-cli/wp-cli/pull/3612)]. -* `wp post delete`: - * Correctly indicates revisions are deleted immediately in success message [[#3524](https://github.com/wp-cli/wp-cli/pull/3524)]. -* `wp scaffold plugin`: - * Ignores distribution archive files in `.gitignore` and `.distignore` [[#3520](https://github.com/wp-cli/wp-cli/pull/3520)]. - * Ignores `circle.yml`, `.gitlab-ci.yml` and `behat.yml` in `.distignore` [[#3599](https://github.com/wp-cli/wp-cli/pull/3599)]. -* `wp scaffold plugin-tests`: - * Checks out the data directory in `install-wp-tests.sh` to prevent notices in WP 4.7 [[#3571](https://github.com/wp-cli/wp-cli/pull/3571)]. - -Framework enhancements: - -* Updates Composer-based dependencies to latest [[#3498](https://github.com/wp-cli/wp-cli/pull/3498), [#3525](https://github.com/wp-cli/wp-cli/pull/3525)]. -* Introduces `--prompt=` to prompt for specific associative args, which lets users avoid exposing secure data in bash history [[#3531](https://github.com/wp-cli/wp-cli/pull/3531)]. -* Adds support for the version of PHP that comes with Cygwin [[#3591](https://github.com/wp-cli/wp-cli/pull/3591)]. - -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. diff --git a/_posts/2016-12-12-the-big-question.md b/_posts/2016-12-12-the-big-question.md deleted file mode 100644 index 461b6eda..00000000 --- a/_posts/2016-12-12-the-big-question.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: post -author: danielbachhuber -title: How much is WP-CLI worth to you? ---- - -**[Update 2 12/15:](https://twitter.com/wpcli/status/809352614580080640)** Undecided on how much WP-CLI is worth to you? The experiment ends Dec 28th — please make a decision by then :) - -**[Update 1 (12/13):](https://twitter.com/wpcli/status/808687676010287105)** Up to 17 subscribers so far. If we can get to 50, I'll launch a members-only forum. - -Last week, I [tweeted](https://twitter.com/danielbachhuber/status/806539537610481664): - -> At a decision point with @wpcli: it’s too large for me to voluntarily maintain. Have an opinion on its future? I’d love to chat. - -Last February, I started a business, [runcommand](https://runcommand.io/), as an indirect way of being able to invest my time into WP-CLI. The business is doing alright, not great but not horrible. What I've come to realize, though, is that my time is zero-sum. I'm incentivized to spend time on runcommand, when I'd rather spend it on WP-CLI. - -Ultimately, the challenge I'm running into is opportunity cost. I'd *love* to be able to invest more into WP-CLI, but doing so comes at the cost of other business pursuits. Because WP-CLI is such a large project, the several hours I volunteer each week are basically enough to fight entropy — not make headway on larger initiatives. - -The response to my tweet has been overwhelmingly supportive. One future I'm considering is directly commercializing WP-CLI, through patreon-esque membership, advertising on the website, and other ideas to be determined. - -So, dear reader, a question: how much is WP-CLI worth to you? - -* [$7,500/year](https://runcommand.memberful.com/checkout?plan=17529) -* [$4,000/year](https://runcommand.memberful.com/checkout?plan=17577) -* [$1,500/year](https://runcommand.memberful.com/checkout?plan=17528) -* [$750/year](https://runcommand.memberful.com/checkout?plan=17553) -* [$250/year](https://runcommand.memberful.com/checkout?plan=17552) -* [$100/year](https://runcommand.memberful.com/checkout?plan=17526) - -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 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. - -Happy to take any questions you might have: [daniel@runcommand.io](mailto:daniel@runcommand.io). I'll keep the list below updated as new questions come in. - -*** - -*Have you tried crowdfunding?* - -Yep! See the post I wrote, "[Using Kickstarter to fund open source](https://poststatus.com/kickstarter-open-source-project/)". Nadia Eghbal has a [series of great articles on open source sustainability](http://nadiaeghbal.com/oss) as well. - -*How much money do you want to see to consider this a success?* - -I have a number, but I'm not going to share it. I want to see if this is a viable approach for funding a for-profit business. - -*What if I want to pay a different amount?* - -[Email me](mailto:daniel@runcommand.io), and I'll create a purchase link for you. - -*Do I get anything special for paying the amount I paid?* - -Potentially, but nothing to announce at this point. - -I do have some ideas in mind for offerings at different levels (e.g. members-only support forum, feature prioritization, etc.). - -*Do I need to keep paying after I pay the first time?* - -Well, if everyone cancels, then the business will tank :) - -All levels are billed annually unless you disable automatic renewal. - -*What if I'm an existing runcommand customer?* - -If the experiment goes well, then `wp doctor` and `wp profile` will become completely open source. I'll reach out about the other aspects of your purchase. - -*What about scribu and Andreas?* - -I've been talking with them a bit. We're all very interested to see how this plays out. 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 deleted file mode 100644 index 41613db4..00000000 --- a/_posts/2016-12-28-supporting-the-future-of-wp-cli.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: post -author: m -title: Supporting the Future of wp-cli ---- - -*This post [originally appeared on make/core](https://make.wordpress.org/core/2016/12/28/supporting-the-future-of-wp-cli/).* - -wp-cli is a command-line interface that is deployed and relied upon by almost every major user of WordPress out there. As we head into 2017, I wanted to make that its future is certain for everyone who builds on it, and that the major contributors to the project, chiefly Daniel Bachhuber, are able to work on it even more in the coming year. - -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).) - -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). - -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. - -Many of the logistics are yet to be determined. Feel free to weigh in with questions, feedback, etc. in the comments, or join #cli on Slack. We’ll do our best to keep everyone in the loop as things develop. 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/config.mustache b/_templates/config.mustache index 640fbbd0..68246907 100644 --- a/_templates/config.mustache +++ b/_templates/config.mustache @@ -5,19 +5,9 @@ Default value: {{default}} - {{#flag}} - {{flag}} - {{/flag}} - {{^flag}} - Not available as a flag - {{/flag}} + {{config}} - {{#config}} - {{config}} - {{/config}} - {{^config}} - Not available as an option - {{/config}} + {{flag}} diff --git a/_templates/global-parameters.mustache b/_templates/global-parameters.mustache deleted file mode 100644 index 18d1c616..00000000 --- a/_templates/global-parameters.mustache +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/_templates/subcmd-list.mustache b/_templates/subcmd-list.mustache new file mode 100644 index 00000000..92a1d969 --- /dev/null +++ b/_templates/subcmd-list.mustache @@ -0,0 +1,29 @@ +--- +layout: default +title: 'wp {{synopsis}}' +--- + +`wp {{synopsis}}` - {{description}} + +{{{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..ca054c20 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,58 +10,40 @@ 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; } /* General & 'Reset' Stuff */ .container { - max-width: 880px; + width: 90%; + max-width: 800px; margin: 0 auto; - padding: 0 20px; } 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 { +h3 { font-weight: 600; } -.header-link { - text-decoration: none; - color: #BBB; - margin-left: 0.5em; - font-size: 0.6em; - display: none; -} - -.header-link:hover { - color: #292929; -} - -h1:hover .header-link, -h2:hover .header-link, -h3:hover .header-link, -h4:hover .header-link { - display: inline; -} - p { margin: .5em 0 1.1em 0; } @@ -102,12 +84,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: #aaa; + padding-left: 10px; + border-left: 1px dotted #666; } @@ -126,11 +105,7 @@ table { th, td { vertical-align: top; - padding: 12px 16px; -} - -tr:hover td { - background-color: #f9f9f9; + padding: 0.5em 1em; } th { @@ -177,15 +152,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 +166,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; @@ -218,13 +186,14 @@ pre { /* Inline code */ code { - padding-left: 0.3em; - padding-right: 0.3em; + padding: 0.3em 0.3em 0.2em 0.3em; + border-radius: .3em; + font-size: 1.05em; background: #444; } /* Oh I want SASS here */ h3 > code { - + display: inline-block; margin-bottom: 0.5em; padding-bottom: 0; @@ -267,8 +236,8 @@ img { /* Clearfix */ .cf:before, .cf:after { - content: ""; - display: table; + content:""; + display:table; } .cf:after { @@ -287,68 +256,68 @@ 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 -40px; + 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; - } +header h1 a { + color: #fff; + text-decoration: none } -@media (max-width: 690px) { - /* Avoid collision with the language selector */ - header h1 { - padding-top: 40px; - } +header h1 a:hover, +header h1 a:active { + color: #F7F7F7; } -header h1 img { - vertical-align: middle; +header h1:before { + content: ". / "; + + letter-spacing: 1px; } -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; - margin: 20px 10px 40px 10px; + font-size: 10px; + margin: 20px 10px 10px 10px; } -.main-nav, -.social-nav { +.main-nav { position: relative; } -.main-nav ul, -.social-nav ul { +.main-nav ul { list-style: none; } -.main-nav li, -.social-nav li { - float: left; +.main-nav li { text-align: center; margin: 0; } .main-nav li:first-child a { padding-left: 0; } -.main-nav a, -.social-nav a { +.main-nav a { display: block; padding: 8px 18px; color: #7AD03A; @@ -359,29 +328,17 @@ footer { color: #b5e853; } -.main-nav ul li:nth-child(5) a { - background-color: rgba(122, 208, 58, 0.5); - color: white; - border-radius: 5px; -} - -.main-nav ul li:nth-child(6) a:hover { - background-color: rgba(122, 208, 58, 0.75); - color: white; - border-radius: 5px; -} - .main-nav .active a { /* background: #202020; */ /* Not yet */ color: #f1f1f1; } /* Secondary main-nav */ -.social-nav li { +.main-nav .align-right { float: right; margin-left: .5em; } -.social-nav .rounded { +.main-nav .rounded { padding: 0; width: 1.8em; height: 1.8em; @@ -391,22 +348,8 @@ footer { background: #585858; color: #292929; } -.social-nav .rounded:hover { - color: #7AD03A; -} - -@media (max-width: 770px) { - .social-nav { - display: table; - margin: 0 auto; - padding-top: 5px; - min-width: 100px; - } - - .social-nav li { - float: none; - margin: 0 5px; - } +.main-nav .rounded:hover { + color: #7AD03A; } /* Search in header */ @@ -415,7 +358,7 @@ footer { width: 200px; background: #292929; color: #f1f1f1; - + -webkit-transition-duration: 400ms; -webkit-transition-property: width, background; -webkit-transition-timing-function: ease; @@ -433,8 +376,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; @@ -443,50 +384,26 @@ footer { /** * Main Content */ -body.display-global-parameters { - overflow-x: hidden; -} - -body.display-global-parameters #main_content { - width: 65%; - float: left; -} - -@media (max-width: 690px) { - body.display-global-parameters #main_content{ - width: 100%; - } -} #main_content { width: 100%; - padding: 0 20px; - margin: 0 -20px; - box-sizing: border-box; -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; } #main_content h2 { - font-size: 28px; + font-size: 24px; } #main_content h3 { - font-size: 24px; + font-size: 18px; } #main_content h4 { - font-size: 18px; + font-size: 14px; /*margin-top: .3em;*/ } @@ -503,95 +420,28 @@ body.display-global-parameters #main_content { /*margin: 0 0 .3em 0;*/ } -/** - * Global Parameters - */ - -.global-parameters { - width: 35%; - float: right; - margin: 0 -20px 40px -20px; - padding: 0 20px; - color: #888; - background: #fff; - font-size: 14px; - box-sizing: border-box; - padding-left: 30px -} - -@media (max-width: 690px) { - .global-parameters { - width: auto; - margin:0; - float: none; - padding-left: 40px; - padding-right: 40px; - } -} - - -.global-parameters h3{ - text-transform: uppercase; - color: #888; - font-weight: bold; - font-size: 16px; - margin-left: -20px; -} -.global-parameters code { - background: none; - display: block; - font-size: 14px; - color: #0074A2; - font-weight: bold; - text-shadow: none; - margin-left: -20px; -} - -.global-parameters p { - margin-bottom: 5px; -} - -/* Adjust visibility per page */ -body.command-line-interface-for-wordpress .global-parameters, -body.configuration .global-parameters{ - display: none; - background: green; -} - -body.configuration .global-parameters{ - display: none; - background: green; -} - - -.blog aside.global-parameters { - display: none; -} - -.command-line-interface-for-wordpress #main_content, -.blog #main_content { - width: 100%; -} /* Buttons */ .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 +458,9 @@ body.configuration .global-parameters{ } + + + /* Blog */ .hentry + .hentry { @@ -674,7 +527,7 @@ hr:after, padding-bottom: 1em; } -/* Announcement within posts */ +/* Accouncement within posts */ .announcement { padding: 0.3em 1em 0.5em 1em; margin-bottom: 1em; @@ -720,19 +573,6 @@ hr:after, width: 150px; } -/* i18n menu */ -.cf .container { - position: relative; -} - -.cf .container .languages { - position: absolute; - top: 0px; - right: 0px; - margin-right: 20px; -} - - @media screen and (-webkit-min-device-pixel-ratio:0) { header h2, .main-nav a { @@ -740,101 +580,17 @@ hr:after, } } -@media (max-width: 690px) { - .main-nav li:not(:nth-child(5)) a { - padding-left: 0; +@media (max-width: 800px) { + header h1 { + margin-left: 0; } - .main-nav li:nth-child(6) a { - padding-left: 9px; - padding-right: 9px; + .main-nav .align-right { + float: none; } } - -@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; - } +@media (max-width: 690px) { + .main-nav li a { + padding-left: 0; + } } \ No newline at end of file diff --git a/assets/img/bkg.png b/assets/img/bkg.png index defed2e8..fcebb5b2 100644 Binary files a/assets/img/bkg.png and b/assets/img/bkg.png differ diff --git a/assets/img/blacktocat.png b/assets/img/blacktocat.png index ef9eb78e..273d5710 100644 Binary files a/assets/img/blacktocat.png and b/assets/img/blacktocat.png differ 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/restful/gold/chrislema.png b/assets/img/restful/gold/chrislema.png deleted file mode 100644 index 5c409fde..00000000 Binary files a/assets/img/restful/gold/chrislema.png and /dev/null differ diff --git a/assets/img/restful/gold/humanmade.svg b/assets/img/restful/gold/humanmade.svg deleted file mode 100644 index d1984c3d..00000000 --- a/assets/img/restful/gold/humanmade.svg +++ /dev/null @@ -1,687 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/img/restful/gold/pagely.png b/assets/img/restful/gold/pagely.png deleted file mode 100644 index 130f6d48..00000000 Binary files a/assets/img/restful/gold/pagely.png and /dev/null differ diff --git a/assets/img/restful/gold/pantheon.png b/assets/img/restful/gold/pantheon.png deleted file mode 100644 index e4e9aa7f..00000000 Binary files a/assets/img/restful/gold/pantheon.png and /dev/null differ diff --git a/assets/img/restful/platinum/pressed.png b/assets/img/restful/platinum/pressed.png deleted file mode 100644 index ae601e82..00000000 Binary files a/assets/img/restful/platinum/pressed.png and /dev/null differ diff --git a/assets/img/restful/silver/godaddy.png b/assets/img/restful/silver/godaddy.png deleted file mode 100644 index 10b39480..00000000 Binary files a/assets/img/restful/silver/godaddy.png and /dev/null differ diff --git a/assets/img/restful/silver/jetpack.png b/assets/img/restful/silver/jetpack.png deleted file mode 100644 index 980b23e0..00000000 Binary files a/assets/img/restful/silver/jetpack.png and /dev/null differ diff --git a/assets/img/restful/silver/madewithlove.png b/assets/img/restful/silver/madewithlove.png deleted file mode 100644 index 66995aa3..00000000 Binary files a/assets/img/restful/silver/madewithlove.png and /dev/null differ diff --git a/assets/img/restful/silver/roots.svg b/assets/img/restful/silver/roots.svg deleted file mode 100644 index 2dca48a5..00000000 --- a/assets/img/restful/silver/roots.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/img/restful/silver/siteground.svg b/assets/img/restful/silver/siteground.svg deleted file mode 100644 index f76b7d21..00000000 --- a/assets/img/restful/silver/siteground.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/img/restful/silver/themeisle.png b/assets/img/restful/silver/themeisle.png deleted file mode 100644 index 788a1104..00000000 Binary files a/assets/img/restful/silver/themeisle.png and /dev/null differ diff --git a/assets/img/restful/silver/versionpress.png b/assets/img/restful/silver/versionpress.png deleted file mode 100644 index ae6b036f..00000000 Binary files a/assets/img/restful/silver/versionpress.png and /dev/null differ diff --git a/assets/img/restful/silver/wpengine.png b/assets/img/restful/silver/wpengine.png deleted file mode 100644 index 881570ad..00000000 Binary files a/assets/img/restful/silver/wpengine.png and /dev/null differ diff --git a/assets/img/restful/silver/yoast.png b/assets/img/restful/silver/yoast.png deleted file mode 100644 index bdd21f78..00000000 Binary files a/assets/img/restful/silver/yoast.png 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-man-page.png b/assets/img/wp-cli-man-page.png index ed046de1..daa4a911 100644 Binary files a/assets/img/wp-cli-man-page.png and b/assets/img/wp-cli-man-page.png 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/atom.xml b/atom.xml index f1ee8f6e..c29429ab 100644 --- a/atom.xml +++ b/atom.xml @@ -1,5 +1,5 @@ --- -layout: +layout: nil --- 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/canola.jpg b/behat-data/canola.jpg deleted file mode 100644 index a5651d80..00000000 Binary files a/behat-data/canola.jpg and /dev/null differ diff --git a/behat-data/codeispoetry.png b/behat-data/codeispoetry.png index 9f438226..c32981a3 100644 Binary files a/behat-data/codeispoetry.png and b/behat-data/codeispoetry.png differ diff --git a/behat-data/minimal-us-letter.pdf b/behat-data/minimal-us-letter.pdf deleted file mode 100644 index 7e7b75b8..00000000 Binary files a/behat-data/minimal-us-letter.pdf and /dev/null differ diff --git a/behat-data/test.pdf b/behat-data/test.pdf deleted file mode 100644 index 79b26dc6..00000000 Binary files a/behat-data/test.pdf 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 deleted file mode 100644 index cda05582..00000000 --- a/br/index.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -layout: default -title: Interface para linha de comando para o WordPress -direction: ltr ---- - -[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. - -A manutenção contínua é possível graças aos seguintes patrocinadores: - - - - - - - - -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) - -## 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: - -```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. -``` - -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: - -```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. - -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. - -## 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)). - -Antes de instalar a WP-CLI, tenha certeza de que seu ambiente cumpre os requisitos 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 - -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`: - -```bash -curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -Em seguida, verifique se o arquivo phar está funcionando: - -```bash -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: - -```bash -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: - -```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 -``` - -### 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`. - -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. - -### Autocompletar com tab - -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`: - -```bash -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: - -* [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) - -Se você não encontrou uma resposta em nenhum dos endereços acima, você pode: - -* 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. - -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. - -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. - -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. - -## 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 -/** - * 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 ); -``` - -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. - -## 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. - -**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. - -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. - -## Liderança - -A WP-CLI tem um responsável pelo projeto: [schlessera](https://github.com/schlessera). - -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. - -Leia o [documento sobre governança no manual](https://make.wordpress.org/cli/handbook/governance/) para mais detalhes operacionais do projeto. - -## Créditos - -Além das bibliotecas especificadas em [composer.json](/composer.json), usamos código ou ideias 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` -* [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/command.php b/command.php deleted file mode 100644 index a99bbe70..00000000 --- a/command.php +++ /dev/null @@ -1,69 +0,0 @@ - + + + Name + Description + + + + + add + Add a value to the object cache. + + + decr + Decrement a value in the object cache. + + + delete + Remove a value from the object cache. + + + flush + Flush the object cache. + + + get + Get a value from the object cache. + + + incr + Increment a value in the object cache. + + + replace + Replace an existing value in the object cache. + + + set + Set a value to the object cache. + + + type + Attempts to determine which object cache is being used. + + + diff --git a/commands/cache/replace/index.md b/commands/cache/replace/index.md index 920bf711..6475f419 100644 --- a/commands/cache/replace/index.md +++ b/commands/cache/replace/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/replace/ ---- \ No newline at end of file +layout: default +title: 'wp cache replace' +--- + +`wp cache replace` - Replace an existing value in the object cache. + + + diff --git a/commands/cache/set/index.md b/commands/cache/set/index.md index 28c99103..21561b26 100644 --- a/commands/cache/set/index.md +++ b/commands/cache/set/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/set/ ---- \ No newline at end of file +layout: default +title: 'wp cache set' +--- + +`wp cache set` - Set a value to the object cache. + + + diff --git a/commands/cache/type/index.md b/commands/cache/type/index.md index 0ed8cc83..bcebd50e 100644 --- a/commands/cache/type/index.md +++ b/commands/cache/type/index.md @@ -1,4 +1,11 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cache/type/ ---- \ No newline at end of file +layout: default +title: 'wp cache type' +--- + +`wp cache type` - Attempts to determine which object cache is being used. + +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. + diff --git a/commands/cap/add/index.md b/commands/cap/add/index.md index 9ec05e62..84e27652 100644 --- a/commands/cap/add/index.md +++ b/commands/cap/add/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/add/ ---- \ No newline at end of file +layout: default +title: 'wp cap add' +--- + +`wp cap add` - Add capabilities to a given role. + + + diff --git a/commands/cap/index.md b/commands/cap/index.md index 9a3cd08f..f82baa57 100644 --- a/commands/cap/index.md +++ b/commands/cap/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/ ---- \ No newline at end of file +layout: default +title: 'wp cap' +--- + +`wp cap` - Manage user capabilities. + +### EXAMPLES + + # Add 'spectate' capability to 'author' role + wp cap add 'author' 'spectate' + + # Add all caps from 'editor' role to 'author' role + wp cap list 'editor' | xargs wp cap add 'author' + + # Remove all caps from 'editor' role that also appear in 'author' role + wp cap list 'author' | xargs wp cap remove 'editor' + +### 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..173a30b5 100644 --- a/commands/cap/list/index.md +++ b/commands/cap/list/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/list/ ---- \ No newline at end of file +layout: default +title: 'wp cap list' +--- + +`wp cap list` - List capabilities for a given role. + +### EXAMPLES + + # Display alphabetical list of bbPress moderator capabilities + wp cap list 'bbp_moderator' | sort + diff --git a/commands/cap/remove/index.md b/commands/cap/remove/index.md index a88a4f31..ec43de82 100644 --- a/commands/cap/remove/index.md +++ b/commands/cap/remove/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cap/remove/ ---- \ No newline at end of file +layout: default +title: 'wp cap remove' +--- + +`wp cap remove` - Remove capabilities from a given role. + + + diff --git a/commands/cli/alias/index.md b/commands/cli/alias/index.md deleted file mode 100644 index 9a2df749..00000000 --- a/commands/cli/alias/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/alias/ ---- \ No newline at end of file diff --git a/commands/cli/check-update/index.md b/commands/cli/check-update/index.md index 6e7af947..5f6d58ec 100644 --- a/commands/cli/check-update/index.md +++ b/commands/cli/check-update/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/check-update/ ---- \ No newline at end of file +layout: default +title: 'wp cli check-update' +--- + +`wp cli check-update` - Check for update via Github API. Returns the available versions if there are updates, or empty if no update available. + +### OPTIONS + +[\--patch] +: Compare only the first two parts of the version number. + +[\--minor] +: 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>] +: Accepted values: table, csv, json, count. Default: table + diff --git a/commands/cli/cmd-dump/index.md b/commands/cli/cmd-dump/index.md index 0b6dcf46..b9057949 100644 --- a/commands/cli/cmd-dump/index.md +++ b/commands/cli/cmd-dump/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/cmd-dump/ ---- \ No newline at end of file +layout: default +title: 'wp cli cmd-dump' +--- + +`wp cli cmd-dump` - Dump the list of installed commands, as JSON. + + + diff --git a/commands/cli/completions/index.md b/commands/cli/completions/index.md index aaf88f6e..16ec4852 100644 --- a/commands/cli/completions/index.md +++ b/commands/cli/completions/index.md @@ -1,4 +1,15 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/completions/ ---- \ No newline at end of file +layout: default +title: 'wp cli completions' +--- + +`wp cli completions` - Generate tab completion strings. + +### 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 + diff --git a/commands/cli/index.md b/commands/cli/index.md index 030254ae..0245a207 100644 --- a/commands/cli/index.md +++ b/commands/cli/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/ ---- \ No newline at end of file +layout: default +title: 'wp cli' +--- + +`wp cli` - Get information about WP-CLI itself. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
check-updateCheck for update via Github API. Returns the available versions if there are updates, or empty if no update available.
cmd-dumpDump the list of installed commands, as JSON.
completionsGenerate tab completion strings.
infoPrint various data about the CLI environment.
param-dumpDump the list of global parameters, as JSON.
versionPrint WP-CLI version.
diff --git a/commands/cli/info/index.md b/commands/cli/info/index.md index 1aea9db2..6ee59af4 100644 --- a/commands/cli/info/index.md +++ b/commands/cli/info/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/info/ ---- \ No newline at end of file +layout: default +title: 'wp cli info' +--- + +`wp cli info` - Print various data about the CLI environment. + +### OPTIONS + +[\--format=<format>] +: Accepted values: json + diff --git a/commands/cli/param-dump/index.md b/commands/cli/param-dump/index.md index ceb354b3..3956280c 100644 --- a/commands/cli/param-dump/index.md +++ b/commands/cli/param-dump/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/param-dump/ ---- \ No newline at end of file +layout: default +title: 'wp cli param-dump' +--- + +`wp cli param-dump` - Dump the list of global parameters, as JSON. + + + diff --git a/commands/cli/update/index.md b/commands/cli/update/index.md deleted file mode 100644 index f1f62e51..00000000 --- a/commands/cli/update/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/update/ ---- \ No newline at end of file diff --git a/commands/cli/version/index.md b/commands/cli/version/index.md index e639b203..e109a7da 100644 --- a/commands/cli/version/index.md +++ b/commands/cli/version/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cli/version/ ---- \ No newline at end of file +layout: default +title: 'wp cli version' +--- + +`wp cli version` - Print WP-CLI version. + + + diff --git a/commands/comment/approve/index.md b/commands/comment/approve/index.md index ff2d7673..35aa81a8 100644 --- a/commands/comment/approve/index.md +++ b/commands/comment/approve/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/approve/ ---- \ No newline at end of file +layout: default +title: 'wp comment approve' +--- + +`wp comment approve` - Approve a comment. + +### OPTIONS + +<id> +: The ID of the comment to approve. + +### EXAMPLES + + wp comment approve 1337 + diff --git a/commands/comment/count/index.md b/commands/comment/count/index.md index 9a7e66f5..cf7017ed 100644 --- a/commands/comment/count/index.md +++ b/commands/comment/count/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/count/ ---- \ No newline at end of file +layout: default +title: 'wp comment count' +--- + +`wp comment count` - Count comments, on whole blog or on a given post. + +### OPTIONS + +[<post-id>] +: The ID of the post to count comments in. + +### EXAMPLES + + wp comment count + wp comment count 42 + diff --git a/commands/comment/create/index.md b/commands/comment/create/index.md index ca315bf5..23b6ac3f 100644 --- a/commands/comment/create/index.md +++ b/commands/comment/create/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/create/ ---- \ No newline at end of file +layout: default +title: 'wp comment create' +--- + +`wp comment create` - Insert a comment. + +### OPTIONS + +\--<field>=<value> +: Associative args for the new comment. See wp_insert_comment(). + +[\--porcelain] +: Output just the new comment id. + +### EXAMPLES + + wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli" + diff --git a/commands/comment/delete/index.md b/commands/comment/delete/index.md index 9a5c9c4f..bf1fa2dd 100644 --- a/commands/comment/delete/index.md +++ b/commands/comment/delete/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/delete/ ---- \ No newline at end of file +layout: default +title: 'wp comment delete' +--- + +`wp comment delete` - Delete a comment. + +### OPTIONS + +<id>... +: One or more IDs of comments to delete. + +[\--force] +: Skip the trash bin. + +### EXAMPLES + + wp comment delete 1337 --force + + wp comment delete 1337 2341 --force + diff --git a/commands/comment/exists/index.md b/commands/comment/exists/index.md index 94f93bb4..6293f44a 100644 --- a/commands/comment/exists/index.md +++ b/commands/comment/exists/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/exists/ ---- \ No newline at end of file +layout: default +title: 'wp comment exists' +--- + +`wp comment exists` - Verify whether a comment exists. + +### OPTIONS + +<id> +: The ID of the comment to check. + +### EXAMPLES + + wp comment exists 1337 + diff --git a/commands/comment/generate/index.md b/commands/comment/generate/index.md deleted file mode 100644 index 39debe61..00000000 --- a/commands/comment/generate/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/generate/ ---- \ No newline at end of file diff --git a/commands/comment/get/index.md b/commands/comment/get/index.md index 63ca9405..5981f434 100644 --- a/commands/comment/get/index.md +++ b/commands/comment/get/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/get/ ---- \ No newline at end of file +layout: default +title: 'wp comment get' +--- + +`wp comment get` - Get a single comment. + +### OPTIONS + +<id> +: The comment to get. + +[\--field=<field>] +: Instead of returning the whole comment, returns the value of a single field. + +[\--format=<format>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + wp comment get 1 --field=content + diff --git a/commands/comment/index.md b/commands/comment/index.md index c1b96fc4..1f9b053a 100644 --- a/commands/comment/index.md +++ b/commands/comment/index.md @@ -1,4 +1,88 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/ ---- \ No newline at end of file +layout: default +title: 'wp comment' +--- + +`wp comment` - Manage comments. + +### EXAMPLES + + # delete all spam comments. + wp comment delete $(wp comment list --status=spam --format=ids) + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
approveApprove a comment.
countCount comments, on whole blog or on a given post.
createInsert a comment.
deleteDelete a comment.
existsVerify whether a comment exists.
getGet a single comment.
listGet a list of comments.
metaManage comment custom fields.
spamSpam a comment.
statusGet status of a comment.
trashTrash a comment.
unapproveUnapprove a comment.
unspamUnspam a comment.
untrashUntrash a comment.
updateUpdate one or more comments.
urlGet comment url
diff --git a/commands/comment/list/index.md b/commands/comment/list/index.md index 316c0dcf..04fc49f5 100644 --- a/commands/comment/list/index.md +++ b/commands/comment/list/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/list/ ---- \ No newline at end of file +layout: default +title: 'wp comment list' +--- + +`wp comment list` - Get a list of comments. + +### 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>] +: Accepted values: table, csv, json, count. Default: table + +### 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 + +### EXAMPLES + + wp comment list --field=ID + + wp comment list --post_id=2 + + wp comment list --number=20 --status=approve + diff --git a/commands/comment/meta/add/index.md b/commands/comment/meta/add/index.md index edb127d4..34da8dd7 100644 --- a/commands/comment/meta/add/index.md +++ b/commands/comment/meta/add/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta add' +--- + +`wp comment meta add` - Add a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/comment/meta/delete/index.md b/commands/comment/meta/delete/index.md index 0f699649..c42766a8 100644 --- a/commands/comment/meta/delete/index.md +++ b/commands/comment/meta/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta delete' +--- + +`wp comment meta delete` - Delete a meta field. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + diff --git a/commands/comment/meta/get/index.md b/commands/comment/meta/get/index.md index 6458617e..87255364 100644 --- a/commands/comment/meta/get/index.md +++ b/commands/comment/meta/get/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta get' +--- + +`wp comment meta get` - Get meta field value. + + + diff --git a/commands/comment/meta/index.md b/commands/comment/meta/index.md index b5c7ea6b..a5af8923 100644 --- a/commands/comment/meta/index.md +++ b/commands/comment/meta/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta' +--- + +`wp comment meta` - Manage comment custom fields. + +### OPTIONS + +\--format=json +: Encode/decode values as JSON. + +### EXAMPLES + + wp comment meta set 123 description "Mary is a WordPress developer." + +### 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..4931ab8c 100644 --- a/commands/comment/meta/list/index.md +++ b/commands/comment/meta/list/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta list' +--- + +`wp comment meta list` - List all metadata associated with an object. + +<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..cc466fca 100644 --- a/commands/comment/meta/update/index.md +++ b/commands/comment/meta/update/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp comment meta update' +--- + +`wp comment meta update` - Update a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/comment/recount/index.md b/commands/comment/recount/index.md deleted file mode 100644 index f1395902..00000000 --- a/commands/comment/recount/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/recount/ ---- \ No newline at end of file diff --git a/commands/comment/spam/index.md b/commands/comment/spam/index.md index a0c34585..9cc406ce 100644 --- a/commands/comment/spam/index.md +++ b/commands/comment/spam/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/spam/ ---- \ No newline at end of file +layout: default +title: 'wp comment spam' +--- + +`wp comment spam` - Spam a comment. + +### OPTIONS + +<id> +: The ID of the comment to mark as spam. + +### EXAMPLES + + wp comment spam 1337 + diff --git a/commands/comment/status/index.md b/commands/comment/status/index.md index 9f1c5e3f..c6b1509e 100644 --- a/commands/comment/status/index.md +++ b/commands/comment/status/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/status/ ---- \ No newline at end of file +layout: default +title: 'wp comment status' +--- + +`wp comment status` - Get status of a comment. + +### OPTIONS + +<id> +: The ID of the comment to check. + +### EXAMPLES + + wp comment status 1337 + diff --git a/commands/comment/trash/index.md b/commands/comment/trash/index.md index d6489354..cddda0e1 100644 --- a/commands/comment/trash/index.md +++ b/commands/comment/trash/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/trash/ ---- \ No newline at end of file +layout: default +title: 'wp comment trash' +--- + +`wp comment trash` - Trash a comment. + +### OPTIONS + +<id> +: The ID of the comment to trash. + +### EXAMPLES + + wp comment trash 1337 + diff --git a/commands/comment/unapprove/index.md b/commands/comment/unapprove/index.md index 5006dfb3..9c245b5d 100644 --- a/commands/comment/unapprove/index.md +++ b/commands/comment/unapprove/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/unapprove/ ---- \ No newline at end of file +layout: default +title: 'wp comment unapprove' +--- + +`wp comment unapprove` - Unapprove a comment. + +### OPTIONS + +<id> +: The ID of the comment to unapprove. + +### EXAMPLES + + wp comment unapprove 1337 + diff --git a/commands/comment/unspam/index.md b/commands/comment/unspam/index.md index 115f0194..0c31abc3 100644 --- a/commands/comment/unspam/index.md +++ b/commands/comment/unspam/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/unspam/ ---- \ No newline at end of file +layout: default +title: 'wp comment unspam' +--- + +`wp comment unspam` - Unspam a comment. + +### OPTIONS + +<id> +: The ID of the comment to unmark as spam. + +### EXAMPLES + + wp comment unspam 1337 + diff --git a/commands/comment/untrash/index.md b/commands/comment/untrash/index.md index 623aec36..885510d1 100644 --- a/commands/comment/untrash/index.md +++ b/commands/comment/untrash/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/untrash/ ---- \ No newline at end of file +layout: default +title: 'wp comment untrash' +--- + +`wp comment untrash` - Untrash a comment. + +### OPTIONS + +<id> +: The ID of the comment to untrash. + +### EXAMPLES + + wp comment untrash 1337 + diff --git a/commands/comment/update/index.md b/commands/comment/update/index.md index 735eefde..d33c8526 100644 --- a/commands/comment/update/index.md +++ b/commands/comment/update/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/comment/update/ ---- \ No newline at end of file +layout: default +title: 'wp comment update' +--- + +`wp comment update` - Update one or more comments. + +### OPTIONS + +<id>... +: One or more IDs of comments to update. + +\--<field>=<value> +: One or more fields to update. See wp_update_comment(). + +### EXAMPLES + + wp comment update 123 --comment_author='That Guy' + diff --git a/commands/comment/url/index.md b/commands/comment/url/index.md new file mode 100644 index 00000000..b96c4836 --- /dev/null +++ b/commands/comment/url/index.md @@ -0,0 +1,16 @@ +--- +layout: default +title: 'wp comment url' +--- + +`wp comment url` - Get comment url + +### OPTIONS + +<id>... +: One or more IDs of comments to get the URL. + +### EXAMPLES + + wp comment url 123 + diff --git a/commands/core/check-update/index.md b/commands/core/check-update/index.md index e140a369..f01de6a6 100644 --- a/commands/core/check-update/index.md +++ b/commands/core/check-update/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/check-update/ ---- \ No newline at end of file +layout: default +title: 'wp core check-update' +--- + +`wp core check-update` - Check for update via Version Check API. Returns latest version if there's an update, or empty if no update available. + +### 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>] +: Accepted values: table, csv, json. Default: table + diff --git a/commands/core/config/index.md b/commands/core/config/index.md index 8549546c..cfe4a75b 100644 --- a/commands/core/config/index.md +++ b/commands/core/config/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/config/ ---- \ No newline at end of file +layout: default +title: 'wp core config' +--- + +`wp core config` - Generate a wp-config.php file. + +### 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. + +### EXAMPLES + + # Standard wp-config.php file + wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO + + # Enable WP_DEBUG and WP_DEBUG_LOG + wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php < + + + Name + Description + + + + + check-update + Check for update via Version Check API. Returns latest version if there's an update, or empty if no update available. + + + config + Generate a wp-config.php file. + + + download + Download core WordPress files. + + + install + Create the WordPress tables in the database. + + + is-installed + Determine if the WordPress tables are installed. + + + language + + + + multisite-convert + Transform a single-site install into a multi-site install. + + + multisite-install + Install multisite from scratch. + + + update + Update WordPress. + + + update-db + Update the WordPress database. + + + verify-checksums + Verify WordPress files against WordPress.org's checksums. + + + version + Display 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..aa3ec2e9 100644 --- a/commands/core/install/index.md +++ b/commands/core/install/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/install/ ---- \ No newline at end of file +layout: default +title: 'wp core install' +--- + +`wp core install` - Create the WordPress tables in the database. + +### 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. + +\--admin_email=<email> +: The email address for the admin user. + diff --git a/commands/core/is-installed/index.md b/commands/core/is-installed/index.md index 42222529..86f9b4be 100644 --- a/commands/core/is-installed/index.md +++ b/commands/core/is-installed/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp core is-installed' +--- + +`wp core is-installed` - Determine if the WordPress tables are installed. + +[\--network] +: Check if this is a multisite install + +### EXAMPLES + + 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..59a98351 100644 --- a/commands/core/language/activate/index.md +++ b/commands/core/language/activate/index.md @@ -1,4 +1,10 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/activate/ ---- \ No newline at end of file +layout: default +title: 'wp core language activate' +--- + +`wp core language activate` - Activate a given language. + +<language> +: Language code to activate. + diff --git a/commands/core/language/index.md b/commands/core/language/index.md index 49fd5b91..2ead41d9 100644 --- a/commands/core/language/index.md +++ b/commands/core/language/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/ ---- \ No newline at end of file +layout: default +title: 'wp core language' +--- + +`wp core language` - + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
activateActivate a given language.
installInstall a given language.
listList all languages available.
uninstallUninstall a given language.
diff --git a/commands/core/language/install/index.md b/commands/core/language/install/index.md index 351f9981..aded0175 100644 --- a/commands/core/language/install/index.md +++ b/commands/core/language/install/index.md @@ -1,4 +1,10 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/install/ ---- \ No newline at end of file +layout: default +title: 'wp core language install' +--- + +`wp core language install` - Install a given language. + +<language> +: Language code to install. + diff --git a/commands/core/language/list/index.md b/commands/core/language/list/index.md index fdcf14d7..7abc63c7 100644 --- a/commands/core/language/list/index.md +++ b/commands/core/language/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/list/ ---- \ No newline at end of file +layout: default +title: 'wp core language list' +--- + +`wp core language list` - List all languages available. + +[\--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 +* updated + +These fields are optionally available: + +* version +* package + diff --git a/commands/core/language/uninstall/index.md b/commands/core/language/uninstall/index.md index 3f3af547..ae10263a 100644 --- a/commands/core/language/uninstall/index.md +++ b/commands/core/language/uninstall/index.md @@ -1,4 +1,10 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/uninstall/ ---- \ No newline at end of file +layout: default +title: 'wp core language uninstall' +--- + +`wp core language uninstall` - Uninstall a given language. + +<language> +: Language code to uninstall. + diff --git a/commands/core/language/update/index.md b/commands/core/language/update/index.md deleted file mode 100644 index c9b24b05..00000000 --- a/commands/core/language/update/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/language/update/ ---- \ No newline at end of file diff --git a/commands/core/multisite-convert/index.md b/commands/core/multisite-convert/index.md index ae58e516..4f9eb6ad 100644 --- a/commands/core/multisite-convert/index.md +++ b/commands/core/multisite-convert/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/multisite-convert/ ---- \ No newline at end of file +layout: default +title: 'wp core multisite-convert' +--- + +`wp core multisite-convert` - Transform a single-site install into a multi-site install. + +### 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. + diff --git a/commands/core/multisite-install/index.md b/commands/core/multisite-install/index.md index 24524dd4..12f5b4fe 100644 --- a/commands/core/multisite-install/index.md +++ b/commands/core/multisite-install/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/multisite-install/ ---- \ No newline at end of file +layout: default +title: 'wp core multisite-install' +--- + +`wp core multisite-install` - Install multisite from scratch. + +### 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. + +\--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. + +\--admin_email=<email> +: The email address for the admin user. + diff --git a/commands/core/update-db/index.md b/commands/core/update-db/index.md index 3a1b2654..3ba7891c 100644 --- a/commands/core/update-db/index.md +++ b/commands/core/update-db/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/update-db/ ---- \ No newline at end of file +layout: default +title: 'wp core update-db' +--- + +`wp core update-db` - Update the WordPress database. + + + diff --git a/commands/core/update/index.md b/commands/core/update/index.md index e3e875bb..5d4cf7e7 100644 --- a/commands/core/update/index.md +++ b/commands/core/update/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/update/ ---- \ No newline at end of file +layout: default +title: 'wp core update' +--- + +`wp core update` - Update WordPress. + +### OPTIONS + +[<zip>] +: Path to zip file to use, instead of downloading from wordpress.org. + +[\--version=<version>] +: Update to this version, instead of to the latest version. + +[\--force] +: Update even when installed WP version is greater than the requested version. + +[\--locale=<locale>] +: Select which language you want to download. + +### EXAMPLES + + wp core update + + wp core update --version=3.8 ../latest.zip + + wp core update --version=3.1 --force + diff --git a/commands/core/verify-checksums/index.md b/commands/core/verify-checksums/index.md index f9cbb898..e5f90d0d 100644 --- a/commands/core/verify-checksums/index.md +++ b/commands/core/verify-checksums/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/verify-checksums/ ---- \ No newline at end of file +layout: default +title: 'wp core verify-checksums' +--- + +`wp core verify-checksums` - Verify WordPress files against WordPress.org's checksums. + + + diff --git a/commands/core/version/index.md b/commands/core/version/index.md index f872eb73..c590b59b 100644 --- a/commands/core/version/index.md +++ b/commands/core/version/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/core/version/ ---- \ No newline at end of file +layout: default +title: 'wp core version' +--- + +`wp core version` - Display the WordPress version. + +### OPTIONS + +[\--extra] +: Show extended version information. + diff --git a/commands/cron/event/delete/index.md b/commands/cron/event/delete/index.md index 4b18d472..fceee773 100644 --- a/commands/cron/event/delete/index.md +++ b/commands/cron/event/delete/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/delete/ ---- \ No newline at end of file +layout: default +title: 'wp cron event delete' +--- + +`wp cron event delete` - Delete the next scheduled cron event for the given hook. + +### OPTIONS + +<hook> +: The hook name + diff --git a/commands/cron/event/index.md b/commands/cron/event/index.md index 37737729..34740fe4 100644 --- a/commands/cron/event/index.md +++ b/commands/cron/event/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/ ---- \ No newline at end of file +layout: default +title: 'wp cron event' +--- + +`wp cron event` - Manage WP-Cron events. + + + +### 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..a2ca3b01 100644 --- a/commands/cron/event/list/index.md +++ b/commands/cron/event/list/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/list/ ---- \ No newline at end of file +layout: default +title: 'wp cron event list' +--- + +`wp cron event list` - List scheduled cron events. + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, json, csv, ids. Default: table. + +### 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 + + wp cron event list + + wp cron event list --fields=hook,next_run --format=json + diff --git a/commands/cron/event/run/index.md b/commands/cron/event/run/index.md index a5e53006..efc0d961 100644 --- a/commands/cron/event/run/index.md +++ b/commands/cron/event/run/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/run/ ---- \ No newline at end of file +layout: default +title: 'wp cron event run' +--- + +`wp cron event run` - Run the next scheduled cron event for the given hook. + +### OPTIONS + +<hook> +: The hook name + diff --git a/commands/cron/event/schedule/index.md b/commands/cron/event/schedule/index.md index f817198b..908d71b8 100644 --- a/commands/cron/event/schedule/index.md +++ b/commands/cron/event/schedule/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/event/schedule/ ---- \ No newline at end of file +layout: default +title: 'wp cron event schedule' +--- + +`wp cron event schedule` - Schedule a new cron event. + +### 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 + + wp cron event schedule cron_test + + wp cron event schedule cron_test now hourly + + wp cron event schedule cron_test '+1 hour' --foo=1 --bar=2 + diff --git a/commands/cron/index.md b/commands/cron/index.md index ab003276..da96c29e 100644 --- a/commands/cron/index.md +++ b/commands/cron/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/ ---- \ No newline at end of file +layout: default +title: 'wp cron' +--- + +`wp cron` - Manage WP-Cron events and schedules. + + + +### 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..71d18ef4 100644 --- a/commands/cron/schedule/index.md +++ b/commands/cron/schedule/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/schedule/ ---- \ No newline at end of file +layout: default +title: 'wp cron schedule' +--- + +`wp cron schedule` - Manage WP-Cron schedules. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
NameDescription
listList available cron schedules.
diff --git a/commands/cron/schedule/list/index.md b/commands/cron/schedule/list/index.md index 88ba00e3..aac5f11d 100644 --- a/commands/cron/schedule/list/index.md +++ b/commands/cron/schedule/list/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/schedule/list/ ---- \ No newline at end of file +layout: default +title: 'wp cron schedule list' +--- + +`wp cron schedule list` - List available cron schedules. + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, json, csv, ids. Default: table. + +### AVAILABLE FIELDS + +These fields will be displayed by default for each cron schedule: + +* name +* display +* interval + +There are no additional fields. + +### EXAMPLES + + wp cron schedule list + + wp cron schedule list --fields=name --format=ids + diff --git a/commands/cron/test/index.md b/commands/cron/test/index.md index d14bef75..797a7c80 100644 --- a/commands/cron/test/index.md +++ b/commands/cron/test/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/cron/test/ ---- \ No newline at end of file +layout: default +title: 'wp cron test' +--- + +`wp cron test` - Test the WP Cron spawning system and report back its status. + + + diff --git a/commands/db/check/index.md b/commands/db/check/index.md deleted file mode 100644 index 836e72bb..00000000 --- a/commands/db/check/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/check/ ---- \ No newline at end of file diff --git a/commands/db/cli/index.md b/commands/db/cli/index.md index 3e83634c..3e08d7b8 100644 --- a/commands/db/cli/index.md +++ b/commands/db/cli/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/cli/ ---- \ No newline at end of file +layout: default +title: 'wp db cli' +--- + +`wp db cli` - Open a mysql console using the WordPress credentials. + + + diff --git a/commands/db/create/index.md b/commands/db/create/index.md index c502d99b..8cd18832 100644 --- a/commands/db/create/index.md +++ b/commands/db/create/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/create/ ---- \ No newline at end of file +layout: default +title: 'wp db create' +--- + +`wp db create` - Create the database, as specified in wp-config.php + + + diff --git a/commands/db/drop/index.md b/commands/db/drop/index.md index 69957c56..ff04958e 100644 --- a/commands/db/drop/index.md +++ b/commands/db/drop/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/drop/ ---- \ No newline at end of file +layout: default +title: 'wp db drop' +--- + +`wp db drop` - Delete the database. + +### OPTIONS + +[\--yes] +: Answer yes to the confirmation message. + diff --git a/commands/db/export/index.md b/commands/db/export/index.md index c05d048e..cd986abd 100644 --- a/commands/db/export/index.md +++ b/commands/db/export/index.md @@ -1,4 +1,23 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/export/ ---- \ No newline at end of file +layout: default +title: 'wp db export' +--- + +`wp db export` - Exports the database to a file or to STDOUT. + +### 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 + +### EXAMPLES + + wp db export --add-drop-table + wp db export --tables=wp_options,wp_users + diff --git a/commands/db/import/index.md b/commands/db/import/index.md index 74b6bd5f..2da8ecde 100644 --- a/commands/db/import/index.md +++ b/commands/db/import/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/import/ ---- \ No newline at end of file +layout: default +title: 'wp db import' +--- + +`wp db import` - Import database from a file or from STDIN. + +### OPTIONS + +[<file>] +: The name of the SQL file to import. If '-', then reads from STDIN. If omitted, it will look for '{dbname}.sql'. + diff --git a/commands/db/index.md b/commands/db/index.md index 9eb8483c..45cf52ef 100644 --- a/commands/db/index.md +++ b/commands/db/index.md @@ -1,4 +1,61 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/ ---- \ No newline at end of file +layout: default +title: 'wp db' +--- + +`wp db` - Perform basic database operations. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
cliOpen a mysql console using the WordPress credentials.
createCreate the database, as specified in wp-config.php
dropDelete the database.
exportExports the database to a file or to STDOUT.
importImport database from a file or from STDIN.
optimizeOptimize the database.
queryExecute a 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..e44c5764 100644 --- a/commands/db/optimize/index.md +++ b/commands/db/optimize/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/optimize/ ---- \ No newline at end of file +layout: default +title: 'wp db optimize' +--- + +`wp db optimize` - Optimize the database. + + + diff --git a/commands/db/query/index.md b/commands/db/query/index.md index 7cbfb232..5d071e1a 100644 --- a/commands/db/query/index.md +++ b/commands/db/query/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/query/ ---- \ No newline at end of file +layout: default +title: 'wp db query' +--- + +`wp db query` - Execute a query against the database. + +### OPTIONS + +[<sql>] +: A SQL query. If not passed, will try to read from STDIN. + +### EXAMPLES + + # execute a query stored in a file + wp db query < debug.sql + diff --git a/commands/db/repair/index.md b/commands/db/repair/index.md index 4bb09152..ee88ec98 100644 --- a/commands/db/repair/index.md +++ b/commands/db/repair/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/repair/ ---- \ No newline at end of file +layout: default +title: 'wp db repair' +--- + +`wp db repair` - Repair the database. + + + diff --git a/commands/db/reset/index.md b/commands/db/reset/index.md index ea4e3970..2477d2c4 100644 --- a/commands/db/reset/index.md +++ b/commands/db/reset/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/reset/ ---- \ No newline at end of file +layout: default +title: 'wp db reset' +--- + +`wp db reset` - Remove all tables from the database. + +### OPTIONS + +[\--yes] +: Answer yes to the confirmation message. + diff --git a/commands/db/tables/index.md b/commands/db/tables/index.md index d35d47d1..f7379163 100644 --- a/commands/db/tables/index.md +++ b/commands/db/tables/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/db/tables/ ---- \ No newline at end of file +layout: default +title: 'wp db tables' +--- + +`wp db tables` - List the database tables. + +### OPTIONS + +[\--scope=<scope>] +: Can be all, global, ms_global, blog, or old tables. Defaults to all. + +### EXAMPLES + + # Export only tables for a single site + wp db export --tables=$(wp db tables --url=sub.example.com | tr '\n' ',') + diff --git a/commands/eval-file/index.md b/commands/eval-file/index.md index 99da8219..142d6410 100644 --- a/commands/eval-file/index.md +++ b/commands/eval-file/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/eval-file/ ---- \ No newline at end of file +layout: default +title: 'wp eval-file' +--- + +`wp eval-file` - Load and execute a PHP file after loading WordPress. + +### 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. + +### EXAMPLES + + wp eval-file my-code.php value1 value2 + diff --git a/commands/eval/index.md b/commands/eval/index.md index 133cbdfa..ddc41027 100644 --- a/commands/eval/index.md +++ b/commands/eval/index.md @@ -1,4 +1,11 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/eval/ ---- \ No newline at end of file +layout: default +title: 'wp eval' +--- + +`wp eval` - Execute arbitrary PHP code after loading WordPress. + +### EXAMPLES + + wp eval 'echo WP_CONTENT_DIR;' + diff --git a/commands/export/index.md b/commands/export/index.md index 03d5c2bf..b040f864 100644 --- a/commands/export/index.md +++ b/commands/export/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/export/ ---- \ No newline at end of file +layout: default +title: 'wp export' +--- + +`wp export` - Export content to a WXR file. + +### OPTIONS + +[\--dir=<dirname>] +: Full path to directory where WXR export files should be stored. Defaults +to current working directory. + +[\--skip_comments] +: Don't export comments. + +[\--max_file_size=<MB>] +: A single export file should have this many megabytes. + +### 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. Defaults to all. + +[\--post__in=<pid>] +: Export all posts specified as a comma-separated list of IDs. + +[\--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. + +### EXAMPLES + + wp export --dir=/tmp/ --user=admin --post_type=post --start_date=2011-01-01 --end_date=2011-12-31 + + wp export --dir=/tmp/ --post__in=123,124,125 + diff --git a/commands/help/index.md b/commands/help/index.md index 572ea263..5d97db4f 100644 --- a/commands/help/index.md +++ b/commands/help/index.md @@ -1,4 +1,15 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/help/ ---- \ No newline at end of file +layout: default +title: 'wp help' +--- + +`wp help` - Get help on a certain 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..8723a003 100644 --- a/commands/import/index.md +++ b/commands/import/index.md @@ -1,4 +1,18 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/import/ ---- \ No newline at end of file +layout: default +title: 'wp import' +--- + +`wp import` - Import content from a WXR file. + +### 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). + diff --git a/commands/index.html b/commands/index.html new file mode 100644 index 00000000..91fb29a3 --- /dev/null +++ b/commands/index.html @@ -0,0 +1,18 @@ +--- +layout: default +title: Built-in Commands +--- + + + + + + + + + + {% 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..d7ac8f69 100644 --- a/commands/media/import/index.md +++ b/commands/media/import/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/import/ ---- \ No newline at end of file +layout: default +title: 'wp media import' +--- + +`wp media import` - Create attachments from local files or from URLs. + +### 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 + + # 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 + + # 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" + diff --git a/commands/media/index.md b/commands/media/index.md index 3d6aaba6..654eafd4 100644 --- a/commands/media/index.md +++ b/commands/media/index.md @@ -1,4 +1,29 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/ ---- \ No newline at end of file +layout: default +title: 'wp media' +--- + +`wp media` - Manage attachments. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + +
NameDescription
importCreate attachments from local files or from URLs.
regenerateRegenerate thumbnail(s).
diff --git a/commands/media/regenerate/index.md b/commands/media/regenerate/index.md index 421570e0..dbd2e01f 100644 --- a/commands/media/regenerate/index.md +++ b/commands/media/regenerate/index.md @@ -1,4 +1,23 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/media/regenerate/ ---- \ No newline at end of file +layout: default +title: 'wp media regenerate' +--- + +`wp media regenerate` - Regenerate thumbnail(s). + +### OPTIONS + +[<attachment-id>...] +: One or more IDs of the attachments to regenerate. + +[\--yes] +: Answer yes to the confirmation message. + +### EXAMPLES + + # re-generate all thumbnails, without confirmation + wp media regenerate --yes + + # re-generate all thumbnails that have IDs between 1000 and 2000 + seq 1000 2000 | xargs wp media regenerate + diff --git a/commands/menu/create/index.md b/commands/menu/create/index.md index 328f015f..aa152aba 100644 --- a/commands/menu/create/index.md +++ b/commands/menu/create/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/create/ ---- \ No newline at end of file +layout: default +title: 'wp menu create' +--- + +`wp menu create` - Create a new menu + +<menu-name> +: A descriptive name for the menu + +[\--porcelain] +: Output just the new menu id. + +### EXAMPLES + + wp menu create "My Menu" + diff --git a/commands/menu/delete/index.md b/commands/menu/delete/index.md index a82ae40d..3d1668ee 100644 --- a/commands/menu/delete/index.md +++ b/commands/menu/delete/index.md @@ -1,4 +1,14 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/delete/ ---- \ No newline at end of file +layout: default +title: 'wp menu delete' +--- + +`wp menu delete` - Delete one or more menus + +<menu>... +: The name, slug, or term ID for the menu(s) + +### EXAMPLES + + wp menu delete "My Menu" + diff --git a/commands/menu/index.md b/commands/menu/index.md index ef050659..4e9662f4 100644 --- a/commands/menu/index.md +++ b/commands/menu/index.md @@ -1,4 +1,53 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/ ---- \ No newline at end of file +layout: default +title: 'wp menu' +--- + +`wp menu` - List, create, assign, and delete menus + +### EXAMPLES + + # Create a new menu + wp menu create "My Menu" + + # List existing menus + wp menu list + + # Create a new menu link item + wp menu item add-custom sidebar-menu Apple http://apple.com --porcelain + + # Assign the 'primary-menu' menu to the 'primary' location + wp menu location assign primary-menu primary + +### 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..fd038e1d 100644 --- a/commands/menu/item/add-custom/index.md +++ b/commands/menu/item/add-custom/index.md @@ -1,4 +1,41 @@ --- -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' +--- + +`wp menu item add-custom` - Add a custom menu item + +<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 --porcelain + diff --git a/commands/menu/item/add-post/index.md b/commands/menu/item/add-post/index.md index 9f20940e..01187919 100644 --- a/commands/menu/item/add-post/index.md +++ b/commands/menu/item/add-post/index.md @@ -1,4 +1,44 @@ --- -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' +--- + +`wp menu item add-post` - Add a post as a menu item + +<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" + diff --git a/commands/menu/item/add-term/index.md b/commands/menu/item/add-term/index.md index da0b9d23..f35eb9ce 100644 --- a/commands/menu/item/add-term/index.md +++ b/commands/menu/item/add-term/index.md @@ -1,4 +1,47 @@ --- -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' +--- + +`wp menu item add-term` - Add a taxonomy term as a menu item + +<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 + diff --git a/commands/menu/item/delete/index.md b/commands/menu/item/delete/index.md index 7c748e70..b2f0f872 100644 --- a/commands/menu/item/delete/index.md +++ b/commands/menu/item/delete/index.md @@ -1,4 +1,14 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/delete/ ---- \ No newline at end of file +layout: default +title: 'wp menu item delete' +--- + +`wp menu item delete` - Delete one or more items from a menu + +<db-id>... +: Database ID for the menu item(s). + +### EXAMPLES + + wp menu item remove 45 + diff --git a/commands/menu/item/index.md b/commands/menu/item/index.md index f09f1f86..23bd460e 100644 --- a/commands/menu/item/index.md +++ b/commands/menu/item/index.md @@ -1,4 +1,51 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/ ---- \ No newline at end of file +layout: default +title: 'wp menu item' +--- + +`wp menu item` - List, add, and delete items associated with a menu + +### EXAMPLES + + # Add an existing post to an existing menu + wp menu item add-post sidebar-menu 33 --title="Custom Test Post" + + # Create a new menu link item + wp menu item add-custom sidebar-menu Apple http://apple.com --porcelain + +### 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..7f50e5d4 100644 --- a/commands/menu/item/list/index.md +++ b/commands/menu/item/list/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu item list' +--- + +`wp menu item list` - Get a list of items associated with a menu + +### OPTIONS + +<menu> +: The name, slug, or term ID for the menu + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### 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 <menu> + diff --git a/commands/menu/item/update/index.md b/commands/menu/item/update/index.md index 01b68582..1b0fff33 100644 --- a/commands/menu/item/update/index.md +++ b/commands/menu/item/update/index.md @@ -1,4 +1,38 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/item/update/ ---- \ No newline at end of file +layout: default +title: 'wp menu item update' +--- + +`wp menu item update` - Update a menu item + +<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 + diff --git a/commands/menu/list/index.md b/commands/menu/list/index.md index fded4a73..606683d3 100644 --- a/commands/menu/list/index.md +++ b/commands/menu/list/index.md @@ -1,4 +1,37 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu list' +--- + +`wp menu list` - Get a list of menus. + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### 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 + diff --git a/commands/menu/location/assign/index.md b/commands/menu/location/assign/index.md index 9c746201..db140ab4 100644 --- a/commands/menu/location/assign/index.md +++ b/commands/menu/location/assign/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/assign/ ---- \ No newline at end of file +layout: default +title: 'wp menu location assign' +--- + +`wp menu location assign` - Assign a location to a menu + +<menu> +: The name, slug, or term ID for the menu + +<location> +: Location's slug + +### EXAMPLES + + wp menu location assign primary-menu primary + diff --git a/commands/menu/location/index.md b/commands/menu/location/index.md index c66f02e5..a64862a5 100644 --- a/commands/menu/location/index.md +++ b/commands/menu/location/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/ ---- \ No newline at end of file +layout: default +title: 'wp menu location' +--- + +`wp menu location` - Manage a menu's assignment to locations. + +### EXAMPLES + + # List available menu locations + wp menu location list + + # Assign the 'primary-menu' menu to the 'primary' location + wp menu location assign primary-menu primary + + # Remove the 'primary-menu' menu from the 'primary' location + wp menu location remove primary-menu primary + +### 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..e3169cab 100644 --- a/commands/menu/location/list/index.md +++ b/commands/menu/location/list/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/list/ ---- \ No newline at end of file +layout: default +title: 'wp menu location list' +--- + +`wp menu location list` - List locations for the current theme. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each location: + +* name +* description + +### EXAMPLES + + wp menu location list + diff --git a/commands/menu/location/remove/index.md b/commands/menu/location/remove/index.md index fb4ceb5a..44813bfb 100644 --- a/commands/menu/location/remove/index.md +++ b/commands/menu/location/remove/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/menu/location/remove/ ---- \ No newline at end of file +layout: default +title: 'wp menu location remove' +--- + +`wp menu location remove` - Remove a location from a menu + +<menu> +: The name, slug, or term ID for the menu + +<location> +: Location's slug + +### EXAMPLES + + wp menu location remove primary-menu primary + diff --git a/commands/network/index.md b/commands/network/index.md index 3c879aac..595e0e17 100644 --- a/commands/network/index.md +++ b/commands/network/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/ ---- \ No newline at end of file +layout: default +title: 'wp network' +--- + +`wp network` - + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
NameDescription
metaManage network custom fields.
diff --git a/commands/network/meta/add/index.md b/commands/network/meta/add/index.md index 860053db..f92f91dd 100644 --- a/commands/network/meta/add/index.md +++ b/commands/network/meta/add/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp network meta add' +--- + +`wp network meta add` - Add a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/network/meta/delete/index.md b/commands/network/meta/delete/index.md index 01f0800c..6451409e 100644 --- a/commands/network/meta/delete/index.md +++ b/commands/network/meta/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp network meta delete' +--- + +`wp network meta delete` - Delete a meta field. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + diff --git a/commands/network/meta/get/index.md b/commands/network/meta/get/index.md index 16932de1..465f7cc7 100644 --- a/commands/network/meta/get/index.md +++ b/commands/network/meta/get/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp network meta get' +--- + +`wp network meta get` - Get meta field value. + + + diff --git a/commands/network/meta/index.md b/commands/network/meta/index.md index cdeaca95..2bbc7ea2 100644 --- a/commands/network/meta/index.md +++ b/commands/network/meta/index.md @@ -1,4 +1,52 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/ ---- \ No newline at end of file +layout: default +title: 'wp network meta' +--- + +`wp network meta` - Manage network custom fields. + +### OPTIONS + +<id> +: The network id (usually 1). + +\--format=json +: Encode/decode values as JSON. + +### EXAMPLES + + # get a list of super-admins + wp network meta get 1 site_admins + +### 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..6b3d8a8c 100644 --- a/commands/network/meta/list/index.md +++ b/commands/network/meta/list/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp network meta list' +--- + +`wp network meta list` - List all metadata associated with an object. + +<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..228cfda5 100644 --- a/commands/network/meta/update/index.md +++ b/commands/network/meta/update/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/network/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp network meta update' +--- + +`wp network meta update` - Update a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/option/add/index.md b/commands/option/add/index.md index 403f7920..24fb20f5 100644 --- a/commands/option/add/index.md +++ b/commands/option/add/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/add/ ---- \ No newline at end of file +layout: default +title: 'wp option add' +--- + +`wp option add` - Add an option. + +### 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 is plaintext. + +[\--autoload=<autoload>] +: Should this option be automatically loaded. Accepted values: yes, no. Default: yes + +### EXAMPLES + + # Create an option by reading a JSON file + wp option add my_option --format=json < config.json + diff --git a/commands/option/delete/index.md b/commands/option/delete/index.md index d471a9c3..ca3a9458 100644 --- a/commands/option/delete/index.md +++ b/commands/option/delete/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/delete/ ---- \ No newline at end of file +layout: default +title: 'wp option delete' +--- + +`wp option delete` - Delete an option. + + + diff --git a/commands/option/get/index.md b/commands/option/get/index.md index 56bd6852..04b75f14 100644 --- a/commands/option/get/index.md +++ b/commands/option/get/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/get/ ---- \ No newline at end of file +layout: default +title: 'wp option get' +--- + +`wp option get` - Get an option. + + + diff --git a/commands/option/index.md b/commands/option/index.md index 637929ff..d9fa7d9f 100644 --- a/commands/option/index.md +++ b/commands/option/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/ ---- \ No newline at end of file +layout: default +title: 'wp option' +--- + +`wp option` - Manage options. + +### OPTIONS + +[\--format=json] +: Encode/decode values as JSON. + +### EXAMPLES + + wp option get siteurl + + wp option add my_option foobar + + wp option update my_option '{"foo": "bar"}' --format=json + + wp option delete my_option + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
addAdd an option.
deleteDelete an option.
getGet an option.
updateUpdate an option.
diff --git a/commands/option/list/index.md b/commands/option/list/index.md deleted file mode 100644 index 926ae1b4..00000000 --- a/commands/option/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/list/ ---- \ No newline at end of file diff --git a/commands/option/update/index.md b/commands/option/update/index.md index d9f799f0..052176d0 100644 --- a/commands/option/update/index.md +++ b/commands/option/update/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/option/update/ ---- \ No newline at end of file +layout: default +title: 'wp option update' +--- + +`wp option update` - Update an option. + +### OPTIONS + +<key> +: The name of the option to add. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + +### EXAMPLES + + # Update an option by reading from a file + wp option update my_option < value.txt + + # Update one option on multiple sites using xargs + wp site list --field=url | xargs -n1 -I {} sh -c 'wp --url={} option update <key> <value>' + diff --git a/commands/package/browse/index.md b/commands/package/browse/index.md deleted file mode 100644 index b0ad5d4f..00000000 --- a/commands/package/browse/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/browse/ ---- \ No newline at end of file diff --git a/commands/package/index.md b/commands/package/index.md deleted file mode 100644 index ebb25bcf..00000000 --- a/commands/package/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/ ---- \ No newline at end of file diff --git a/commands/package/install/index.md b/commands/package/install/index.md deleted file mode 100644 index ff315b55..00000000 --- a/commands/package/install/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/install/ ---- \ No newline at end of file diff --git a/commands/package/list/index.md b/commands/package/list/index.md deleted file mode 100644 index 0df19ed1..00000000 --- a/commands/package/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/list/ ---- \ No newline at end of file diff --git a/commands/package/path/index.md b/commands/package/path/index.md deleted file mode 100644 index a29adb9d..00000000 --- a/commands/package/path/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/path/ ---- \ No newline at end of file diff --git a/commands/package/uninstall/index.md b/commands/package/uninstall/index.md deleted file mode 100644 index 847871ae..00000000 --- a/commands/package/uninstall/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/uninstall/ ---- \ No newline at end of file diff --git a/commands/package/update/index.md b/commands/package/update/index.md deleted file mode 100644 index 33f5b728..00000000 --- a/commands/package/update/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/package/update/ ---- \ No newline at end of file diff --git a/commands/plugin/activate/index.md b/commands/plugin/activate/index.md index 0fd2b1f1..c97ba9a3 100644 --- a/commands/plugin/activate/index.md +++ b/commands/plugin/activate/index.md @@ -1,4 +1,15 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/activate/ ---- \ No newline at end of file +layout: default +title: 'wp plugin activate' +--- + +`wp plugin activate` - Activate a plugin. + +### OPTIONS + +<plugin>... +: One or more plugins to activate. + +[\--network] +: If set, the plugin will be activated for the entire multisite network. + diff --git a/commands/plugin/deactivate/index.md b/commands/plugin/deactivate/index.md index 05aaf682..97aa529e 100644 --- a/commands/plugin/deactivate/index.md +++ b/commands/plugin/deactivate/index.md @@ -1,4 +1,18 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/deactivate/ ---- \ No newline at end of file +layout: default +title: 'wp plugin deactivate' +--- + +`wp plugin deactivate` - Deactivate a plugin. + +### OPTIONS + +[<plugin>...] +: One or more plugins to deactivate. + +[\--all] +: If set, all plugins will be deactivated. + +[\--network] +: If set, the plugin will be deactivated for the entire multisite network. + diff --git a/commands/plugin/delete/index.md b/commands/plugin/delete/index.md index 4d0e9541..a6d9f8c8 100644 --- a/commands/plugin/delete/index.md +++ b/commands/plugin/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/delete/ ---- \ No newline at end of file +layout: default +title: 'wp plugin delete' +--- + +`wp plugin delete` - Delete plugin files. + +### OPTIONS + +<plugin>... +: One or more plugins to delete. + +### EXAMPLES + + wp plugin delete hello + diff --git a/commands/plugin/get/index.md b/commands/plugin/get/index.md index dec04a29..854101e8 100644 --- a/commands/plugin/get/index.md +++ b/commands/plugin/get/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/get/ ---- \ No newline at end of file +layout: default +title: 'wp plugin get' +--- + +`wp plugin get` - Get a plugin. + +### OPTIONS + +<plugin> +: The plugin to get. + +[\--field=<field>] +: Instead of returning the whole plugin, returns the value of a single field. + +[\--format=<format>] +: Output list as table or JSON. Defaults to table. + +### EXAMPLES + + wp plugin get bbpress --format=json + diff --git a/commands/plugin/index.md b/commands/plugin/index.md index eb0260a9..555266f6 100644 --- a/commands/plugin/index.md +++ b/commands/plugin/index.md @@ -1,4 +1,73 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/ ---- \ No newline at end of file +layout: default +title: 'wp plugin' +--- + +`wp plugin` - Manage plugins. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
activateActivate a plugin.
deactivateDeactivate a plugin.
deleteDelete plugin files.
getGet a 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 repository.
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..d1d3eb88 100644 --- a/commands/plugin/install/index.md +++ b/commands/plugin/install/index.md @@ -1,4 +1,40 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/install/ ---- \ No newline at end of file +layout: default +title: 'wp plugin install' +--- + +`wp plugin install` - Install a plugin. + +### 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 + + # Install the development version from wordpress.org + wp plugin install bbpress --version=dev + + # Install from a local zip file + wp plugin install ../my-plugin.zip + + # Install from a remote zip file + wp plugin install http://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef + diff --git a/commands/plugin/is-installed/index.md b/commands/plugin/is-installed/index.md index d1cdedca..53b1803f 100644 --- a/commands/plugin/is-installed/index.md +++ b/commands/plugin/is-installed/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp plugin is-installed' +--- + +`wp plugin is-installed` - Check if the plugin is installed. + +### OPTIONS + +<plugin> +: The plugin to check. + +### EXAMPLES + + wp plugin is-installed hello + diff --git a/commands/plugin/list/index.md b/commands/plugin/list/index.md index 40959e92..071219a2 100644 --- a/commands/plugin/list/index.md +++ b/commands/plugin/list/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/list/ ---- \ No newline at end of file +layout: default +title: 'wp plugin list' +--- + +`wp plugin list` - Get a list of plugins. + +### 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>] +: Accepted values: table, csv, json, count. Default: table + +### 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 + + wp plugin list --status=active --format=json + diff --git a/commands/plugin/path/index.md b/commands/plugin/path/index.md index 22e187e0..11257b8f 100644 --- a/commands/plugin/path/index.md +++ b/commands/plugin/path/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/path/ ---- \ No newline at end of file +layout: default +title: 'wp plugin path' +--- + +`wp plugin path` - Get the path to a plugin or to the plugin directory. + +### 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) + diff --git a/commands/plugin/search/index.md b/commands/plugin/search/index.md index 9ddf89b7..2dc2c1da 100644 --- a/commands/plugin/search/index.md +++ b/commands/plugin/search/index.md @@ -1,4 +1,45 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/search/ ---- \ No newline at end of file +layout: default +title: 'wp plugin search' +--- + +`wp plugin search` - Search the wordpress.org plugin repository. + +### 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 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>] +: Accepted values: table, csv, json, count. Default: table + +### EXAMPLES + + wp plugin search dsgnwrks --per-page=20 --format=json + + wp plugin search dsgnwrks --fields=name,version,slug,rating,num_ratings + diff --git a/commands/plugin/status/index.md b/commands/plugin/status/index.md index 31358b56..d3b6a265 100644 --- a/commands/plugin/status/index.md +++ b/commands/plugin/status/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/status/ ---- \ No newline at end of file +layout: default +title: 'wp plugin status' +--- + +`wp plugin status` - See the status of one or all plugins. + +### OPTIONS + +[<plugin>] +: A particular plugin to show the status for. + diff --git a/commands/plugin/toggle/index.md b/commands/plugin/toggle/index.md index bbb60ac7..a2db0d1c 100644 --- a/commands/plugin/toggle/index.md +++ b/commands/plugin/toggle/index.md @@ -1,4 +1,15 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/toggle/ ---- \ No newline at end of file +layout: default +title: 'wp plugin toggle' +--- + +`wp plugin toggle` - Toggle a plugin's activation state. + +### OPTIONS + +<plugin>... +: One or more plugins to toggle. + +[\--network] +: If set, the plugin will be toggled for the entire multisite network. + diff --git a/commands/plugin/uninstall/index.md b/commands/plugin/uninstall/index.md index faac3fb8..4080a4a7 100644 --- a/commands/plugin/uninstall/index.md +++ b/commands/plugin/uninstall/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/uninstall/ ---- \ No newline at end of file +layout: default +title: 'wp plugin uninstall' +--- + +`wp plugin uninstall` - Uninstall a plugin. + +### OPTIONS + +<plugin>... +: One or more plugins to uninstall. + +[\--no-delete] +: If set, the plugin files will not be deleted. Only the uninstall procedure +will be run. + +### EXAMPLES + + wp plugin uninstall hello + 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..c15cca4a 100644 --- a/commands/plugin/update/index.md +++ b/commands/plugin/update/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/plugin/update/ ---- \ No newline at end of file +layout: default +title: 'wp plugin update' +--- + +`wp plugin update` - Update one or more plugins. + +### OPTIONS + +[<plugin>...] +: One or more plugins to update. + +[\--all] +: If set, all plugins that have updates will be updated. + +[\--version=<version>] +: If set, the plugin will be updated to the latest development version, +regardless of what version is currently installed. + +[\--dry-run] +: Preview which plugins would be updated. + +### EXAMPLES + + wp plugin update bbpress --version=dev + + wp plugin update --all + diff --git a/commands/post-type/get/index.md b/commands/post-type/get/index.md deleted file mode 100644 index 00ea191e..00000000 --- a/commands/post-type/get/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/get/ ---- \ No newline at end of file diff --git a/commands/post-type/index.md b/commands/post-type/index.md deleted file mode 100644 index 21f74bdc..00000000 --- a/commands/post-type/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/ ---- \ No newline at end of file diff --git a/commands/post-type/list/index.md b/commands/post-type/list/index.md deleted file mode 100644 index cd697686..00000000 --- a/commands/post-type/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post-type/list/ ---- \ No newline at end of file diff --git a/commands/post/create/index.md b/commands/post/create/index.md index f68570ef..3b85932b 100644 --- a/commands/post/create/index.md +++ b/commands/post/create/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/create/ ---- \ No newline at end of file +layout: default +title: 'wp post create' +--- + +`wp post create` - Create a post. + +### 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 + + wp post create --post_type=page --post_title='A future post' --post_status=future --post_date='2020-12-01 07:00:00' + + wp post create ./post-content.txt --post_category=201,345 --post_title='Post from file' + diff --git a/commands/post/delete/index.md b/commands/post/delete/index.md index 5a66451a..f0709571 100644 --- a/commands/post/delete/index.md +++ b/commands/post/delete/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/delete/ ---- \ No newline at end of file +layout: default +title: 'wp post delete' +--- + +`wp post delete` - Delete a post by ID. + +### OPTIONS + +<id>... +: One or more IDs of posts to delete. + +[\--force] +: Skip the trash bin. + +### EXAMPLES + + wp post delete 123 --force + + wp post delete $(wp post list --post_type='page' --format=ids) + diff --git a/commands/post/edit/index.md b/commands/post/edit/index.md index 738c4ca5..58e62ffd 100644 --- a/commands/post/edit/index.md +++ b/commands/post/edit/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/edit/ ---- \ No newline at end of file +layout: default +title: 'wp post edit' +--- + +`wp post edit` - Launch system editor to edit post content. + +### OPTIONS + +<id> +: The ID of the post to edit. + +### EXAMPLES + + wp post edit 123 + diff --git a/commands/post/generate/index.md b/commands/post/generate/index.md index 88f61c8f..220fb96e 100644 --- a/commands/post/generate/index.md +++ b/commands/post/generate/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/generate/ ---- \ No newline at end of file +layout: default +title: 'wp post generate' +--- + +`wp post generate` - Generate some posts. + +### 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: none + +[\--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 + +### EXAMPLES + + wp post generate --count=10 --post_type=page --post_date=1999-01-04 + curl http://loripsum.net/api/5 | wp post generate --post_content --count=10 + diff --git a/commands/post/get/index.md b/commands/post/get/index.md index 7df99292..889668ae 100644 --- a/commands/post/get/index.md +++ b/commands/post/get/index.md @@ -1,4 +1,23 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/get/ ---- \ No newline at end of file +layout: default +title: 'wp post get' +--- + +`wp post get` - Get a post's content by ID. + +### OPTIONS + +<id> +: The ID of the post to get. + +[\--field=<field>] +: Instead of returning the whole post, returns the value of a single field. + +[\--format=<format>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + # save the post content to a file + wp post get 12 --field=content > file.txt + diff --git a/commands/post/index.md b/commands/post/index.md index 7ee724b9..72865bfa 100644 --- a/commands/post/index.md +++ b/commands/post/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/ ---- \ No newline at end of file +layout: default +title: 'wp post' +--- + +`wp post` - Manage posts. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
createCreate a post.
deleteDelete a post by ID.
editLaunch system editor to edit post content.
generateGenerate some posts.
getGet a post's content by ID.
listGet a list of posts.
metaManage post custom fields.
updateUpdate one or more posts.
urlGet post url
diff --git a/commands/post/list/index.md b/commands/post/list/index.md index f7a8663e..16983110 100644 --- a/commands/post/list/index.md +++ b/commands/post/list/index.md @@ -1,4 +1,63 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/list/ ---- \ No newline at end of file +layout: default +title: 'wp post list' +--- + +`wp post list` - Get a list of posts. + +### 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>] +: Accepted values: table, csv, json, count, ids. Default: table + +### 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 + +### EXAMPLES + + wp post list --field=ID + + wp post list --post_type=post --posts_per_page=5 --format=json + + wp post list --post_type=page --fields=post_title,post_status + + wp post list --post_type=page,post --format=ids + diff --git a/commands/post/meta/add/index.md b/commands/post/meta/add/index.md index 34e2171c..8f512f10 100644 --- a/commands/post/meta/add/index.md +++ b/commands/post/meta/add/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp post meta add' +--- + +`wp post meta add` - Add a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value of the meta field. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/post/meta/delete/index.md b/commands/post/meta/delete/index.md index efdddaed..fc0c83bd 100644 --- a/commands/post/meta/delete/index.md +++ b/commands/post/meta/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp post meta delete' +--- + +`wp post meta delete` - Delete a meta field. + +<id> +: The ID of the object. + +<key> +: The name of the meta field to create. + +[<value>] +: The value to delete. If omitted, all rows with key will deleted. + diff --git a/commands/post/meta/get/index.md b/commands/post/meta/get/index.md index cf7fe2db..7388c5e4 100644 --- a/commands/post/meta/get/index.md +++ b/commands/post/meta/get/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp post meta get' +--- + +`wp post meta get` - Get meta field value. + + + diff --git a/commands/post/meta/index.md b/commands/post/meta/index.md index 33a9e9f8..70d1abc5 100644 --- a/commands/post/meta/index.md +++ b/commands/post/meta/index.md @@ -1,4 +1,48 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/ ---- \ No newline at end of file +layout: default +title: 'wp post meta' +--- + +`wp post meta` - Manage post custom fields. + +### OPTIONS + +[\--format=json] +: Encode/decode values as JSON. + +### EXAMPLES + + wp post meta set 123 _wp_page_template about.php + +### 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..a4bbe646 100644 --- a/commands/post/meta/list/index.md +++ b/commands/post/meta/list/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp post meta list' +--- + +`wp post meta list` - List all metadata associated with an object. + +<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..e0fff32b 100644 --- a/commands/post/meta/update/index.md +++ b/commands/post/meta/update/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp post meta update' +--- + +`wp post meta update` - Update a meta field. + +### OPTIONS + +<id> +: The ID of the object. + +<key> +: The name of the meta field to update. + +[<value>] +: The new value. If ommited, the value is read from STDIN. + +[\--format=<format>] +: The serialization format for the value. Default is plaintext. + diff --git a/commands/post/term/add/index.md b/commands/post/term/add/index.md deleted file mode 100644 index 254f552d..00000000 --- a/commands/post/term/add/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/add/ ---- \ No newline at end of file diff --git a/commands/post/term/index.md b/commands/post/term/index.md deleted file mode 100644 index 5b3e7d6f..00000000 --- a/commands/post/term/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/ ---- \ No newline at end of file diff --git a/commands/post/term/list/index.md b/commands/post/term/list/index.md deleted file mode 100644 index 18c8993a..00000000 --- a/commands/post/term/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/list/ ---- \ No newline at end of file diff --git a/commands/post/term/remove/index.md b/commands/post/term/remove/index.md deleted file mode 100644 index e9130d5b..00000000 --- a/commands/post/term/remove/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/remove/ ---- \ No newline at end of file diff --git a/commands/post/term/set/index.md b/commands/post/term/set/index.md deleted file mode 100644 index b166638c..00000000 --- a/commands/post/term/set/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/term/set/ ---- \ No newline at end of file diff --git a/commands/post/update/index.md b/commands/post/update/index.md index 2dbb9b18..2a63ac9f 100644 --- a/commands/post/update/index.md +++ b/commands/post/update/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/post/update/ ---- \ No newline at end of file +layout: default +title: 'wp post update' +--- + +`wp post update` - Update one or more posts. + +### OPTIONS + +<id>... +: One or more IDs of posts to update. + +\--<field>=<value> +: One or more fields to update. See wp_update_post(). + +### EXAMPLES + + wp post update 123 --post_name=something --post_status=draft + diff --git a/commands/post/url/index.md b/commands/post/url/index.md new file mode 100644 index 00000000..34cc9df5 --- /dev/null +++ b/commands/post/url/index.md @@ -0,0 +1,18 @@ +--- +layout: default +title: 'wp post url' +--- + +`wp post url` - Get post url + +### OPTIONS + +<id>... +: One or more IDs of posts get the URL. + +### EXAMPLES + + wp post url 123 + + wp post url 123 324 + diff --git a/commands/rewrite/flush/index.md b/commands/rewrite/flush/index.md index 426b6b90..9bf4124c 100644 --- a/commands/rewrite/flush/index.md +++ b/commands/rewrite/flush/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/flush/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite flush' +--- + +`wp rewrite flush` - Flush rewrite rules. + +### DESCRIPTION + +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. + diff --git a/commands/rewrite/index.md b/commands/rewrite/index.md index 55ee63e7..6e8fd19f 100644 --- a/commands/rewrite/index.md +++ b/commands/rewrite/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite' +--- + +`wp rewrite` - Manage rewrite rules. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
flushFlush rewrite rules.
listPrint current rewrite rules.
structureUpdate the permalink structure.
diff --git a/commands/rewrite/list/index.md b/commands/rewrite/list/index.md index 0be10b1b..a5a7a191 100644 --- a/commands/rewrite/list/index.md +++ b/commands/rewrite/list/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/list/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite list' +--- + +`wp rewrite list` - Print current rewrite rules. + +### OPTIONS + +[\--match=<url>] +: Show rewrite rules matching a particular URL. + +[\--source=<source>] +: Show rewrite rules from a particular source. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### EXAMPLES + + wp rewrite list --format=csv + diff --git a/commands/rewrite/structure/index.md b/commands/rewrite/structure/index.md index bc3b0ec6..79ad5e50 100644 --- a/commands/rewrite/structure/index.md +++ b/commands/rewrite/structure/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/rewrite/structure/ ---- \ No newline at end of file +layout: default +title: 'wp rewrite structure' +--- + +`wp rewrite structure` - Update the permalink structure. + +### DESCRIPTION + +Updates the post permalink structure. + +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 + +<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%/' + diff --git a/commands/role/create/index.md b/commands/role/create/index.md index 3f5f1c4c..1b092c92 100644 --- a/commands/role/create/index.md +++ b/commands/role/create/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/create/ ---- \ No newline at end of file +layout: default +title: 'wp role create' +--- + +`wp role create` - Create a new role. + +### OPTIONS + +<role-key> +: The internal name of the role. + +<role-name> +: The publicly visible name of the role. + +### EXAMPLES + + wp role create approver Approver + + wp role create productadmin "Product Administrator" + diff --git a/commands/role/delete/index.md b/commands/role/delete/index.md index 4ad63ee2..264a04d0 100644 --- a/commands/role/delete/index.md +++ b/commands/role/delete/index.md @@ -1,4 +1,18 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/delete/ ---- \ No newline at end of file +layout: default +title: 'wp role delete' +--- + +`wp role delete` - Delete an existing role. + +### OPTIONS + +<role-key> +: The internal name of the role. + +### EXAMPLES + + wp role delete approver + + wp role delete productadmin + diff --git a/commands/role/exists/index.md b/commands/role/exists/index.md index ade85b2f..0bb0a51c 100644 --- a/commands/role/exists/index.md +++ b/commands/role/exists/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/exists/ ---- \ No newline at end of file +layout: default +title: 'wp role exists' +--- + +`wp role exists` - Check if a role exists. + +##DESCRIPTION + +Will exit with status 0 if the role exists, 1 if it does not. + +### OPTIONS + +<role-key> +: The internal name of the role. + +### EXAMPLES + + wp role exists editor + diff --git a/commands/role/index.md b/commands/role/index.md index ac7fae3c..f3e8bae4 100644 --- a/commands/role/index.md +++ b/commands/role/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/ ---- \ No newline at end of file +layout: default +title: 'wp role' +--- + +`wp role` - Manage user 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..7b30f15e 100644 --- a/commands/role/list/index.md +++ b/commands/role/list/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/list/ ---- \ No newline at end of file +layout: default +title: 'wp role list' +--- + +`wp role list` - List all roles. + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each role: + +* name +* role + +There are no optional fields. + +### EXAMPLES + + wp role list --fields=role --format=csv + diff --git a/commands/role/reset/index.md b/commands/role/reset/index.md index 5227781d..8b0590cf 100644 --- a/commands/role/reset/index.md +++ b/commands/role/reset/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/role/reset/ ---- \ No newline at end of file +layout: default +title: 'wp role reset' +--- + +`wp role reset` - Reset any default role to default capabilities. + +### OPTIONS + +[<role-key>...] +: The internal name of one or more roles to reset. + +[\--all] +: If set, all default roles will be reset. + +### EXAMPLES + + wp role reset administrator author contributor + + wp role reset --all + diff --git a/commands/scaffold/_s/index.md b/commands/scaffold/_s/index.md index e89885cb..245f5663 100644 --- a/commands/scaffold/_s/index.md +++ b/commands/scaffold/_s/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/_s/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold _s' +--- + +`wp scaffold _s` - Generate starter code for a theme. + +### OPTIONS + +<slug> +: The slug for the new theme, used for prefixing functions. + +[\--activate] +: Activate the newly downloaded theme. + +[\--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 + diff --git a/commands/scaffold/child-theme/index.md b/commands/scaffold/child-theme/index.md index cde98b69..a75dbcc5 100644 --- a/commands/scaffold/child-theme/index.md +++ b/commands/scaffold/child-theme/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/child-theme/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold child-theme' +--- + +`wp scaffold child-theme` - Generate empty child theme. + +### 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. + diff --git a/commands/scaffold/index.md b/commands/scaffold/index.md index 1cdd0597..67c0e150 100644 --- a/commands/scaffold/index.md +++ b/commands/scaffold/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold' +--- + +`wp scaffold` - Generate code for post types, taxonomies, etc. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
_sGenerate starter code for a theme.
child-themeGenerate empty child theme.
package-testsGenerate files needed for writing Behat tests for your command.
pluginGenerate starter code for a plugin.
plugin-testsGenerate files needed for running PHPUnit tests.
post-typeGenerate PHP code for registering a custom post type.
taxonomyGenerate PHP code for registering a custom taxonomy.
diff --git a/commands/scaffold/package-tests/index.md b/commands/scaffold/package-tests/index.md new file mode 100644 index 00000000..9fbfa3a1 --- /dev/null +++ b/commands/scaffold/package-tests/index.md @@ -0,0 +1,32 @@ +--- +layout: default +title: 'wp scaffold package-tests' +--- + +`wp scaffold package-tests` - Generate files needed for writing Behat tests for your command. + +### DESCRIPTION + +These are the files that are generated: + +* `.travis.yml` is the configuration file for Travis CI +* `bin/install-package-tests.sh` will configure environment to run tests. Script expects WP_CLI_BIN_DIR and WP_CLI_CONFIG_PATH environment variables. +* `features/load-wp-cli.feature` is a basic test to confirm WP-CLI can load. +* `features/bootstrap`, `features/steps`, `features/extra` are Behat configuration files. +* `utils/generate-package-require-from-composer.php` generates a test config.yml file from your package's composer.json + +### ENVIRONMENT + +The `features/bootstrap/FeatureContext.php` file expects the WP_CLI_BIN_DIR and WP_CLI_CONFIG_PATH environment variables. + +WP-CLI Behat framework uses Behat ~2.5. + +### OPTIONS + +<dir> +: The package directory to generate tests for. + +### EXAMPLE + + wp scaffold package-tests /path/to/command/dir/ + diff --git a/commands/scaffold/plugin-tests/index.md b/commands/scaffold/plugin-tests/index.md index 34242ec4..a1b2604d 100644 --- a/commands/scaffold/plugin-tests/index.md +++ b/commands/scaffold/plugin-tests/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/plugin-tests/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold plugin-tests' +--- + +`wp scaffold plugin-tests` - Generate files needed for running PHPUnit tests. + +### DESCRIPTION + +These are the files that are generated: + +* `phpunit.xml` is the configuration file for PHPUnit +* `.travis.yml` is the configuration file for Travis CI +* `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 + +### 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. + +### EXAMPLE + + wp scaffold plugin-tests hello + diff --git a/commands/scaffold/plugin/index.md b/commands/scaffold/plugin/index.md index d11fe36c..8875869e 100644 --- a/commands/scaffold/plugin/index.md +++ b/commands/scaffold/plugin/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/plugin/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold plugin' +--- + +`wp scaffold plugin` - Generate starter code for a plugin. + +### OPTIONS + +<slug> +: The internal name of the plugin. + +[\--plugin_name=<title>] +: What to put in the 'Plugin Name:' header + +[\--skip-tests] +: Don't generate files for unit testing. + +[\--activate] +: Activate the newly generated plugin. + diff --git a/commands/scaffold/post-type/index.md b/commands/scaffold/post-type/index.md index c0adab84..40487eb5 100644 --- a/commands/scaffold/post-type/index.md +++ b/commands/scaffold/post-type/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/post-type/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold post-type' +--- + +`wp scaffold post-type` - Generate PHP code for registering a custom post type. + +### 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. + +[\--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. + diff --git a/commands/scaffold/taxonomy/index.md b/commands/scaffold/taxonomy/index.md index 521a39af..11c2ca0f 100644 --- a/commands/scaffold/taxonomy/index.md +++ b/commands/scaffold/taxonomy/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/taxonomy/ ---- \ No newline at end of file +layout: default +title: 'wp scaffold taxonomy' +--- + +`wp scaffold taxonomy` - Generate PHP code for registering a custom taxonomy. + +### 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. + +### EXAMPLES + + wp scaffold taxonomy venue --post_types=event,presentation + diff --git a/commands/scaffold/theme-tests/index.md b/commands/scaffold/theme-tests/index.md deleted file mode 100644 index 7c2cf5ef..00000000 --- a/commands/scaffold/theme-tests/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/scaffold/theme-tests/ ---- \ No newline at end of file diff --git a/commands/search-replace/index.md b/commands/search-replace/index.md index aa13a254..9c20db2c 100644 --- a/commands/search-replace/index.md +++ b/commands/search-replace/index.md @@ -1,4 +1,46 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/search-replace/ ---- \ No newline at end of file +layout: default +title: 'wp search-replace' +--- + +`wp search-replace` - Search/replace strings in the database. + +### DESCRIPTION + +This command will go through all rows in all tables and will replace all +appearances of the old string with the new one. + +It will correctly handle serialized values, and will not change primary key values. + +### OPTIONS + +<old> +: The old string. + +<new> +: The new string. + +[<table>...] +: List of database tables to restrict the replacement to. + +[\--network] +: Search/replace through all the tables in a multisite install. + +[\--skip-columns=<columns>] +: Do not perform the replacement in the comma-separated columns. + +[\--dry-run] +: Show report, but don't perform the changes. + +[\--precise] +: Force the use of PHP (instead of SQL) which is more thorough, but slower. Use if you see issues with serialized data. + +[\--recurse-objects] +: Enable recursing into objects to replace strings + +### EXAMPLES + + wp search-replace 'http://example.dev' 'http://example.com' --skip-columns=guid + + wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms --dry-run + diff --git a/commands/server/index.md b/commands/server/index.md deleted file mode 100644 index 72286e3b..00000000 --- a/commands/server/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/server/ ---- \ No newline at end of file diff --git a/commands/shell/index.md b/commands/shell/index.md index 2891bd1b..9fe82d2a 100644 --- a/commands/shell/index.md +++ b/commands/shell/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/shell/ ---- \ No newline at end of file +layout: default +title: 'wp shell' +--- + +`wp shell` - Interactive PHP console. + +### DESCRIPTION + +`wp shell` allows you to evaluate PHP statements and expressions interactively, from within a WordPress environment. This means that you have access to all the functions, classes and globals that you would have access to from inside a WordPress plugin, for example. + +### OPTIONS + +[\--basic] +: Start in fail-safe mode, even if Boris is available. + diff --git a/commands/sidebar/index.md b/commands/sidebar/index.md index 404346c8..d11cd5b1 100644 --- a/commands/sidebar/index.md +++ b/commands/sidebar/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/sidebar/ ---- \ No newline at end of file +layout: default +title: 'wp sidebar' +--- + +`wp sidebar` - Manage sidebars. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + +
NameDescription
listList registered sidebars.
diff --git a/commands/sidebar/list/index.md b/commands/sidebar/list/index.md index fc8ce0f8..f1291dad 100644 --- a/commands/sidebar/list/index.md +++ b/commands/sidebar/list/index.md @@ -1,4 +1,35 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/sidebar/list/ ---- \ No newline at end of file +layout: default +title: 'wp sidebar list' +--- + +`wp sidebar list` - List registered sidebars. + +### OPTIONS + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### 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 + diff --git a/commands/site/activate/index.md b/commands/site/activate/index.md deleted file mode 100644 index 4191d9d7..00000000 --- a/commands/site/activate/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/activate/ ---- \ No newline at end of file diff --git a/commands/site/archive/index.md b/commands/site/archive/index.md deleted file mode 100644 index 9260e815..00000000 --- a/commands/site/archive/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/archive/ ---- \ No newline at end of file diff --git a/commands/site/create/index.md b/commands/site/create/index.md index 3502b1a0..578bcd92 100644 --- a/commands/site/create/index.md +++ b/commands/site/create/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/create/ ---- \ No newline at end of file +layout: default +title: 'wp site create' +--- + +`wp site create` - Create a site in a multisite install. + +### 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. + diff --git a/commands/site/deactivate/index.md b/commands/site/deactivate/index.md deleted file mode 100644 index 868cde0a..00000000 --- a/commands/site/deactivate/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/deactivate/ ---- \ No newline at end of file diff --git a/commands/site/delete/index.md b/commands/site/delete/index.md index 312f171c..fc656f3e 100644 --- a/commands/site/delete/index.md +++ b/commands/site/delete/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/delete/ ---- \ No newline at end of file +layout: default +title: 'wp site delete' +--- + +`wp site delete` - Delete a site in a multisite install. + +### 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. + diff --git a/commands/site/empty/index.md b/commands/site/empty/index.md index 3017c434..0b787135 100644 --- a/commands/site/empty/index.md +++ b/commands/site/empty/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/empty/ ---- \ No newline at end of file +layout: default +title: 'wp site empty' +--- + +`wp site empty` - Empty a site of its content (posts, comments, and terms). + +### OPTIONS + +[\--yes] +: Proceed to empty the site without a confirmation prompt. + diff --git a/commands/site/index.md b/commands/site/index.md index 39ca96ed..9bc2e970 100644 --- a/commands/site/index.md +++ b/commands/site/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/ ---- \ No newline at end of file +layout: default +title: 'wp site' +--- + +`wp site` - Perform site-wide operations. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
createCreate a site in a multisite install.
deleteDelete a site in a multisite install.
emptyEmpty a site of its content (posts, comments, and terms).
listList all sites in a multisite install.
urlGet site url
diff --git a/commands/site/list/index.md b/commands/site/list/index.md index 821357c8..18d1e0f1 100644 --- a/commands/site/list/index.md +++ b/commands/site/list/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/list/ ---- \ No newline at end of file +layout: default +title: 'wp site list' +--- + +`wp site list` - List all sites in a multisite install. + +### OPTIONS + +[\--network=<id>] +: The network to which the sites belong. + +[\--field=<field>] +: Prints the value of a single field for each site. + +[\--fields=<fields>] +: Comma-separated list of fields to show. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### 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 + diff --git a/commands/site/option/add/index.md b/commands/site/option/add/index.md deleted file mode 100644 index e41ddbf6..00000000 --- a/commands/site/option/add/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/add/ ---- \ No newline at end of file diff --git a/commands/site/option/delete/index.md b/commands/site/option/delete/index.md deleted file mode 100644 index 2907d7bd..00000000 --- a/commands/site/option/delete/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/delete/ ---- \ No newline at end of file diff --git a/commands/site/option/get/index.md b/commands/site/option/get/index.md deleted file mode 100644 index e444530c..00000000 --- a/commands/site/option/get/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/get/ ---- \ No newline at end of file diff --git a/commands/site/option/index.md b/commands/site/option/index.md deleted file mode 100644 index ed1a6966..00000000 --- a/commands/site/option/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/ ---- \ No newline at end of file diff --git a/commands/site/option/list/index.md b/commands/site/option/list/index.md deleted file mode 100644 index d206e838..00000000 --- a/commands/site/option/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/list/ ---- \ No newline at end of file diff --git a/commands/site/option/update/index.md b/commands/site/option/update/index.md deleted file mode 100644 index c0733251..00000000 --- a/commands/site/option/update/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/option/update/ ---- \ No newline at end of file diff --git a/commands/site/spam/index.md b/commands/site/spam/index.md deleted file mode 100644 index 20785019..00000000 --- a/commands/site/spam/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/spam/ ---- \ No newline at end of file diff --git a/commands/site/unarchive/index.md b/commands/site/unarchive/index.md deleted file mode 100644 index e328a315..00000000 --- a/commands/site/unarchive/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/unarchive/ ---- \ No newline at end of file diff --git a/commands/site/unspam/index.md b/commands/site/unspam/index.md deleted file mode 100644 index a1631b11..00000000 --- a/commands/site/unspam/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/site/unspam/ ---- \ No newline at end of file diff --git a/commands/site/url/index.md b/commands/site/url/index.md new file mode 100644 index 00000000..4486c501 --- /dev/null +++ b/commands/site/url/index.md @@ -0,0 +1,16 @@ +--- +layout: default +title: 'wp site url' +--- + +`wp site url` - Get site url + +### OPTIONS + +<id>... +: One or more IDs of sites to get the URL. + +### EXAMPLES + + wp site url 123 + diff --git a/commands/super-admin/add/index.md b/commands/super-admin/add/index.md index edc0f3a7..cab1fda4 100644 --- a/commands/super-admin/add/index.md +++ b/commands/super-admin/add/index.md @@ -1,4 +1,10 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/add/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin add' +--- + +`wp super-admin add` - Grant super-admin privileges to one or more users. + +<user>... +: One or more user IDs, user emails, or user logins. + diff --git a/commands/super-admin/index.md b/commands/super-admin/index.md index 63edbde6..d6483a19 100644 --- a/commands/super-admin/index.md +++ b/commands/super-admin/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin' +--- + +`wp super-admin` - List, add, and remove super admins from a network. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
addGrant super-admin privileges to one or more users.
listShow a list of users with super-admin capabilities.
removeRevoke super-admin privileges to one or more users.
diff --git a/commands/super-admin/list/index.md b/commands/super-admin/list/index.md index 449605c7..f0c7d22a 100644 --- a/commands/super-admin/list/index.md +++ b/commands/super-admin/list/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/list/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin list' +--- + +`wp super-admin list` - Show a list of users with super-admin capabilities. + + + diff --git a/commands/super-admin/remove/index.md b/commands/super-admin/remove/index.md index 7025bc76..481c9b7b 100644 --- a/commands/super-admin/remove/index.md +++ b/commands/super-admin/remove/index.md @@ -1,4 +1,10 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/super-admin/remove/ ---- \ No newline at end of file +layout: default +title: 'wp super-admin remove' +--- + +`wp super-admin remove` - Revoke super-admin privileges to one or more users. + +<user>... +: One or more user IDs, user emails, or user logins. + diff --git a/commands/taxonomy/get/index.md b/commands/taxonomy/get/index.md deleted file mode 100644 index 8dd49989..00000000 --- a/commands/taxonomy/get/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/get/ ---- \ No newline at end of file diff --git a/commands/taxonomy/index.md b/commands/taxonomy/index.md deleted file mode 100644 index e7f6f919..00000000 --- a/commands/taxonomy/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/ ---- \ No newline at end of file diff --git a/commands/taxonomy/list/index.md b/commands/taxonomy/list/index.md deleted file mode 100644 index 9faefe28..00000000 --- a/commands/taxonomy/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/taxonomy/list/ ---- \ No newline at end of file diff --git a/commands/term/create/index.md b/commands/term/create/index.md index 2319bb7f..e2bb1081 100644 --- a/commands/term/create/index.md +++ b/commands/term/create/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/create/ ---- \ No newline at end of file +layout: default +title: 'wp term create' +--- + +`wp term create` - Create a term. + +### 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 + + wp term create category Apple --description="A type of fruit" + diff --git a/commands/term/delete/index.md b/commands/term/delete/index.md index 93ae4ba6..4d3938cb 100644 --- a/commands/term/delete/index.md +++ b/commands/term/delete/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/delete/ ---- \ No newline at end of file +layout: default +title: 'wp term delete' +--- + +`wp term delete` - Delete a term. + +### OPTIONS + +<taxonomy> +: Taxonomy of the term to delete. + +<term-id>... +: One or more IDs of terms to delete. + +### EXAMPLES + + # delete all post tags + wp term list post_tag --field=term_id | xargs wp term delete post_tag + diff --git a/commands/term/generate/index.md b/commands/term/generate/index.md index 7723ec5e..59345d5d 100644 --- a/commands/term/generate/index.md +++ b/commands/term/generate/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/generate/ ---- \ No newline at end of file +layout: default +title: 'wp term generate' +--- + +`wp term generate` - Generate some terms. + +### 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 + +### EXAMPLES + + wp term generate --count=10 + diff --git a/commands/term/get/index.md b/commands/term/get/index.md index add6a239..1788a68d 100644 --- a/commands/term/get/index.md +++ b/commands/term/get/index.md @@ -1,4 +1,25 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/get/ ---- \ No newline at end of file +layout: default +title: 'wp term get' +--- + +`wp term get` - Get a taxonomy term + +### 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. + +[\--format=<format>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + wp term get category 1 --format=json + diff --git a/commands/term/index.md b/commands/term/index.md index e08cc23f..58776a16 100644 --- a/commands/term/index.md +++ b/commands/term/index.md @@ -1,4 +1,49 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/ ---- \ No newline at end of file +layout: default +title: 'wp term' +--- + +`wp term` - Manage terms. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
createCreate a term.
deleteDelete a term.
generateGenerate some terms.
getGet a taxonomy term
listList terms in a taxonomy.
updateUpdate a term.
urlGet term url
diff --git a/commands/term/list/index.md b/commands/term/list/index.md index fbe67e3e..c7d9d812 100644 --- a/commands/term/list/index.md +++ b/commands/term/list/index.md @@ -1,4 +1,44 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/list/ ---- \ No newline at end of file +layout: default +title: 'wp term list' +--- + +`wp term list` - List terms in a taxonomy. + +### OPTIONS + +<taxonomy>... +: List terms of one or more taxonomies + +[\--<field>=<value>] +: Filter by one or more fields. + +[\--field=<field>] +: Prints the value of a single field for each term. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each term: + +* term_id +* term_taxonomy_id +* name +* slug +* description +* parent +* count + +There are no optionally available fields. + +### EXAMPLES + + wp term list category --format=csv + + wp term list post_tag --fields=name,slug + diff --git a/commands/term/meta/add/index.md b/commands/term/meta/add/index.md deleted file mode 100644 index 98972be8..00000000 --- a/commands/term/meta/add/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/add/ ---- \ No newline at end of file diff --git a/commands/term/meta/delete/index.md b/commands/term/meta/delete/index.md deleted file mode 100644 index adea46b5..00000000 --- a/commands/term/meta/delete/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/delete/ ---- \ No newline at end of file diff --git a/commands/term/meta/get/index.md b/commands/term/meta/get/index.md deleted file mode 100644 index c774b038..00000000 --- a/commands/term/meta/get/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/get/ ---- \ No newline at end of file diff --git a/commands/term/meta/index.md b/commands/term/meta/index.md deleted file mode 100644 index c71a250d..00000000 --- a/commands/term/meta/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/ ---- \ No newline at end of file diff --git a/commands/term/meta/list/index.md b/commands/term/meta/list/index.md deleted file mode 100644 index 1f3f1028..00000000 --- a/commands/term/meta/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/list/ ---- \ No newline at end of file diff --git a/commands/term/meta/update/index.md b/commands/term/meta/update/index.md deleted file mode 100644 index a47bd2c6..00000000 --- a/commands/term/meta/update/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/meta/update/ ---- \ No newline at end of file diff --git a/commands/term/recount/index.md b/commands/term/recount/index.md deleted file mode 100644 index 23f0263c..00000000 --- a/commands/term/recount/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/recount/ ---- \ No newline at end of file diff --git a/commands/term/update/index.md b/commands/term/update/index.md index 7ee8473d..5d99e134 100644 --- a/commands/term/update/index.md +++ b/commands/term/update/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/term/update/ ---- \ No newline at end of file +layout: default +title: 'wp term update' +--- + +`wp term update` - Update a term. + +### 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 + + wp term update category 15 --name=Apple + diff --git a/commands/term/url/index.md b/commands/term/url/index.md new file mode 100644 index 00000000..c2b37db5 --- /dev/null +++ b/commands/term/url/index.md @@ -0,0 +1,21 @@ +--- +layout: default +title: 'wp term url' +--- + +`wp term url` - Get term url + +### OPTIONS + +<taxonomy> +: Taxonomy of the term(s) to get. + +<term-id>... +: One or more IDs of terms to get the URL. + +### EXAMPLES + + wp term url post_tag 123 + + wp term url post_tag 123 324 + diff --git a/commands/theme/activate/index.md b/commands/theme/activate/index.md index 70d50b6f..181296ec 100644 --- a/commands/theme/activate/index.md +++ b/commands/theme/activate/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/activate/ ---- \ No newline at end of file +layout: default +title: 'wp theme activate' +--- + +`wp theme activate` - Activate a theme. + +### OPTIONS + +<theme> +: The theme to activate. + diff --git a/commands/theme/delete/index.md b/commands/theme/delete/index.md index 2f9954a9..a4b7ff02 100644 --- a/commands/theme/delete/index.md +++ b/commands/theme/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/delete/ ---- \ No newline at end of file +layout: default +title: 'wp theme delete' +--- + +`wp theme delete` - Delete a theme. + +### OPTIONS + +<theme>... +: One or more themes to delete. + +### EXAMPLES + + wp theme delete twentyeleven + diff --git a/commands/theme/disable/index.md b/commands/theme/disable/index.md index b312bbee..8798a8c3 100644 --- a/commands/theme/disable/index.md +++ b/commands/theme/disable/index.md @@ -1,4 +1,23 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/disable/ ---- \ No newline at end of file +layout: default +title: 'wp theme disable' +--- + +`wp theme disable` - Disable a theme in a 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 + + wp theme disable twentythirteen + + wp theme disable twentythirteen --network + diff --git a/commands/theme/enable/index.md b/commands/theme/enable/index.md index ebed834c..854893fd 100644 --- a/commands/theme/enable/index.md +++ b/commands/theme/enable/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/enable/ ---- \ No newline at end of file +layout: default +title: 'wp theme enable' +--- + +`wp theme enable` - Enable a theme in a 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 + + wp theme enable twentythirteen + + wp theme enable twentythirteen --network + + wp theme enable twentythirteen --activate + diff --git a/commands/theme/get/index.md b/commands/theme/get/index.md index cf178449..0d2084ad 100644 --- a/commands/theme/get/index.md +++ b/commands/theme/get/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/get/ ---- \ No newline at end of file +layout: default +title: 'wp theme get' +--- + +`wp theme get` - Get a theme + +### OPTIONS + +<theme> +: The theme to get. + +[\--field=<field>] +: Instead of returning the whole theme, returns the value of a single field. + +[\--format=<format>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + wp theme get twentytwelve --format=json + diff --git a/commands/theme/index.md b/commands/theme/index.md index 8d5c6d76..704856e2 100644 --- a/commands/theme/index.md +++ b/commands/theme/index.md @@ -1,4 +1,73 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/ ---- \ No newline at end of file +layout: default +title: 'wp theme' +--- + +`wp theme` - Manage themes. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
activateActivate a theme.
deleteDelete a theme.
disableDisable a theme in a multisite install.
enableEnable a theme in a multisite install.
getGet 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 repository.
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..d48e1e73 100644 --- a/commands/theme/install/index.md +++ b/commands/theme/install/index.md @@ -1,4 +1,34 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/install/ ---- \ No newline at end of file +layout: default +title: 'wp theme install' +--- + +`wp theme install` - Install a theme. + +### 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 twentytwelve --activate + + # 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..a844f050 100644 --- a/commands/theme/is-installed/index.md +++ b/commands/theme/is-installed/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/is-installed/ ---- \ No newline at end of file +layout: default +title: 'wp theme is-installed' +--- + +`wp theme is-installed` - Check if the theme is installed. + +### OPTIONS + +<theme> +: The theme to check. + +### EXAMPLES + + wp theme is-installed twentytwelve + diff --git a/commands/theme/list/index.md b/commands/theme/list/index.md index 94f386fc..28eaa5b5 100644 --- a/commands/theme/list/index.md +++ b/commands/theme/list/index.md @@ -1,4 +1,42 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/list/ ---- \ No newline at end of file +layout: default +title: 'wp theme list' +--- + +`wp theme list` - Get a list of themes. + +### 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>] +: Accepted values: table, json. Default: table + +### 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 + + wp theme list --status=inactive --format=csv + diff --git a/commands/theme/mod/get/index.md b/commands/theme/mod/get/index.md index b6ca8909..8923ebf6 100644 --- a/commands/theme/mod/get/index.md +++ b/commands/theme/mod/get/index.md @@ -1,4 +1,24 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/get/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod get' +--- + +`wp theme mod get` - Get theme mod(s). + +### OPTIONS + +[<mod>...] +: One or more mods to get. + +[\--all] +: List all theme mods + +[\--format=<format>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + wp theme mod get --all + wp theme mod get background_color --format=json + wp theme mod get background_color header_textcolor + diff --git a/commands/theme/mod/index.md b/commands/theme/mod/index.md index af7293b5..ebcdbea1 100644 --- a/commands/theme/mod/index.md +++ b/commands/theme/mod/index.md @@ -1,4 +1,33 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod' +--- + +`wp theme mod` - Manage theme mods. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
getGet theme mod(s).
removeRemove theme mod(s).
setSet a theme mod.
diff --git a/commands/theme/mod/remove/index.md b/commands/theme/mod/remove/index.md index 7a7382e7..05692d0f 100644 --- a/commands/theme/mod/remove/index.md +++ b/commands/theme/mod/remove/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/remove/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod remove' +--- + +`wp theme mod remove` - Remove theme mod(s). + +### OPTIONS + +[<mod>...] +: One or more mods to remove. + +[\--all] +: Remove all theme mods + +### EXAMPLES + + wp theme mod remove --all + wp theme mod remove background_color + wp theme mod remove background_color header_textcolor + diff --git a/commands/theme/mod/set/index.md b/commands/theme/mod/set/index.md index 802367dd..5c0c58e1 100644 --- a/commands/theme/mod/set/index.md +++ b/commands/theme/mod/set/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/mod/set/ ---- \ No newline at end of file +layout: default +title: 'wp theme mod set' +--- + +`wp theme mod set` - Set a theme mod. + +### OPTIONS + +<mod> +: The name of the theme mod to set or update. + +<value> +: The new value. + +### EXAMPLES + + wp theme mod set background_color 000000 + diff --git a/commands/theme/path/index.md b/commands/theme/path/index.md index 33cefc57..ecd10efd 100644 --- a/commands/theme/path/index.md +++ b/commands/theme/path/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/path/ ---- \ No newline at end of file +layout: default +title: 'wp theme path' +--- + +`wp theme path` - Get the path to a theme or to the theme directory. + +### 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 + + cd $(wp theme path) + diff --git a/commands/theme/search/index.md b/commands/theme/search/index.md index 727c8ba2..182336a1 100644 --- a/commands/theme/search/index.md +++ b/commands/theme/search/index.md @@ -1,4 +1,41 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/search/ ---- \ No newline at end of file +layout: default +title: 'wp theme search' +--- + +`wp theme search` - Search the wordpress.org theme repository. + +### 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 plugin. + +[\--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>] +: Accepted values: table, csv, json, count. Default: table + +### EXAMPLES + + wp theme search automattic --per-page=20 + + wp theme search automattic --fields=name,version,slug,rating,num_ratings,description + diff --git a/commands/theme/status/index.md b/commands/theme/status/index.md index 3af22e0e..bab206fb 100644 --- a/commands/theme/status/index.md +++ b/commands/theme/status/index.md @@ -1,4 +1,12 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/status/ ---- \ No newline at end of file +layout: default +title: 'wp theme status' +--- + +`wp theme status` - See the status of one or all themes. + +### OPTIONS + +[<theme>] +: A particular theme to show the status for. + 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..d6e423c6 100644 --- a/commands/theme/update/index.md +++ b/commands/theme/update/index.md @@ -1,4 +1,28 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/theme/update/ ---- \ No newline at end of file +layout: default +title: 'wp theme update' +--- + +`wp theme update` - Update one or more themes. + +### OPTIONS + +[<theme>...] +: One or more themes to update. + +[\--all] +: If set, all themes that have updates will be updated. + +[\--version=<version>] +: If set, the theme will be updated to the latest development version, +regardless of what version is currently installed. + +[\--dry-run] +: Preview which themes would be updated. + +### EXAMPLES + + wp theme update twentyeleven twentytwelve + + wp theme update --all + diff --git a/commands/transient/delete-all/index.md b/commands/transient/delete-all/index.md new file mode 100644 index 00000000..a86c41fe --- /dev/null +++ b/commands/transient/delete-all/index.md @@ -0,0 +1,9 @@ +--- +layout: default +title: 'wp transient delete-all' +--- + +`wp transient delete-all` - Delete all transients. + + + diff --git a/commands/transient/delete-expired/index.md b/commands/transient/delete-expired/index.md new file mode 100644 index 00000000..7a45fc3a --- /dev/null +++ b/commands/transient/delete-expired/index.md @@ -0,0 +1,9 @@ +--- +layout: default +title: 'wp transient delete-expired' +--- + +`wp transient delete-expired` - Delete all expired transients. + + + diff --git a/commands/transient/delete/index.md b/commands/transient/delete/index.md index d938d89c..7a96fa5a 100644 --- a/commands/transient/delete/index.md +++ b/commands/transient/delete/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/delete/ ---- \ No newline at end of file +layout: default +title: 'wp transient delete' +--- + +`wp transient delete` - Delete a transient value. + + + diff --git a/commands/transient/get/index.md b/commands/transient/get/index.md index 8a0c8a80..2cfa2ec1 100644 --- a/commands/transient/get/index.md +++ b/commands/transient/get/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/get/ ---- \ No newline at end of file +layout: default +title: 'wp transient get' +--- + +`wp transient get` - Get a transient value. + + + diff --git a/commands/transient/index.md b/commands/transient/index.md index 95839b6d..d141f55b 100644 --- a/commands/transient/index.md +++ b/commands/transient/index.md @@ -1,4 +1,47 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/ ---- \ No newline at end of file +layout: default +title: 'wp transient' +--- + +`wp transient` - Manage transients. + +### EXAMPLES + + wp transient set my_key my_value 300 + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
deleteDelete a transient value.
delete-allDelete all transients.
delete-expiredDelete all expired transients.
getGet a transient value.
setSet a transient value. <expiration> is the time until expiration, in seconds.
typeSee whether the transients API is using an object cache or the options table.
diff --git a/commands/transient/set/index.md b/commands/transient/set/index.md index e8131ad5..4b2f5df0 100644 --- a/commands/transient/set/index.md +++ b/commands/transient/set/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/set/ ---- \ No newline at end of file +layout: default +title: 'wp transient set' +--- + +`wp transient set` - Set a transient value. <expiration> is the time until expiration, in seconds. + + + diff --git a/commands/transient/type/index.md b/commands/transient/type/index.md index 9914fb9e..ea8a83a6 100644 --- a/commands/transient/type/index.md +++ b/commands/transient/type/index.md @@ -1,4 +1,9 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/transient/type/ ---- \ No newline at end of file +layout: default +title: 'wp transient type' +--- + +`wp transient type` - See whether the transients API is using an object cache or the options table. + + + diff --git a/commands/user/add-cap/index.md b/commands/user/add-cap/index.md index da5f3867..e7a118fd 100644 --- a/commands/user/add-cap/index.md +++ b/commands/user/add-cap/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/add-cap/ ---- \ No newline at end of file +layout: default +title: 'wp user add-cap' +--- + +`wp user add-cap` - Add a capability for a user. + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<cap> +: The capability to add. + +### EXAMPLES + + wp user add-cap john create_premium_item + wp user add-cap 15 edit_product + diff --git a/commands/user/add-role/index.md b/commands/user/add-role/index.md index 36ade048..11996b6d 100644 --- a/commands/user/add-role/index.md +++ b/commands/user/add-role/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/add-role/ ---- \ No newline at end of file +layout: default +title: 'wp user add-role' +--- + +`wp user add-role` - Add a role for a user. + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<role> +: Add the specified role to the user. + +### EXAMPLES + + wp user add-role bob author + wp user add-role 12 author + diff --git a/commands/user/create/index.md b/commands/user/create/index.md index 7dbd1471..6535e4d0 100644 --- a/commands/user/create/index.md +++ b/commands/user/create/index.md @@ -1,4 +1,43 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/create/ ---- \ No newline at end of file +layout: default +title: 'wp user create' +--- + +`wp user create` - Create a user. + +### 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 + + wp user create bob bob@example.com --role=author + diff --git a/commands/user/delete/index.md b/commands/user/delete/index.md index 806726e1..36a4df72 100644 --- a/commands/user/delete/index.md +++ b/commands/user/delete/index.md @@ -1,4 +1,26 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/delete/ ---- \ No newline at end of file +layout: default +title: 'wp user delete' +--- + +`wp user delete` - Delete one or more users from the current site. + +### OPTIONS + +<user>... +: The user login, user email, or user ID of the user(s) to update. + +[\--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 propmts. + +### EXAMPLES + + # Delete user 123 and reassign posts to user 567 + wp user delete 123 --reassign=567 + diff --git a/commands/user/generate/index.md b/commands/user/generate/index.md index 947db510..6a97c6a3 100644 --- a/commands/user/generate/index.md +++ b/commands/user/generate/index.md @@ -1,4 +1,15 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/generate/ ---- \ No newline at end of file +layout: default +title: 'wp user generate' +--- + +`wp user generate` - Generate users. + +### OPTIONS + +[\--count=<number>] +: How many users to generate. Default: 100 + +[\--role=<role>] +: The role of the generated users. Default: default role from WP + diff --git a/commands/user/get/index.md b/commands/user/get/index.md index 00539b88..acfa5c30 100644 --- a/commands/user/get/index.md +++ b/commands/user/get/index.md @@ -1,4 +1,27 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/get/ ---- \ No newline at end of file +layout: default +title: 'wp user get' +--- + +`wp user get` - Get a single user. + +### 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>] +: Accepted values: table, json. Default: table + +### EXAMPLES + + wp user get 12 --field=login + + 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..0f10ef57 100644 --- a/commands/user/import-csv/index.md +++ b/commands/user/import-csv/index.md @@ -1,4 +1,30 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/import-csv/ ---- \ No newline at end of file +layout: default +title: 'wp user import-csv' +--- + +`wp user import-csv` - Import users from a CSV file. + +### 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 + + wp user import-csv /path/to/users.csv + wp user import-csv http://example.com/users.csv + + Sample users.csv file: + + user_login,user_email,display_name,role + bobjones,bobjones@domain.com,Bob Jones,contributor + newuser1,newuser1@domain.com,New User,author + existinguser,existinguser@domain.com,Existing User,administrator + diff --git a/commands/user/index.md b/commands/user/index.md index 4a796672..ff7a9874 100644 --- a/commands/user/index.md +++ b/commands/user/index.md @@ -1,4 +1,77 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/ ---- \ No newline at end of file +layout: default +title: 'wp user' +--- + +`wp user` - Manage users. + + + +### SUBCOMMANDS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
add-capAdd a capability for a user.
add-roleAdd a role for a user.
createCreate a user.
deleteDelete one or more users from the current site.
generateGenerate users.
getGet a single user.
import-csvImport users from a CSV file.
listList users.
list-capsList all user's capabilities.
metaManage user custom fields.
remove-capRemove a user's capability.
remove-roleRemove a user's role.
set-roleSet the user role (for a particular blog).
updateUpdate a user.
diff --git a/commands/user/list-caps/index.md b/commands/user/list-caps/index.md index 26e8b1d2..524c060f 100644 --- a/commands/user/list-caps/index.md +++ b/commands/user/list-caps/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/list-caps/ ---- \ No newline at end of file +layout: default +title: 'wp user list-caps' +--- + +`wp user list-caps` - List all user's capabilities. + +### OPTIONS + +<user> +: User ID, user email, or login. + +### EXAMPLES + + wp user list-caps admin + wp user list-caps 21 + diff --git a/commands/user/list/index.md b/commands/user/list/index.md index cf171af0..0b877c2f 100644 --- a/commands/user/list/index.md +++ b/commands/user/list/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/list/ ---- \ No newline at end of file +layout: default +title: 'wp user list' +--- + +`wp user list` - List users. + +### OPTIONS + +[\--role=<role>] +: Only display users with a certain role. + +[\--<field>=<value>] +: Control output by one or more arguments of get_users(). + +[\--field=<field>] +: Prints the value of a single field for each user. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count. Default: table + +### 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 + +### EXAMPLES + + wp user list --field=ID + + wp user list --role=administrator --format=csv + + wp user list --fields=display_name,user_email --format=json + diff --git a/commands/user/meta/add/index.md b/commands/user/meta/add/index.md index fd972561..a6b72b0c 100644 --- a/commands/user/meta/add/index.md +++ b/commands/user/meta/add/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/add/ ---- \ No newline at end of file +layout: default +title: 'wp user meta add' +--- + +`wp user meta add` - Add a meta field. + +<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. + diff --git a/commands/user/meta/delete/index.md b/commands/user/meta/delete/index.md index e6577e1b..927aa366 100644 --- a/commands/user/meta/delete/index.md +++ b/commands/user/meta/delete/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/delete/ ---- \ No newline at end of file +layout: default +title: 'wp user meta delete' +--- + +`wp user meta delete` - Delete a meta field. + +<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. + diff --git a/commands/user/meta/get/index.md b/commands/user/meta/get/index.md index 4529e883..47dd0bc5 100644 --- a/commands/user/meta/get/index.md +++ b/commands/user/meta/get/index.md @@ -1,4 +1,18 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/get/ ---- \ No newline at end of file +layout: default +title: 'wp user meta get' +--- + +`wp user meta get` - Get meta field value. + +### OPTIONS + +<user> +: The user login, user email, or user ID of the user to get metadata for. + +<key> +: The metadata key. + +[\--format=<format>] +: Accepted values: table, json. Default: table + diff --git a/commands/user/meta/index.md b/commands/user/meta/index.md index 3998b2d0..4a2cbd17 100644 --- a/commands/user/meta/index.md +++ b/commands/user/meta/index.md @@ -1,4 +1,50 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/ ---- \ No newline at end of file +layout: default +title: 'wp user meta' +--- + +`wp user meta` - Manage user custom fields. + +### OPTIONS + +\--format=json +: Encode/decode values as JSON. + +### EXAMPLES + + wp user meta set 123 description "Mary is a WordPress developer." + + wp user meta update admin first_name "George" + +### 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/user/meta/list/index.md b/commands/user/meta/list/index.md index 4191b53a..c768563d 100644 --- a/commands/user/meta/list/index.md +++ b/commands/user/meta/list/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/list/ ---- \ No newline at end of file +layout: default +title: 'wp user meta list' +--- + +`wp user meta list` - List all metadata associated with an object. + +<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/user/meta/update/index.md b/commands/user/meta/update/index.md index 35533144..2aa3dca8 100644 --- a/commands/user/meta/update/index.md +++ b/commands/user/meta/update/index.md @@ -1,4 +1,16 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/meta/update/ ---- \ No newline at end of file +layout: default +title: 'wp user meta update' +--- + +`wp user meta update` - Update a meta field. + +<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. + diff --git a/commands/user/remove-cap/index.md b/commands/user/remove-cap/index.md index ab1faead..3b9d051b 100644 --- a/commands/user/remove-cap/index.md +++ b/commands/user/remove-cap/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/remove-cap/ ---- \ No newline at end of file +layout: default +title: 'wp user remove-cap' +--- + +`wp user remove-cap` - Remove a user's capability. + +### OPTIONS + +<user> +: User ID, user email, or user login. + +<cap> +: The capability to be removed. + +### EXAMPLES + + wp user remove-cap bob edit_themes + wp user remove-cap 11 publish_newsletters + diff --git a/commands/user/remove-role/index.md b/commands/user/remove-role/index.md index e5e03675..938a74f0 100644 --- a/commands/user/remove-role/index.md +++ b/commands/user/remove-role/index.md @@ -1,4 +1,20 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/remove-role/ ---- \ No newline at end of file +layout: default +title: 'wp user remove-role' +--- + +`wp user remove-role` - Remove a user's role. + +### OPTIONS + +<user> +: User ID, user email, or user login. + +[<role>] +: A specific role to remove. + +### EXAMPLES + + wp user remove-role bob + wp user remove-role 12 editor + diff --git a/commands/user/session/destroy/index.md b/commands/user/session/destroy/index.md deleted file mode 100644 index e9b02858..00000000 --- a/commands/user/session/destroy/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/destroy/ ---- \ No newline at end of file diff --git a/commands/user/session/index.md b/commands/user/session/index.md deleted file mode 100644 index 042918fb..00000000 --- a/commands/user/session/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/ ---- \ No newline at end of file diff --git a/commands/user/session/list/index.md b/commands/user/session/list/index.md deleted file mode 100644 index cf3718a7..00000000 --- a/commands/user/session/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/session/list/ ---- \ No newline at end of file diff --git a/commands/user/set-role/index.md b/commands/user/set-role/index.md index 91ae263c..4b513bfa 100644 --- a/commands/user/set-role/index.md +++ b/commands/user/set-role/index.md @@ -1,4 +1,21 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/set-role/ ---- \ No newline at end of file +layout: default +title: 'wp user set-role' +--- + +`wp user set-role` - Set the user role (for a particular blog). + +### 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 bob author + wp user set-role 12 author + diff --git a/commands/user/term/add/index.md b/commands/user/term/add/index.md deleted file mode 100644 index 2d30ee79..00000000 --- a/commands/user/term/add/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/add/ ---- \ No newline at end of file diff --git a/commands/user/term/index.md b/commands/user/term/index.md deleted file mode 100644 index 475e9bfb..00000000 --- a/commands/user/term/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/ ---- \ No newline at end of file diff --git a/commands/user/term/list/index.md b/commands/user/term/list/index.md deleted file mode 100644 index 478e0df0..00000000 --- a/commands/user/term/list/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/list/ ---- \ No newline at end of file diff --git a/commands/user/term/remove/index.md b/commands/user/term/remove/index.md deleted file mode 100644 index eea3816c..00000000 --- a/commands/user/term/remove/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/remove/ ---- \ No newline at end of file diff --git a/commands/user/term/set/index.md b/commands/user/term/set/index.md deleted file mode 100644 index 6071bdac..00000000 --- a/commands/user/term/set/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/term/set/ ---- \ No newline at end of file diff --git a/commands/user/update/index.md b/commands/user/update/index.md index 5bacc5d5..5c9cc617 100644 --- a/commands/user/update/index.md +++ b/commands/user/update/index.md @@ -1,4 +1,19 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/user/update/ ---- \ No newline at end of file +layout: default +title: 'wp user update' +--- + +`wp user update` - Update a user. + +### 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 + + wp user update 123 --display_name=Mary --user_pass=marypass + diff --git a/commands/widget/add/index.md b/commands/widget/add/index.md index 6ba31d44..a6feb9b2 100644 --- a/commands/widget/add/index.md +++ b/commands/widget/add/index.md @@ -1,4 +1,23 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/add/ ---- \ No newline at end of file +layout: default +title: 'wp widget add' +--- + +`wp widget add` - Add a widget to a sidebar. + +<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 + + wp widget add calendar sidebar-1 2 --title="Calendar" + diff --git a/commands/widget/deactivate/index.md b/commands/widget/deactivate/index.md index 6e100687..fdd58c42 100644 --- a/commands/widget/deactivate/index.md +++ b/commands/widget/deactivate/index.md @@ -1,4 +1,14 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/deactivate/ ---- \ No newline at end of file +layout: default +title: 'wp widget deactivate' +--- + +`wp widget deactivate` - Deactivate one or more widgets from an active sidebar. + +<widget-id>... +: Unique ID for the widget(s) + +### EXAMPLES + + wp widget deactivate recent-comments-2 + diff --git a/commands/widget/delete/index.md b/commands/widget/delete/index.md index 150dbfbf..083ca9b9 100644 --- a/commands/widget/delete/index.md +++ b/commands/widget/delete/index.md @@ -1,4 +1,14 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/delete/ ---- \ No newline at end of file +layout: default +title: 'wp widget delete' +--- + +`wp widget delete` - Delete one or more widgets from a sidebar. + +<widget-id>... +: Unique ID for the widget(s) + +### EXAMPLES + + wp widget delete recent-comments-2 + diff --git a/commands/widget/index.md b/commands/widget/index.md index dc0c96f4..350ae6d0 100644 --- a/commands/widget/index.md +++ b/commands/widget/index.md @@ -1,4 +1,57 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/ ---- \ No newline at end of file +layout: default +title: 'wp widget' +--- + +`wp widget` - Manage sidebar widgets. + +### EXAMPLES + + # List widgets on a given sidebar + wp widget list sidebar-1 + + # Add a calendar widget to the second position on the sidebar + wp widget add calendar sidebar-1 2 + + # Update option(s) associated with a given widget + wp widget update calendar-1 --title="Calendar" + + # Delete one or more widgets entirely + wp widget delete calendar-2 archive-1 + +### 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 a widget from one position on a sidebar to another.
updateUpdate a given widget's options.
diff --git a/commands/widget/list/index.md b/commands/widget/list/index.md index de12b972..cde0cb58 100644 --- a/commands/widget/list/index.md +++ b/commands/widget/list/index.md @@ -1,4 +1,31 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/list/ ---- \ No newline at end of file +layout: default +title: 'wp widget list' +--- + +`wp widget list` - List widgets associated with a sidebar. + +<sidebar-id> +: ID for the corresponding sidebar. + +[\--fields=<fields>] +: Limit the output to specific object fields. + +[\--format=<format>] +: Accepted values: table, csv, json, count, ids. Default: table + +### AVAILABLE FIELDS + +These fields will be displayed by default for each widget: + +* name +* id +* position +* options + +There are no optionally available fields. + +### EXAMPLES + + wp sidebar widget list <sidebar-id> --fields=name --format=csv + diff --git a/commands/widget/move/index.md b/commands/widget/move/index.md index 54233007..a58cffbe 100644 --- a/commands/widget/move/index.md +++ b/commands/widget/move/index.md @@ -1,4 +1,22 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/move/ ---- \ No newline at end of file +layout: default +title: 'wp widget move' +--- + +`wp widget move` - Move a widget from one position on a sidebar to another. + +<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 + + wp widget move recent-comments-2 --position=2 + + wp widget move recent-comments-2 --sidebar-id=wp_inactive_widgets + diff --git a/commands/widget/reset/index.md b/commands/widget/reset/index.md deleted file mode 100644 index afd346fd..00000000 --- a/commands/widget/reset/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/reset/ ---- \ No newline at end of file diff --git a/commands/widget/update/index.md b/commands/widget/update/index.md index 5ec3a1df..0ff4e712 100644 --- a/commands/widget/update/index.md +++ b/commands/widget/update/index.md @@ -1,4 +1,17 @@ --- -redirect_to: - - https://developer.wordpress.org/cli/commands/widget/update/ ---- \ No newline at end of file +layout: default +title: 'wp widget update' +--- + +`wp widget update` - Update a given widget's options. + +<widget-id> +: Unique ID for the widget + +[\--<field>=<value>] +: Field to update, with its new value + +### EXAMPLES + + wp widget update calendar-1 --title="Calendar" + diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..1fd2cd34 --- /dev/null +++ b/composer.json @@ -0,0 +1,6 @@ +{ + "require-dev": { + "jaz303/phake": "0.5.1", + "mustache/mustache": "~2.4" + } +} diff --git a/config/index.md b/config/index.md new file mode 100644 index 00000000..c52a683d --- /dev/null +++ b/config/index.md @@ -0,0 +1,49 @@ +--- +layout: default +title: Configuration +--- +WP-CLI has a series of global parameters which work with all commands. They can be specified either as flags for the `wp` executable in the terminal, or defined in a YAML config file. + +The order of precedence, from highest priority to lowest, is: + +1. Command-line flags +1. `wp-cli.local.yml` file inside the current working directory (or upwards) +1. `wp-cli.yml` file inside the current working directory (or upwards) +1. `~/.wp-cli/config.yml` file (path can be changed by setting the `WP_CLI_CONFIG_PATH` environment variable) +1. Defaults + +The table below lists the available options (specified in the configuration file) and flags (specified on the command-line). + + + + + + + + + + + {% include param-list.html %} + +
DescriptionOptionFlag
+ +Besides the global parameters described above, config files can also contain defaults for any subcommand. + +Example `wp-cli.yml` file: + + path: wp-core + url: http://example.com + user: admin + color: false + disabled_commands: + - db drop + - plugin install + require: + - path-to/command.php + + core config: + dbuser: root + dbpass: + extra-php: | + define( 'WP_DEBUG', true ); + define( 'WP_POST_REVISIONS', 50 ); diff --git a/de/index.md b/de/index.md deleted file mode 100644 index 0e845141..00000000 --- a/de/index.md +++ /dev/null @@ -1,228 +0,0 @@ -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: - - - -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") - -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: - -```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 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: - -```bash -$ 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. - -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. - -## 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.)). - -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 - -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: - -```bash -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: - -```bash -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: - -```bash -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: -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 -``` - -### 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. - -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. - -### 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: - -```bash -source /ABSOLUTER/PFAD/ZUR/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: - -- [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.) - -Wenn du auf keiner dieser Seiten eine Antwort findest, kannst du folgendes tun: - -* 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 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 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. - -## 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. - -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. - -```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 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. - -## 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. - -**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. - -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. - -## Projektleitung - -WP-CLI hat einen Projektbetreuer: [schlessera](https://github.com/schlessera) (engl.). - -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. - -Lies dir das [Verwaltungsdokument im Handbuch](https://make.wordpress.org/cli/handbook/governance/) (engl.) für mehr operative Informationen bezüglich dieses Projekts durch. - -## Credits - -Neben den Bibliotheken, die in der [composer.json](composer.json)-Datei erwähnt werden, benutzen 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` diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 34f08659..00000000 --- a/docs/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -redirect_to: - - https://make.wordpress.org/cli/handbook/ ---- 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 deleted file mode 100644 index 20570f84..00000000 --- a/fr/index.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -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) - -## 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 : - -```bash -$ 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 '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 : - -```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/). - -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. - -## 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/). - -Avant d'installer WP-CLI, veuillez vous assurer que votre environnement répond 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 -- 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` : - -```bash -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 -``` - -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 -``` - -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 -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 -``` - -### 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 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 - -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`: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Si vous voulez l'utiliser directement sans redémarrer votre session de terminal, n'oubliez pas de lancer `source ~/.bash_profile`. - -Si vous utilisez le shell zsh, vous devrez probablement charger et démarrer `bashcompinit` avant d'utiliser la commande `source`. Ajouter ces lignes dans votre fichier `.zshrc`: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## Soutien - -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/) -- [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 : - -- 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é. - -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. - -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. - -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. - -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. - -```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 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. - -## 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. - -**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. - -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. - -## 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) - -À 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. - -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). - -## 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` -* [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` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) pour `wp scaffold plugin-tests` diff --git a/gr/index.md b/gr/index.md deleted file mode 100644 index a3692981..00000000 --- a/gr/index.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -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). - -[![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") - -Γρήγοροι σύνδεσμοι: [Χρήση](#using) | [Εγκατάσταση](#installing) | [Υποστήριξη](#support) | [Επέκταση](#extending) | [Συνεισφορά](#contributing) | [Ευχαριστίες](#credits) - -## Χρήση - -Ο σκοπός του WP-CLI είναι η παροχή μίας διεπαφής γραμμής εντολών για κάθε ενέργεια που μπορεί να θέλετε να εκτελέσετε στο διαχειριστικό περιβάλλον του WordPress. Για παράδειγμα, η εντολή `wp plugin install --activate` ([τεκμηρίωση](https://wp-cli.org/commands/plugin/install/)) σας επιτρέπει να εγκαταστήσετε και να ενεργοποιήσετε ένα πρόσθετο WordPress: - -```bash -$ 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 'rest-api'... -Success: Plugin 'rest-api' activated. -``` - -Το WP-CLI περιλαμβάνει επίσης εντολές για πολλά πράγματα που δεν μπορείτε να κάνετε στο διαχειριστικό περιβάλλον του WordPress. Για παράδειγμα, η εντολή `wp transient delete-all` ([τεκμηρίωση](https://wp-cli.org/commands/transient/delete-all/)) σας επιτρέπει να διαγράψετε ένα ή όλα τα transients: - -```bash -$ wp transient delete-all -Success: 34 transients deleted from the database. -``` - -Για μία πιο ολοκληρωμένη εισαγωγή στη χρήση του WP-CLI, διαβάστε τον [οδηγό γρήγορης εκκίνησης](https://wp-cli.org/docs/quick-start/). - -Αισθάνεστε ήδη άνετα με τα βασικά; Προχωρήστε στην [πλήρη λίστα εντολών](https://wp-cli.org/commands/) για λεπτομερείς πληροφορίες για το πως να διαχειρίζεστε τα θέματα και τα πρόσθετα, να εισάγετε και να εξάγετε δεδομένα, να εκτελείτε λειτουργίες εύρεσης-αντικατάστασης στη βάση δεδομένων και πολλά περισσότερα. - -## Εγκατάσταση - -Μεταφορτώνοντας το αρχείο Phar είναι ο δικός μας προτεινόμενος τρόπος. Εάν χρειάζεται, δείτε επίσης την τεκμηρίωσή μας για [εναλλακτικές μεθόδους εγκατάστασης](https://wp-cli.org/docs/installing/). - -Πριν την εγκατάσταση του WP-CLI, παρακαλούμε βεβαιωθείτε ότι το περιβάλλον σας ανταποκρίνεται στις ελάχιστες απαιτήσεις: - -- Περιβάλλον UNIX-like (OS X, Linux, FreeBSD, Cygwin), περιορισμένη υποστήριξη σε περιβάλλον Windows -- 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`: - -```bash -$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.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 -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: 0.25.0 -``` - -### Ενημέρωση - -Μπορείτε να ενημερώσετε το WP-CLI με την εντολή `wp cli update` ([τεκμηρίωση](https://wp-cli.org/commands/cli/update/)), ή επαναλαμβάνοντας τα βήματα εγκατάστασης. - -Θέλετε να ζείτε τη ζωή στα άκρα; Εκτελέστε `wp cli update --nightly` για να χρησιμοποιήσετε την τελευταία nightly build WP-CLI. Το nightly build είναι αρκετά ασφαλές για να χρησιμοποιηθεί σε δοκιμαστικό περιβάλλον, και πάντα περιλαμβάνει τα τελευταία και καλύτερα χαρακτηριστικά του WP-CLI. - -### Συμπληρώσεις Tab - -Το WP-CLI έρχεται επίσης με ένα αρχείο για συμπλήρωση tab για το Bash και το ZSH. Απλά μεταφορτώστε το [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) και προσθέστε την παρακάτω γραμμή στο αρχείο `~/.bash_profile`: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Μην ξεχάσετε να εκτελέσετε την εντολή `source ~/.bash_profile` μετά. - -Αν χρησιμοποιείτε zsh για κέλυφος, ίσως χρειαστεί να φορτώσετε και να εκκινήσετε το `bashcompinit` πριν το source. Τοποθετείστε το παρακάτων στο στο αρχείο σας `.zshrc`: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## Υποστήριξη - -Τα άτομα που συντηρούν το WP-CLI και συνεισφέρουν σε αυτό, κάνουν ότι καλύτερο μπορούν για να απαντάνε σε όλα τα νέα θέματα εγκαίρως. Για να κάνετε τη βέλτιστη χρήση του εθελοντικού τους χρόνου, παρακαλώ δείτε πρώτα μήπως υπάρχει απάντηση στην ερώτησή σας σε έναν από τους ακόλουθους συνδέσμους: - -- [Κοινά προβλήματα και λύσεις τους](https://wp-cli.org/docs/common-issues/) -- [Βέλτιστες πρακτικές για υποβολή αναφοράς σφάλματος](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) - -Αν δε μπορείτε να βρείτε απάντηση σε ένα από τις υπάρχουσες πηγές, [δημιουργήστε ένα θέμα](https://github.com/wp-cli/wp-cli/issues/new) με την ερώτησή σας. - -Παρακαλώ μη ζητάτε υποστήριξη στο Twitter. Το Twitter δεν είναι αποδεκτός χώρος για υποστήριξη επειδή: 1) είναι δύσκολο να διατηρήσεις συζητήσεις σε κάτω από 140 χαρακτήρες, και 2) το Twitter δεν είναι ένας χώρος όπου κάποιος με την ίδια ερώτηση με εσάς μπορεί να ψάξει για απάντηση σε προηγούμενη συζήτηση. - -Αν έχετε λογαριασμό στο WordPress.org, μπορείτε επίσης να συμμετέχετε στο κανάλι `#cli` του [WordPress.org Slack](https://make.wordpress.org/chat/). - -## Επέκταση - -Μία **εντολή** είναι μια ατομική μονάδα λειτουργικότητας του WP-CLI. Η `wp plugin install` ([τεκμηρίωση](https://wp-cli.org/commands/plugin/install/)) είναι μία εντολή. Η `wp plugin activate` ([τεκμηρίωση](https://wp-cli.org/commands/plugin/activate/)) είναι μία άλλη. - -Το WP-CLI υποστηρίζει την καταχώρηση σαν μία εντολή κάθε κλάσης ή συνάρτησης που μπορεί να καλεστεί. Διαβάζει λεπτομέρειες χρήσης από το PHPdoc. Το `WP_CLI::add_command()` ([τεκμηρίωση](https://wp-cli.org/docs/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://wp-cli.org/docs/commands-cookbook/) για να μάθετε περισσότερα. Πλοηγηθείτε στην [τεκμηρίωση εσωτερικού API](https://wp-cli.org/docs/internal-api/) για να ανακαλύψετε μια ποικιλία από χρήσιμες συναρτήσεις που μπορείτε να χρησιμοποιήσετε στη δική σας WP-CLI εντολή. - -## Συνεισφορά - -Καλώς ήρθατε και ευχαριστούμε! - -Εκτιμούμε που παίρνετε την πρωτοβουλία να συνεισφέρετε στο WP-CLI. Οφείλετε σας εσάς και στην κοινότητα γύρω σας το γεγονός ότι το WP-CLI είναι ένα τόσο ωραίο έργο. - -**Η συνεισφορά δεν περιορίζεται μόνο σε κώδικα.** Σας ενθαρρύνουμε να συνεισφέρετε με όποιον τρόπο θεωρείτε ότι ταιριάζει στις ικανότητές σας, γράφοντας οδηγούς χρήσης, κάνοντας μια παρουσίαση στην τοπική σας ομάδα, βοηθώντας άλλους χρήστες με τις ερωτήσεις τους, ή αναθεωρώντας την τεκμηρίωσή μας. - -Παρακαλούμε αφιερώστε λίγο χρόνο για να [διαβάσετε αυτές τις κατευθηντήριες γραμμές σε βάθος](https://wp-cli.org/docs/contributing/). Ακολουθώντας τις, βοηθάει να επικοινωνηθεί ότι σέβεστε το χρόνο των άλλων ατόμων που συνεισφέρουν στο έργο. Με τη σειρά τους, αυτοί θα κάνουν ότι καλύτερο να ανταποδώσουν αυτόν το σεβασμό όταν θα δουλεύουν μαζί σας, σε διάφες ζώνες ώρας και από όλο τον κόσμο. - -## Ομάδα - -Η βασική ομάδα του WP-CLI αποτελείται από τα ακόλουθα άτομα: - -* [Daniel Bachhuber](https://github.com/danielbachhuber/) - συντήρηση (τώρα) -* [Cristi Burcă](https://github.com/scribu) - συντήρηση (παλαιότερα) -* [Andreas Creten](https://github.com/andreascreten) - ιδρυτής - -Διαβάστε περισσότερα σχετικά με τη [διακυβέρνηση](https://wp-cli.org/docs/governance/) του έργου και δείτε την [πλήρη λίστα με τα άτομα που έχουν συνεισφέρει](https://github.com/wp-cli/wp-cli/contributors). - -## Ευχαριστίες - -Εκτός τις βιβλιοθήκες που ορίζονται στο [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` -* [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/index.md b/index.md index fe828d3b..cab30e94 100644 --- a/index.md +++ b/index.md @@ -1,228 +1,133 @@ -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") - -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: - -```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 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: - -```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. - -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. - -## Installing +--- +layout: default +title: Command line interface for WordPress +--- +**WP-CLI** is a set of command-line tools for managing [WordPress](http://wordpress.org) installations. You can update plugins, set up multisite installs and much more, without using a web browser. -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)). +

Requirements

-Before installing WP-CLI, please make sure your environment meets the minimum requirements: +* UNIX-like environment (OS X, Linux, FreeBSD, Cygwin) +* PHP 5.3.2 or later +* WordPress 3.5.2 or later -- 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 +

Installing (And Upgrading)

-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`: +First, download [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) using `wget` or `curl`. For example: -```bash +~~~ 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: -```bash +Then, check if it works: + +~~~ 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: +To be able to type just `wp`, instead of `php wp-cli.phar`, you need to 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 -``` - -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: -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 -``` +~~~ -### Updating +Now try running `wp --info`. -You can update WP-CLI with `wp cli update` ([doc](https://developer.wordpress.org/cli/commands/cli/update/)), or by repeating the installation steps. +Upgrade using the same procedure. -If WP-CLI is owned by root or another system user, you'll need to run `sudo wp cli update`. +

MAMP

-Want to live life on the edge? Run `wp cli update --nightly` to use the latest nightly build of WP-CLI. The nightly build is more or less stable enough for you to use in your development environment, and always includes the latest and greatest WP-CLI features. +If you're using MAMP, you will probably get a MySQL error, because the `php` found in your PATH is not the same as the PHP used by MAMP. Here is one way to [fix it](http://stackoverflow.com/a/10653443/97998). -### Tab completions +More resources: -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`: +* [Getting Started with WP-CLI](https://trepmal.com/2014/02/22/getting-started-with-wp-cli/) (includes video) +* [Alternative Install Methods](https://github.com/wp-cli/wp-cli/wiki/Alternative-Install-Methods) -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Don't forget to run `source ~/.bash_profile` afterwards. +

Tab completions

-If using zsh for your shell, you may need to load and start `bashcompinit` before sourcing. Put the following in your `.zshrc`: +WP-CLI also comes with a tab completion script for Bash. Just download [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) and source it from `~/.bash_profile`: -```bash -autoload bashcompinit -bashcompinit +~~~ source /FULL/PATH/TO/wp-completion.bash -``` +~~~ -## Support +(Don't forget to run `source ~/.bash_profile` afterwards) -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. +

Using

-When looking for support, please first search for your question in these venues: +Go into a WordPress root folder: -* [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) +~~~ +cd /var/www/wp/ +~~~ -If you didn't find an answer in one of the venues above, you can: +Typing `wp` should show you output similar to this: -* 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. +~~~ +Available commands: + wp blog create|delete + wp cache add|decr|delete|flush|get|incr|replace|set|type + wp comment create|delete|trash|untrash|spam|unspam|approve|unapprove|count|status|last + wp core download|config|is-installed|install|install-network|version|update|update-db + wp db create|drop|reset|optimize|repair|connect|cli|query|export|import + wp eval-file + ... -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. +See 'wp help ' for more information on a specific command. +~~~ -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. +Let's try to install the Hello Dolly plugin from wordpress.org: -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. +~~~ +wp plugin install hello-dolly +~~~ -## Extending +Output: -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. +~~~ +Installing Hello Dolly (1.5) -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. +Downloading install package from http://downloads.WordPress.org/plugin/hello-dolly.1.5.zip ... +Unpacking the package ... +Installing the plugin ... +Plugin installed successfully. +~~~ -```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; +

Multisite

- 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 ); -``` +On a multisite installation, you need to pass a `--url` parameter, so that WP-CLI knows which site it's supposed to be operating on: -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 theme status --url=localhost/wp/test +~~~ -## Contributing +If you have a subdomain installation, it would look like this: -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. +~~~ +wp theme status --url=test.example.com +~~~ -**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. +If you're usually working on the same site most of the time, you can create a `wp-cli.yml` file in the root directory: -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. +~~~ +url: test.example.com +~~~ -## Leadership +Then, you can call `wp` without the `--url` parameter again: -WP-CLI has two project maintainers: [schlessera](https://github.com/schlessera) and [swissspidy](https://github.com/swissspidy). +~~~ +wp theme status +~~~ -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. +

Adding commands

-Read the [governance document in the handbook](https://make.wordpress.org/cli/handbook/governance/) for more operational details about the project. +Adding commands to WP-CLI is as easy as creating a PHP class. See the [Commands Cookbook](https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook) for more info. -## Credits +Please share the commands you make by adding them to the [List of community commands](https://github.com/wp-cli/wp-cli/wiki/List-of-community-commands). -Besides the libraries defined in [composer.json](composer.json), we have used code or ideas from the following projects: +

Contributors

-* [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` +- [Contributor list](https://github.com/wp-cli/wp-cli/contributors) +- [Contributor guide](https://github.com/wp-cli/wp-cli/blob/master/CONTRIBUTING.md) diff --git a/it/index.md b/it/index.md deleted file mode 100644 index 7f845b20..00000000 --- a/it/index.md +++ /dev/null @@ -1,194 +0,0 @@ ---- -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). - -[![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") - -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: - -```bash -$ 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 'rest-api'... -Success: Plugin 'rest-api' activated. -``` - -WP-CLI include anche dei comandi per molte operazioni che normalmente non sarebbe possibile svolgere nell'area amministrativa di WordPress. Per esempio, `wp transient delete --all` ([doc](https://wp-cli.org/commands/transient/delete/)) vi permetterà di eliminare uno o tutti i transienti: - -```bash -$ wp transient delete --all -Success: 34 transients deleted from the database. -``` - -Per una più completa panoramica sull'utilizzo di WP-CLI, vi invitiamo a leggere la [Quick Start guide](https://wp-cli.org/docs/quick-start/). - -Vi sentite già a vostro agio con le basi? Andate dritti alla [lista completa dei comandi](https://wp-cli.org/commands/) per le informazioni dettagliate su come gestire temi e plugin, importare ed esportare dati, operare ricerche e sostituzioni nel database ed altro. - -## Installazione - -Come metodo di installazione, raccomandiamo di scaricare il Phar. Se vi occorre, leggete la nostra documentazione sui [metodi alternativi di installazione](https://wp-cli.org/docs/installing/). - -Prima di procedere con l'installazione di WP-CLI, vi preghiamo di assicurarvi che il vostro ambiente soddisfi i minimi requisiti richiesti: - -- Ambiente UNIX-like (OS X, Linux, FreeBSD, Cygwin); in ambienti Windows il supporto è limitato -- 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`: - -```bash -$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -Successivamente, controllate il suo funzionamento: - -```bash -$ php wp-cli.phar --info -``` - -Per richiamare WP-CLI dalla linea di comando scrivendo `wp`, rendete il file eseguibile e spostatelo nel vostro PATH, ad esempio: - -```bash -$ chmod +x wp-cli.phar -$ sudo mv wp-cli.phar /usr/local/bin/wp -``` - -Se l'installazione di WP-CLI è andata a buon fine, lanciando il comando `wp --info`, dovreste vedere qualcosa di simile: - -```bash -$ wp --info -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: 0.25.0 -``` - -### Aggiornamenti - -Potete aggiornare WP-CLI attraverso il comando `wp cli update` ([doc](https://wp-cli.org/commands/cli/update/)), oppure ripetendo i passi descritti per l'istallazione. - -Volete vivere sul filo del rasoio? Lanciate `wp cli update --nightly` per usare la versione quotidiana notturna di WP-CLI. La versione quotidiana notturna è sufficientemente stabile da essere utilizzata negli ambienti di sviluppo, e include sempre le ultime e migliori caratteristiche. - -### Autocompletamento - -WP-CLI inoltre mette a disposizione uno script per l'autocompletamento per Bash e ZSH. Basta scaricare [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) a attivarlo da `~/.bash_profile`: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Alla fine del suo utilizzo, non dimenticate di reimpostare il profilo originale digitando `source ~/.bash_profile`. - -Se state usando la shell zsh, avrete bisogno di caricare ed avviare `bashcompinit` prima di impostare il profilo. Eseguite i seguenti comandi dalla vostra `.zshrc`: - -```bash -autoload bashcompinit -bashcompinit -source /FULL/PATH/TO/wp-completion.bash -``` - -## Supporto - -I manutentori e i contributori di WP-CLI sono volontari, hanno limitate disponibilità da dedicare al supporto generale. Primariamente, cercate delle risposte nelle seguenti risorse: - -- [Problemi comuni e le loro soluzioni](https://wp-cli.org/docs/common-issues/) -- [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) - -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. - -Le questioni su Github servono a tracciare migliorie e i bachi dei comandi esistenti, non per il supporto generico. Prima di sottoporre un rapporto su un baco, vi preghiamo di [rileggere le nostre procedure](https://wp-cli.org/docs/bug-reports/) per fare in modo che il vostro problema sia indirizzato in modo tempestivo. - -Vi preghiamo di non richiedere supporto su Twitter. Twitter non è un mezzo accettabile di supporto perché: 1) è difficile gestire una conversazione in meno di 140 caratteri, e 2) Twitter non è un luogo dove altre persone con il vostro stesso problema possano reperire facilmente la risposta tra le conversazioni. - -Ricordate, libero != gratis; la licenza di software libero vi garantisce la libertà di usare e di modificare, ma non di rubare tempo altrui. Per favore, siate rispettosi, e comportatevi di conseguenza. - -## Estendere - -Un **comando** è una funzionalità atomica di WP-CLI. `wp plugin install` ([doc](https://wp-cli.org/commands/plugin/install/)) è un comando. `wp plugin activate` ([doc](https://wp-cli.org/commands/plugin/activate/)) è un altro. - -WP-CLI supporta la dichiarazione di una qualsiasi classe richiamabile oppure una closure, come comando. Legge i dettagli attraverso la callback di PHPdoc. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) viene usata sia per le registrazioni dei comandi interni che per quelli di terze parti. - -```php -/** - * Cancella un opzione dal database. - * - * Restituisce un errore se l'opzione non esiste. - * - * ## OPZIONI - * - * - * : Key per l'opzione. - * - * ## ESEMPI - * - * $ wp option delete my_option - * Success: Opzione 'my_option' cancellata. - */ -$delete_option_cmd = function( $args ) { - list( $key ) = $args; - - if ( ! delete_option( $key ) ) { - WP_CLI::error( "Non posso eliminare l'opzione '$key'. Esiste?" ); - } else { - WP_CLI::success( "Opzione '$key' cancellata." ); - } -}; -WP_CLI::add_command( 'option delete', $delete_option_cmd ); -``` - -WP-CLI offre dozzine di comandi. Creare nuovi comandi personalizzati è più facile di quel che sembri. Leggete il [commands cookbook](https://wp-cli.org/docs/commands-cookbook/) per sapere di più. Consultate la [documentazione delle internal API](https://wp-cli.org/docs/internal-api/) per scoprire la varietà di utili funzioni disponibili per i vostri comandi WP-CLI. - -## Contribuire - -Benvenuti e grazie! - -Apprezziamo che vogliate prendere parte e contribuire a WP-CLI. È per merito vostro e della comunità che vi gravita attorno se WP-CLI è un grande progetto. - -**Contribuire non si limita soltanto alla programmazione** - -Vi incoraggiamo a contribuire nel modo che meglio rispecchia le vostre abilità, scrivendo tutorial, offrendo dimostrazioni durante i vostri incontri locali, prestare aiuto ad altri utenti riguardo le loro richieste di aiuto, o revisionando la documentazione. - -Vi preghiamo di riservare un po' di tempo da dedicare alla [lettura approfondita delle linee guida](https://wp-cli.org/docs/contributing/). Seguirle dimostra il rispetto dei tempi altrui sul progetto. - -## Coordinamento - -WP-CLI è guidato dai seguenti individui: - -* [Daniel Bachhuber](https://github.com/danielbachhuber/) - manutentore corrente -* [Cristi Burcă](https://github.com/scribu) - manutentore precedente -* [Andreas Creten](https://github.com/andreascreten) - fondatore - -Leggi di più riguardo la [politica del progetto](https://wp-cli.org/docs/governance/) e guarda la [lista completa dei contributori](https://github.com/wp-cli/wp-cli/contributors). - -## Crediti - -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` -* [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` -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) per `wp scaffold plugin-tests` diff --git a/ja/index.md b/ja/index.md deleted file mode 100644 index 98736e71..00000000 --- a/ja/index.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -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 は、みなさんが WordPress の管理画面でやりたいと思っていることに対するコマンドラインインターフェースを提供します。 -たとえば、`wp plugin install --activate` ([ドキュメント](https://developer.wordpress.org/cli/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... -Unpacking the package... -Installing the plugin... -Plugin installed successfully. -Activating 'user-switching'... -Plugin 'user-switching' activated. -Success: Installed 1 of 1 plugins. -``` - -さらに WP-CLI では、WordPress の管理画面ではできない多くのことを行えます。たとえば、`wp transient delete --all` ([ドキュメント](https://developer.wordpress.org/cli/commands/transient/delete/)) というコマンドを実行すると、一時的に保存されているすべてのデータが削除されます。 - -```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/) では便利なコマンドラインユーティリティについても学べます。 - -基本的なことをすでに理解しているなら、[コマンドリスト](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-CLI を `wp` コマンドで実行するには、wp-cli.phar が実行可能で、かつ、環境変数 `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 は、`wp cli update` ([ドキュメント](https://developer.wordpress.org/cli/commands/cli/update/)) コマンド、または上述のインストール方法を再度行うことでアップデートできます。 - -ただし、WP-CLI のオーナーが root または他のシステム管理者の場合は、`sudo wp cli update` と実行する必要があります。 - -チャレンジ精神旺盛な人は `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` で読み込みます。 - -```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 -``` - -## サポート - -WP-CLI のメンテナーとその貢献者が一般的な質問に答えられる時間は限られています。[最新版](https://make.wordpress.org/cli/handbook/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) - -上記いずれかの方法で回答を見つけられなかった場合は: - -- [WordPress.org Slack](https://make.wordpress.org/chat/) の `#cli` チャンネルに参加して、そこにいる人に尋ねてみてください。これが最も手っ取り早い方法です。 -- WordPress サポートフォーラムに[新しいスレッドを投稿](https://wordpress.org/support/forum/wp-advanced/#new-post)し、'WP-CLI' というタグを付けてコミュニティ内で見つけやすくします。 - -GitHub Issues は、既存のコマンドの改良やバグを追跡するために使われており、一般的なサポートのためには使われていません。バグレポートを投稿する際には、[ベストプラクティス](https://make.wordpress.org/cli/handbook/bug-reports/)を確認して、あなたの抱える問題が適時確実に伝わるように心がけてください。 - -Twitter でサポート用の質問を尋ねるのはご遠慮ください。Twitter は、1) 文字数が 280 文字以下に制限され会話を行うのが難しい、2) 過去の会話から他の人の同じ質問を検索することが難しい、などの理由によりサポートを行う場としてふさわしくないからです。 - -自由は無料とは違います。オープンソースライセンスはあなたが自由に使ったり編集したりする権利を保証しますが、他の誰かの時間を浪費することを保証しているわけではありません。サポートを受けるに当たっては、敬意を持ち、過度な期待をしないように心がけてください。 - -## 拡張 - -それぞれの **コマンド** は、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 は多くのコマンドで構成され、意外と簡単にカスタムコマンドを作ることができます。詳しくは [commands cookbook](https://make.wordpress.org/cli/handbook/commands-cookbook/) を参照してください。[内部 API のドキュメント](https://make.wordpress.org/cli/handbook/references/internal-api/)には、カスタムコマンドで使用できるさまざまな便利機能が載っています。 - -## 貢献 - -ようこそ ! ありがとう ! - -私たちは、みなさんが率先して貢献してくださることに感謝します。あなたやあなたのまわりのコミュニティによって、WP-CLI はすばらしいプロジェクトになります。 - -**貢献はコードを書くことだけに留まりません。** 私たちは、チュートリアルを書いたり、地元のミートアップでデモを行ったり、ユーザーの質問に回答したり、ドキュメントを改訂したりと、あなたの能力に合った方法で貢献していただきたいと思っています。 - -ハンドブックに掲載されている[貢献者向けガイドライン](https://make.wordpress.org/cli/handbook/contributions/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](https://github.com/wp-cli/wp-cli/blob/master/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` diff --git a/ne/index.md b/ne/index.md deleted file mode 100644 index 9be0390e..00000000 --- a/ne/index.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -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) । - -[![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 "खुला मुद्दाहरू प्रतिशतमा") - -द्रुत लिंकहरु: [प्रयोग](#section) | [स्थापना](#section-1) | [सहायता](#section-4) | [विस्तार](#section-5) | [योगदान](#section-6) | [श्रेय](#section-8) - -## प्रयोग - -WP-CLI को लक्ष भनेको वर्डप्रेस व्यवस्थापनमा गर्न सकिने जुनै कार्य गर्नको लागि कमाण्ड लाइन इन्टरफेस प्रदान गर्नु हो । उदाहरण को रुपमा, `wp plugin install --activate` ([डक](https://wp-cli.org/commands/plugin/install/)) ले वर्डप्रेस प्लगिन स्थापना गरि सक्रिय बनाउछ: - -``` -$ 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 'rest-api'... -Success: Plugin 'rest-api' activated. -``` - -WP-CLI मा अन्य कमाण्डहरु पनि उपलब्ध छ जुन वर्डप्रेस व्यवस्थापन प्यानलमा हुँदैन । जस्तै, `wp transient delete --all` ([doc](https://wp-cli.org/commands/transient/delete/)) ले सबै ट्रान्जियन्टहरु मेटाउछ: - -``` -$ wp transient delete --all -Success: 34 transients deleted from the database. -``` - -WP-CLI प्रयोग गर्नेबारे अरु जान्न, [छिटो सुरु पुस्तिका](https://wp-cli.org/docs/quick-start/) पढ्नुहोस् । - -आधारभूत कुराहरुमा सहज महसुस गर्नु हुन्छ ? थिम तथा प्लगिन ब्यबस्थान गर्न, डाटा आयात निर्यात गर्न, डाटाबेसमा खोज-प्रतिस्थापन गर्न तथा अन्य कार्यको विस्तृत जानकारीको लागि [कमाण्डहरूको पूर्ण सूची](https://wp-cli.org/commands/) मा जानुहोस् । - -## स्थापना - -Phar फाइल डाउनलोड गरेर स्थापना गर्ने विधि हाम्रो सिफारिस विधि हो । आवश्यक परेमा दस्तावेजमा [वैकल्पिक स्थापना विधिहरू](https://wp-cli.org/docs/installing/) हेर्नुहोस् । - -स्थापना गर्नु अघि कृपया न्यूनतम आवश्यकताहरू पूरा भएको निश्चित गर्नुहोस्: - -- 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) फाइल डाउनलोड गर्नुहोस्: - -``` -$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -``` - -अब काम गरिरहेको छ कि छैन जांच गर्नुहोस्: - -``` -$ php wp-cli.phar --info -``` - -WP-CLI लाई कमाण्ड लाइनबाट `wp` टाइप गरि प्रयोग गर्न कार्यान्वयन योग्य बनाउनु होस् अनि कतै तपाईको PATH मा सार्नुहोस् । जस्तै: - -``` -$ chmod +x wp-cli.phar -$ sudo mv wp-cli.phar /usr/local/bin/wp -``` - -यदि WP-CLI सफलतापूर्वक स्थापना भएको छ भने `wp --info` कमाण्ड प्रविष्ट गर्दा यस्तो देख्न सक्नुहुनेछ: - -``` -$ wp --info -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: 0.25.0 -``` - -### अद्यावधिक - -तपाइँ `wp cli update` ([डक](https://wp-cli.org/commands/cli/update/)) कमाण्डबाट WP-CLI अद्यावधिक गर्न सक्नुहुन्छ, वा स्थापना कदम दोहोराएर । - -केहि खतरा मोलेर जिउन चाहनुहुन्छ? WP-CLI को नवीनतम रात्रि गठन प्रयोग गर्न `wp cli update --nightly` कमाण्ड हान्नुहोस् । रात्रि गठन विकास वातावरणमा प्रयोग गर्न उपयुक्त हुन्छ अनि यसमा नवीनतम तथा महानतम WP-CLI सुविधाहरु सम्मिलित हुन्छ । - -### ट्याब सम्पूर्णता - -WP-CLI मा Bash र ZSH को लागि ट्याब सम्पूर्णता लिपि उपलब्ध छ । [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) डाउनलोड गर्नुहोस् अनि `~/.bash_profile` प्रयोग गरि सोर्स गर्नुहोस्: - -``` -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 का मर्मतकर्ता तथा परियोजना योगदानकर्ताहरु हरदम तत्पर रहन्छन् । ती स्वयंसेवकहरुको समयको उत्तम उपयोग गर्न कृपया पहिला तलका स्रोतहरूमा जांच गर्नुहोस् तपाईको प्रश्नको उत्तर छ कि भनेर: - -- [आम समस्याहरु र त्यसको समाधानहरु](https://wp-cli.org/docs/common-issues/) -- [बग प्रतिवेदनको लागि उत्तम अभ्यासहरू](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) - -यदि तपाईंले ती स्रोतहरूमा आफ्नो जवाफ पाउन सक्नुभएन भने [WordPress.org Slack organization](https://make.wordpress.org/chat/) मा `#cli` च्यानलमा सामेल भई प्रश्न सोध्न सक्नुहुन्छ। व्यावसायिक प्रयोगकर्ताहरुले प्रिमियम सहायताको लागि [runcommand](https://runcommand.io/) मा पनि सम्पर्क गर्न सक्नुहुन्छ । - -गिटहब मुद्धा भनेको उन्नति तथा अबस्थित कमाण्डका बगहरुको लागि मात्र हो, साधारण सहायताको लागि हैन । मुद्धा दर्ता गर्नु अगि कृपया [राम्रो अभ्यासहरू](https://wp-cli.org/docs/bug-reports/) हेर्नुहोस् ताकी तपाईंको मुद्धा समयबद्ध ढंगमा सम्बोधन होस् । - -कृपया टुइटरमा सहायता प्रश्न नसोध्नु होला । किनकि १) १४० अक्षरमा सम्बाद गर्न अप्ठ्यारो हुन्छ २) अघिल्ला सम्बादका प्रश्नहरु खोजी गर्न सकिदैन । - -## विस्तार - -**कमाण्ड** WP-CLI कार्यक्षमताको एक परमाणु एकाइ हो । `wp plugin install` ([डक](https://wp-cli.org/commands/plugin/install/)) एउटा कमाण्ड हो । `wp plugin activate` ([डक](https://wp-cli.org/commands/plugin/activate/)) अर्को कमाण्ड हो । - -```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://wp-cli.org/docs/commands-cookbook/) पढ्नुहोस् । कस्टम WP-CLI कमाण्डमा प्रयोग गर्न सकिने सहयोगी प्रकार्यहरु पत्ता लगाउन [आन्तरिक API दस्तावेजहरु](https://wp-cli.org/docs/internal-api/) ब्राउज गर्नुहोस् । - -## योगदान - -स्वागत र धन्यवाद! - -WP-CLI मा योगदान गर्न देखाउनु भएको तपाईको अग्रसरतालाई हामी कदर गर्छौं । तपाईं र तपाईं वरिपरिको समुदायकै कारणले WP-CLI यस्तो ठूलो परियोजना बनेको हो । - -**योगदान केवल कोडमा मात्र सीमित छैन ।** हामी तपाईंलाई तपाईंको क्षमता अनुसार ठीक लागेको कार्य गरि योगदान गर्न प्रोत्साहन गर्छौं, जस्तै ट्युटोरियल लेखेर, स्थानीय मिटपमा डेमो देखाएर, अन्य प्रयोगकर्ताका प्रश्नहरुको जवाफ दिएर, दस्तावेजहरु संशोधन, आदि । - -कृपया केहि समय लिएर [गहिराईमा यी निर्देशनहरु पढ्नुहोस्](https://wp-cli.org/docs/contributing/) । तिनीहरूलाई पालना गर्नु भएमा यो स्पष्ट हुन्छ कि तपाईं परियोजनाका अन्य योगदानकर्ताको समयको आदर गर्नु हुन्छ । बदलामा तिनीहरु तपाईंको यो आदरको सम्मान गर्दै विश्वको विभिन्न समयक्षेत्रमा बसेर पनि तपाईंसंग काम गर्न कटिबद्ध हुनेछन् । - -## नेतृत्व - -WP-CLI मा यी व्यक्तिहरूको नेतृत्व छ: - -* [Daniel Bachhuber](https://github.com/danielbachhuber/) - वर्तमान मर्मतकर्ता -* [Cristi Burcă](https://github.com/scribu) - पूर्ववर्ती मर्मतकर्ता -* [Andreas Creten](https://github.com/andreascreten) - संस्थापक - -परियोजनाको [प्रशासन](https://wp-cli.org/docs/governance/) बारेमा थप पढ्नुहोस् र [योगदानकर्ताहरुको पूर्ण सूची](https://github.com/wp-cli/wp-cli/contributors) हेर्नुहोस् । - -## श्रेय - -[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` को लागि -* [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/restful/index.md b/restful/index.md deleted file mode 100644 index 4630c8a2..00000000 --- a/restful/index.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -layout: default -title: A more RESTful WP-CLI ---- - -## 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/). - -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 `. - -Quick links: [Highlights](#highlights) - [Milestones](#milestones) - [Budget](#budget) - [Supporters](#supporters) - -*** - -## Highlights - -### RESTful WP-CLI - -RESTful WP-CLI is a [WP-CLI package](https://github.com/wp-cli/restful) that makes WP REST API endpoints available as WP-CLI commands. - -As WordPress becomes more of an application framework embedded into the web, RESTful WP-CLI enables WP-CLI users to interact with a given WordPress install through the higher-level, self-expressed abstraction of how WordPress understands itself. For instance, on an eCommerce website, instead of having to know data is stored as `wp post list --post_type=edd_product`, RESTful WP-CLI exposes the properly-modeled data at `wp rest product list`. - -First, RESTful WP-CLI auto-discovers WP REST API endpoints from any WordPress site running WordPress 4.4 or higher. These can be endpoints from the WP REST API v2 plugin, or custom endpoints you’ve registered yourself. You can target a specific WordPress install with `--path=`, `--ssh=`, or `--http=`. Then, it registers WP-CLI commands for the resource endpoints it understands, in the wp rest namespace. In addition to the standard list, get, create, update and delete commands, RESTful WP-CLI also registers commands for higher-level operations like `edit`, `generate` and `diff`. - -Try it yourself: - -``` -wp package install wp-cli/restful -wp --http=runcommand.io rest excerpt list -``` - -For a summary of these features, check out [wp-cli/restful](https://github.com/wp-cli/restful). - -### Package management - -Just like WordPress has plugins, the future of WP-CLI is [packages of commands](https://wp-cli.org/package-index/). For this future, WP-CLI is working to proactively solve the problems WordPress has with plugins: - -* Where WordPress plugins are considered second-class to what’s included in core, WP-CLI packages should be considered first-class citizens amongst the commands in WP-CLI. -* All too often, WordPress plugins have just one author. Each WP-CLI package should have two or three active maintainers. - -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. - -### Documentation portal - -In the past, WP-CLI documentation lived in a poorly maintained, hard to search Github Wiki. Now, it’s been reincarnated as a [documentation portal on the website](https://wp-cli.org/docs/). - -Most notably: - -* Every existing tutorial was rewritten and cleaned up as they were moved over. -* Internal APIs you can use in your own commands are now [publicly documented](https://wp-cli.org/docs/internal-api/). These internal API pages are generated from the codebase, which 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 for [wp package and its subcommands](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+label%3Acommand%3Apackage+sort%3Aupdated-desc). - -Since relaunching the documentation portal in March, we’ve also [written a new contributing guide](https://wp-cli.org/docs/contributing/), and rewritten the WP-CLI homepage with translations to six languages other than English. - -*** - -## Milestones - -Blog posts: - -* [RESTful WP-CLI - The final update?](/blog/restful-wp-cli-update-4.html) - July 20, 2016 -* [RESTful WP-CLI - What I've been hacking on](/blog/restful-wp-cli-update-3.html) - April 14, 2016 -* [RESTful WP-CLI - No rest for the weary](/blog/restful-wp-cli-update-2.html) - February 4, 2016 -* [RESTful WP-CLI - The journey begins](/blog/restful-wp-cli-update-1.html) - January 12, 2016 - -Releases: - -* [WP-CLI Version 0.24.0 released](/blog/version-0.24.0.html) - July 27, 2016 -* [WP REST API Version 2.0 Beta 13 "yoink.adios\losers"](https://make.wordpress.org/core/2016/04/04/wp-rest-api-2-0-beta-13-roadmap/) - April 3, 2016 -* [WP-CLI Version 0.23.0 released](/blog/version-0.23.0.html) - March 22, 2016 -* [WP REST API Version 2.0 Beta 12 "Canyonero"](https://make.wordpress.org/core/2016/02/09/wp-rest-api-version-2-0-beta-12/) - February 9, 2016 -* [WP REST API Version 2.0 Beta 10 "Chief Wiggum"](https://make.wordpress.org/core/2016/01/11/wp-rest-api-version-2-0-beta-10-with-security-releases/) - January 11, 2016 -* [WP-CLI Version 0.22.0 released](/blog/version-0.22.0.html) - January 7, 2016 - -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) - -*** - -## Budget - -Here's a breakdown of how the project's 232.42 total hours have been used (between January 1st and July 20th, 2016): - -| Activity | WP-CLI | WP-API | -|---------------|----------------------------|---------------------------| -| Development | 84.38 | 67.95 | -| Support | 10.91 | 15.39 | -| Documentation | 27.21 | 1.17 | -| Blogging | 16.97 | 0 | -| Meetings | 0 | 7.91 | -| Admin | 0.77 | 0 | -| **Total** | 140.24 (of 140.00 budgeted)| 92.42 (of 92.42 budgeted) | - -Note: time spent fulfilling the Kickstarter rewards is tracked separately. - -*** - -## Supporters - -This project is made possible thanks to the backing of many generous organizations and individuals. - -### Platinum - - - - - - - - - - -
- -
- Pressed offers white-label, fully managed, WordPress hosting, built on Amazon’s cloud infrastructure. Launch your own managed WordPress hosting brand and let us handle all the maintenance, updates, customer support and billing while building a new recurring revenue stream for your business. -
- -### Gold - - - - - - - - - - - - - - -
Chris Lema is the CTO & Chief Strategist at Crowd Favorite. He’s also a WordPress evangelist, public speaker & advisor to product companies.Human Made is a leading WordPress Development, Hosting and Consultancy Firm with a global team covering Europe, The USA, and Asia/Australia.
- - - - - - - - - - - - - - -
Pagely® is the World’s first and most scalable WordPress Hosting platform: We help the biggest brands scale and secure WordPress.Pantheon is a website management platform used to build, launch, and run awesome Drupal & WordPress websites.
- -### Silver - - - - - - - - - - - - - - - - - - - -
- -### Individual - -Aaron Jorbin, Aki Björklund, Anu Gupta, Bjørn Ensover Johansen, Brian Krogsgard, Bronson Quick, Chuck Reynolds, Corey McKrill, Daniel Hüsken, Dave McDonald, Dave Wardle, Eli Silverman, Felix Arntz, Howard Jacobson, Japh Thomson, Jason Resnick, Jeremy Felt, Justin Kopepasah, Kailey Lampert, Kevin Cristiano, Max Cutler, Mike Little, Mike Waggoner, Nate Wright, Pippin Williamson, Quasel, Ralf Hortt, Richard Aber, Richard Wiggins, Ryan Duff, Scott Kingsley Clark, Shinichi Nishikawa, Sven Hofmann, Takayuki Miyauchi, Tom McFarlin, rtCamp 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 deleted file mode 100644 index 14efb39a..00000000 --- a/tr/index.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -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. - -Süregelen bakım, aşağıdakiler sayesinde: - - - -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") - - - -Bağlantılar: [Kullanım](#kullanm) | [Kurulum](#kurulum) | [Destek](#destek) | [Genişletmek](#geniletmek) | [Katkıda Bulunmak](#katkda-bulunmak) | [Jenerik](#jenerik) - -## 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: - - -```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 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: - - -```bash -$ 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. - -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. - -## 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)). - - -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 - -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: - -```bash -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 -``` - -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 -``` - -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 -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 -``` - - -### 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. - -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. - -### 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: - -```bash -source /FULL/PATH/TO/wp-completion.bash -``` - -Ekledikten sonra `source ~/.bash_profile` komutunu çalıştırmayı unutmayın. - -Shell için zsh kullanıyorsanız, kaynak olarak tanımlamadan önce `bashcompinit` i yükleyip çalıştırmanız gerekebilir. Aşağıdaki kodları `.zshrc` dosyanıza ekleyin: - -```bash -autoload bashcompinit -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: - -* [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: - -* [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. - -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. - -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. - - -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. - -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. - -```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 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. - - -## Katkıda Bulunmak - -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. - - -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'nın bir proje sorumlusu vardır: [schlessera](https://github.com/schlessera). - -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. - -## Jenerik - -[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 -* [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 -* [wordpress-plugin-tests](https://github.com/benbalter/wordpress-plugin-tests/) `wp scaffold plugin-tests` komutu için diff --git a/wp-cli.yml b/wp-cli.yml deleted file mode 100644 index 2c97a7d9..00000000 --- a/wp-cli.yml +++ /dev/null @@ -1,2 +0,0 @@ -require: - - command.php 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`)