-
Notifications
You must be signed in to change notification settings - Fork 360
Add documentation for installing WP-CLI packages #587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
swissspidy
merged 10 commits into
main
from
copilot/add-documentation-version-constraints
Jan 20, 2026
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b44a96a
Initial plan
Copilot f9da8c6
Add package version constraints documentation
Copilot b7467b6
Merge branch 'main' into copilot/add-documentation-version-constraints
swissspidy d9f7277
Revert changes to commands/package.md
Copilot ea876d3
Make package version constraints guide more concise
Copilot 39e082c
Revert changes to commands/package/install.md
Copilot f517c9e
Transform into general Installing WP-CLI Packages guide
Copilot ab7663d
Merge branch 'main' into copilot/add-documentation-version-constraints
swissspidy 1d56f30
Some minor tweaks
swissspidy 3ce9359
Fix typo
swissspidy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
swissspidy marked this conversation as resolved.
Outdated
swissspidy marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Package Version Constraints | ||
|
|
||
| When installing WP-CLI packages using the `wp package install` command, you can specify version constraints to control which version of a package is installed. | ||
|
|
||
| Version constraints are specified by appending a colon (`:`) followed by the constraint to the package name: | ||
|
|
||
| ```bash | ||
| wp package install <package-name>:<version-constraint> | ||
| ``` | ||
|
|
||
| ## Common Constraints | ||
|
|
||
| WP-CLI uses Composer's version constraint syntax. Here are some commonly used examples: | ||
|
|
||
| ```bash | ||
| # Install a specific version | ||
| wp package install wp-cli/server-command:2.0.0 | ||
|
|
||
| # Install with caret operator (allows non-breaking updates) | ||
| wp package install wp-cli/server-command:^1.0 | ||
|
|
||
| # Install with tilde operator (allows patch-level updates) | ||
| wp package install wp-cli/server-command:~1.2 | ||
|
|
||
| # Install the latest stable release | ||
| wp package install wp-cli/server-command:@stable | ||
|
|
||
| # Install from a development branch | ||
| wp package install wp-cli/server-command:dev-main | ||
| ``` | ||
|
|
||
| For complete documentation on version constraint syntax and operators, see the [Composer documentation on versions and constraints](https://getcomposer.org/doc/articles/versions.md). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.