Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (C) 2012-2022 WP-CLI Development Group (https://github.com/wp-cli/handbook/contributors)
Copyright (C) 2012-2026 WP-CLI Development Group (https://github.com/wp-cli/handbook/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
Expand Down
2 changes: 1 addition & 1 deletion contributions/committers-credo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Practically-speaking:

## Stellar judgement

A great product is a reflection of thoughtful, deliberate, and considered decision-making. WP-CLI committers exhibit stellar judgement with making decisions on new features, fixing bugs, merging others pull requests, and generally working on the project.
A great product is a reflection of thoughtful, deliberate, and considered decision-making. WP-CLI committers exhibit stellar judgement when making decisions on new features, fixing bugs, merging others' pull requests, and generally working on the project.

The basis of this decision-making ensures:

Expand Down
4 changes: 2 additions & 2 deletions contributions/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If you haven't submitted a pull request before, you'll want to install WP-CLI fo
4. Install all Composer dependencies: `composer install`
5. Verify WP-CLI was installed properly: `vendor/bin/wp --info`

Within this package, you should preferably use `vendor/bin/wp` to run the command. Just using `wp` should work as well, but by doing that you might run the command through a different version of the framework and thus getting an unexpected result.
Within this package, you should preferably use `vendor/bin/wp` to run the command. Just using `wp` should work as well, but by doing that you might run the command through a different version of the framework and thus get an unexpected result.

### Working on the project as a whole

Expand Down Expand Up @@ -192,7 +192,7 @@ To run the unit tests, execute:

To run a specific unit test, you can use:

composer phpunit -- filter=<method name>
composer phpunit -- --filter=<method name>

### Running all tests in one go

Expand Down
4 changes: 1 addition & 3 deletions contributions/release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Release Checklist

There are two different release checklists available from within the [`
wp-cli/wp-cli`
](https://github.com/wp-cli/wp-cli) repository:
There are two different release checklists available from within the [`wp-cli/wp-cli`](https://github.com/wp-cli/wp-cli) repository:

* Generate a [🚀 Regular Release Checklist](https://github.com/wp-cli/wp-cli/issues/new?assignees=schlessera&labels=i%3A+scope%3Adistribution&template=4-REGULAR_RELEASE_CHECKLIST.md&title=Release+checklist+for+v2.x.x) - applies to major (2.x.x) and minor (x.1.x) releases.
* Generate a [🔧 Patch Release Checklist](https://github.com/wp-cli/wp-cli/issues/new?assignees=schlessera&labels=i%3A+scope%3Adistribution&template=5-PATCH_RELEASE_CHECKLIST.md&title=Release+checklist+for+v2.x.x) - applies to patch (x.x.1) releases only.
Expand Down
22 changes: 8 additions & 14 deletions contributions/repository-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ Labels can be part of a label group, a concept that is applicable to all package

#### Command

The labels that define what exact command a given issue/pull request applies to are prefixed with `command:`
The labels that define what specific command a given issue/pull request is related to are prefixed with `command:`.

_Example: `command:cli-update`_
Some examples:

* `command:core` - Relates to one or more of the subcommands under the `wp core` parent command.
* `command:cli-check-update` - Relates to the `wp cli check-update` command.
* `command:post-meta-update` - Relates to the `wp post meta update` command.

#### Scope

Expand All @@ -59,23 +63,13 @@ Used scopes:

#### State

The labels that defined what state a given issue/pull request is in are prefixed with `state:`.
The labels that define what state a given issue/pull request is in are prefixed with `state:`.

Used states:

* `state:unconfirmed` - The bug/problem in the issue could not be replicated yet or might be related to the reporter's environment.
* `state:unsupported` - The issue is outside of the scope of a bug report and cannot be supported on GitHub. The reporter should be pointed towards one of the [support channels](https://make.wordpress.org/cli/handbook/support/).

#### Command

The labels that define what specific command a given issue/pull request is related to are prefixed with `command:`.

Some examples:

* `command:core` - Relates to one or more of the subcommands under the `wp core` parent command.
* `command:cli-check-update` - Relates to the `wp cli check-update` command.
* `command:post-meta-update` - Relates to the `wp post-meta update` command.

### Required Labels

Some labels have a special meaning and/or might be used for automated workflows down the road. These are required across all official packages.
Expand All @@ -98,7 +92,7 @@ Good first issues are small in scope and don't require extensive technical exper

## Commits

No direct commits are to be done against the default branch (`main`/`master`) branch of the packages. All code changes need to go through a pull request workflow.
No direct commits are to be done against the default (`main`/`master`) branch of the packages. All code changes need to go through a pull request workflow.

## Pull Requests

Expand Down
2 changes: 1 addition & 1 deletion contributions/security-vulnerability-reporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This includes weaknesses where the fix would:
- Remove or restrict a documented feature
- Impose significant complexity in order to fix a vulnerability that requires implausible preconditions

Such fixes may do more harm than the issue it addresses. Where the downside of fixing such an issue exceeds the vulnerability's impact, the team may instead choose to clearly document the behavior.
Such fixes may do more harm than the issue they address. Where the downside of fixing such an issue exceeds the vulnerability's impact, the team may instead choose to clearly document the behavior.

## If your report still stands

Expand Down
2 changes: 1 addition & 1 deletion guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* **[Common issues and their fixes](https://make.wordpress.org/cli/handbook/guides/common-issues/)** - In case of fire, break glass.
* **[External resources](https://make.wordpress.org/cli/handbook/guides/external-resources/)** - Blog posts, slides and videos from users.
* **[Force output to a specific locale](https://make.wordpress.org/cli/handbook/guides/force-output-specific-locale/)** - Localisation issue
* **[Identify a Plugin or Theme Conflict](https://make.wordpress.org/cli/handbook/guides/identify-plugin-theme-conflict/)** - Debugging advise
* **[Identify a Plugin or Theme Conflict](https://make.wordpress.org/cli/handbook/guides/identify-plugin-theme-conflict/)** - Debugging advice
* **[Installing WP-CLI Packages](https://make.wordpress.org/cli/handbook/guides/installing-packages/)** - Learn how to install packages and use version constraints
* **[Sharing WP-CLI Packages](https://make.wordpress.org/cli/handbook/guides/sharing-wp-cli-packages/)** - Some words about your environment
* **[Troubleshooting Guide](https://make.wordpress.org/cli/handbook/guides/troubleshooting/)** - Some help to troubleshoot
2 changes: 1 addition & 1 deletion guides/behat-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Stability between releases is an important contract WP-CLI makes with its users.

### Getting Started

Every WP-CLI repository with commands has a `features/` directory containing one or more YAML-formatted `*.feature` files.
Every WP-CLI repository with commands has a `features/` directory containing one or more Gherkin-formatted `*.feature` files.

## Writing Your First Test

Expand Down
14 changes: 7 additions & 7 deletions guides/commands-cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Packages are to WP-CLI as plugins are to WordPress. There are distinct differenc

Bundled commands:

* Usually cover functionality offered by a standard install WordPress. There are exceptions to this rule though, notably `wp search-replace` ([doc](https://developer.wordpress.org/cli/commands/search-replace/)).
* Usually cover functionality offered by a standard WordPress installation. There are exceptions to this rule though, notably `wp search-replace` ([doc](https://developer.wordpress.org/cli/commands/search-replace/)).
* Do not depend on other components such as plugins, themes etc.
* Are maintained by the WP-CLI team.

Expand Down Expand Up @@ -62,7 +62,7 @@ WP_CLI::add_command( 'foo', 'foo_command' );
// 2. Command is a closure
$foo_command = function( $args ) {
WP_CLI::success( $args[0] );
}
};
WP_CLI::add_command( 'foo', $foo_command );
// 3. Command is a method on a class
Expand Down Expand Up @@ -284,7 +284,7 @@ The `---` block after a parameter description allows you to set extra metadata f
The longdesc is also displayed when calling the `help` command, for example, `wp help example hello`. Its syntax is [Markdown Extra](http://michelf.ca/projects/php-markdown/extra/) and here are a few more notes on how it's handled by WP-CLI:

* The longdesc is generally treated as a free-form text. The `OPTIONS` and `EXAMPLES` section names are not enforced, just common and recommended.
* Sections names (`## NAME`) are colorized and printed with zero indentation.
* Section names (`## NAME`) are colorized and printed with zero indentation.
* Everything else is indented by 2 characters, option descriptions are further indented by additional 2 characters.
* Word-wrapping is a bit tricky. If you want to utilize as much space on each line as possible and don't get word-wrapping artifacts like one or two words on the next line, follow these rules:
* Hard-wrap option descriptions at **75 chars** after the colon and a space.
Expand Down Expand Up @@ -437,7 +437,7 @@ function hello( $args, $assoc_args ) {
}
```

`$args` variable will store all the positional arguments:
The `$args` variable will store all the positional arguments:

```
$ wp example hello Joe Doe
Expand All @@ -448,7 +448,7 @@ WP_CLI::line( $args[0] ); // Joe
WP_CLI::line( $args[1] ); // Doe
```

`$assoc_args` variable will store all the arguments defined like `--key=value` or `--flag` or `--no-flag`
The `$assoc_args` variable will store all the arguments defined like `--key=value` or `--flag` or `--no-flag`:

```
$ wp example hello --name='Joe Doe' --verbose --no-option
Expand Down Expand Up @@ -626,7 +626,7 @@ Both approaches are valid. Use the `WP_CLI` constant check when you need to cond

### Distribute as a stand-alone command

Standalone WP-CLI commands can be installed from any git repository, ZIP file or folder. The only technical requirement is to include a valid composer.json file with an autoload declaration. We recommended including `"type": "wp-cli-package"` to distinguish your project explicitly as a WP-CLI package.
Standalone WP-CLI commands can be installed from any git repository, ZIP file or folder. The only technical requirement is to include a valid composer.json file with an autoload declaration. We recommend including `"type": "wp-cli-package"` to distinguish your project explicitly as a WP-CLI package.

Here's a full composer.json example from the server command:

Expand Down Expand Up @@ -656,7 +656,7 @@ Here's a full composer.json example from the server command:

Note the `autoload` declaration, which loads `command.php`.

Once you've added a valid composer.json file to your project repository, WP-CLI users can pull it in via the package manager from the location you opted to store it in. Here's a few examples of storage locations and the corresponding syntax of installing it via the package manager:
Once you've added a valid composer.json file to your project repository, WP-CLI users can pull it in via the package manager from the location you opted to store it in. Here are a few examples of storage locations and the corresponding syntax of installing it via the package manager:

#### Git repository

Expand Down
4 changes: 2 additions & 2 deletions guides/running-commands-remotely.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ Another way to achieve this is to specify the `$PATH` in the remote machine user

### Remote non-interactive shell resolves aliases and runs wp as alias with php

Some webhosts are configured very restrictive:
- They do not allow you to execute your own shellscripts, so everything from method [WP-CLI binary](#copy-wp-cli-binary-to-home-bin) fails.
Some web hosts are configured very restrictively:
- They do not allow you to execute your own shell scripts, so everything from method [WP-CLI binary](#copy-wp-cli-binary-to-home-bin) fails.
- `sshd` is configured with `PermitUserEnvironment=no`, so customizing [~/.ssh/environment](#specify-the-path-in-home-ssh-environment) has no effect and fails too.
- Also [using the before_ssh hook on the client machine](#using-before_ssh-hook-on-client-machine) will not help you, as in all cases you cannot run `wp` on the remote.

Expand Down
2 changes: 1 addition & 1 deletion guides/sharing-wp-cli-packages.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sharing WP-CLI Packages

By default, WP-CLI places [installed packages](https://developer.wordpress.org/cli/commands/package/) in `~/.wp-cli/packages/`, a hidden subdirectory for the user’s home directory.
By default, WP-CLI places [installed packages](https://developer.wordpress.org/cli/commands/package/) in `~/.wp-cli/packages/`, a hidden subdirectory of the user’s home directory.

Because the home directory is different for each user, this naturally means each system user will have a separate directory of installed packages. If you have multiple active shell users on a server, and want to share installed WP-CLI packages between them, there are a couple of supported ways to do this.

Expand Down
7 changes: 4 additions & 3 deletions guides/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you want to run WP-CLI remotely using SSH, it is required that the command `w
* `WP_CLI_REQUIRE` - Load one or more custom PHP files (comma-separated) after the bootstrap process. This has the same effect as `--require` on the command line or a `require` mapping in a wp-cli.yml config file.
* `WP_CLI_USER_AGENT` - Sets the `$_SERVER['HTTP_USER_AGENT']` value that some plugins and tools rely on.

To set an environment variable on demand, you can place the environment variable definition before the WP-CLI command you mean to run (e.g. `EDITOR=vim wp post edit 1`); to overwrite environment variables, use `export VARIABLE=value` in your `~/.bashrc` or `~.zhsrc`.
To set an environment variable on demand, you can place the environment variable definition before the WP-CLI command you mean to run (e.g. `EDITOR=vim wp post edit 1`); to overwrite environment variables, use `export VARIABLE=value` in your `~/.bashrc` or `~/.zshrc`.

#### WP-CLI Configuration Files

Expand All @@ -71,7 +71,7 @@ If you want to use `$_SERVER['HTTP_HOST']` in your `wp-config.php`, you’ll nee

```
if ( defined( 'WP_CLI' ) && WP_CLI && ! isset( $_SERVER['HTTP_HOST'] ) ) {
$_SERVER['HTTP_HOST'] = `example.com';
$_SERVER['HTTP_HOST'] = 'example.com';
}
```

Expand Down Expand Up @@ -101,7 +101,8 @@ Please provide us with:
* a summary of the issue in narrative form,
* a detailed and specific list of steps to reproduce the issue,
* details of the environment you're working on,
* a description, how the bug affects your usage (i.e. expected results compared with actual results), including * severity level,
Comment thread
swissspidy marked this conversation as resolved.
* a description, how the bug affects your usage (i.e. expected results compared with actual results),
* severity level,
* possible workarounds and
* relevant diagnostics, such as crash reports, stack traces or debug output.

Expand Down
8 changes: 4 additions & 4 deletions how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ tasks.

- [How-to install WordPress](https://make.wordpress.org/cli/handbook/how-to-install/)

- [How to put the website in maintenance mode](https://make.wordpress.org/cli/handbook/how-to-maintenance-mode)
- [How to put the website in maintenance mode](https://make.wordpress.org/cli/handbook/how-to-maintenance-mode/)

- [How-to start the webserver](https://make.wordpress.org/cli/handbook/)
- [How-to start the webserver](https://make.wordpress.org/cli/handbook/how-to-start-webserver/)

- [How to create a custom plugin](https://make.wordpress.org/cli/handbook/how-to-create-custom-plugins)
- [How to create a custom plugin](https://make.wordpress.org/cli/handbook/how-to-create-custom-plugins/)

- [Figure out why WordPress is slow](https://make.wordpress.org/cli/handbook/figure-out-why-wordpress-is-slow)
- [Figure out why WordPress is slow](https://make.wordpress.org/cli/handbook/figure-out-why-wordpress-is-slow/)
4 changes: 3 additions & 1 deletion how-to/how-to-install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to install WordPress

Downloading and installing WordPress using WP-CLI is straight forward. It takes four steps.
Downloading and installing WordPress using WP-CLI is straightforward. It takes four steps.
First, you will need to download WordPress using the `wp core download` command.

### Step 1 - Download WordPress
Expand All @@ -18,6 +18,8 @@ The syntax of the command to download WordPress is the following: `wp core downl
The command above creates a `wpdemo.test/` folder inside your current working directory and downloads the latest WordPress version. You can replace the `--path=wpdemo.test` with your
desired folder name and the `--locale=it_IT` with your desired locale. You can omit the `--locale` option and, that will download by default WordPress in American English using the locale en_US.

Next, navigate into the newly created folder (`cd wpdemo.test`) before running the subsequent commands.

### Step 2 - Generate a config file

In this step, we will generate a config file and set up the database
Expand Down
6 changes: 3 additions & 3 deletions how-to/how-to-start-webserver.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to start the webserver

You can use the command `wp server` to launches PHP's built-in web server for a specific WordPress installation. By default, the webserver will start using the localhost and default port 8080 but, you can change them using the `--host` and `--port` options.
You can use the command `wp server` to launch PHP's built-in web server for a specific WordPress installation. By default, the webserver will start using the localhost and default port 8080 but, you can change them using the `--host` and `--port` options.

### Step 1 - Start the web server using the default settings

Expand All @@ -24,5 +24,5 @@ If you want to specify a different port number or host, you can pass them to the
$ wp server --port=9090 --host=192.168.0.4
```

The command above will start the webserver and listen for requests on http://192.168.0.4:9090
you can open the browser and visit the page to access your WordPress installation.
The command above will start the webserver and listen for requests on http://192.168.0.4:9090.
You can open the browser and visit the page to access your WordPress installation.
2 changes: 1 addition & 1 deletion references/hosting-companies.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In alphabetical order:
* [HostPapa](https://www.hostpapa.com)
* [HostPresto](https://hostpresto.com)
* [HostRiver](https://hostriver.ro/gazduire-wordpress)
* [ICDSoft](https:///www.icdsoft.com)
* [ICDSoft](https://www.icdsoft.com)
* [Infomaniak](https://www.infomaniak.com/en/create-a-website/wordpress-hosting)
* [IONOS](https://www.ionos.com/)
* [JDM.pl](https://jdm.pl)
Expand Down
Loading