Below is the output from my attempt to update wp-cli on Windows 10. Clearly another version is available. Can someone please explain how to make this work?
C:\Users\HP>wp cli update
Error: You can only self-update Phar files.
C:\Users\HP>wp cli check-update
+---------+-------------+-----------------------------------------------------------------------------+
| version | update_type | package_url |
+---------+-------------+-----------------------------------------------------------------------------+
| 1.1.0 | major | .1.0/wp-cli-1.1.0.phar |
+---------+-------------+-----------------------------------------------------------------------------+
Below is the output from my attempt to update wp-cli on Windows 10. Clearly another version is available. Can someone please explain how to make this work?
C:\Users\HP>wp cli update
Error: You can only self-update Phar files.
C:\Users\HP>wp cli check-update
+---------+-------------+-----------------------------------------------------------------------------+
| version | update_type | package_url |
+---------+-------------+-----------------------------------------------------------------------------+
| 1.1.0 | major | https://github/wp-cli/wp-cli/releases/download/v1.1.0/wp-cli-1.1.0.phar |
+---------+-------------+-----------------------------------------------------------------------------+
Share
Improve this question
asked Mar 27, 2017 at 18:34
Robin AndrewsRobin Andrews
3124 silver badges14 bronze badges
4
|
1 Answer
Reset to default 1First of all, locate your installation of WP-CLI.
If you're using Composer you can list all globally installed packages on the command line like this:
composer global show
Then update the WP-CLI composer package:
composer global update wp-cli/wp-cli
If you're using Homebrew, you can list all installed packages on the command line like this:
brew list
And update the package:
brew upgrade wp-cli
After that you should be able to upgrade to the next version of WP-CLI via the built-in command:
wp cli update
In return, you'll get a prompt like this:
You have version 1.4.1. Would you like to update to 1.5.0? [y/n]
Downloading from https://github/wp-cli/wp-cli/releases/download/v1.5.0...
New version works. Proceeding to replace.
Success: Updated WP-CLI to 1.5.0.
.phar
file – Tom J Nowell ♦ Commented Mar 27, 2017 at 18:46composer global require wp-cli/wp-cli
composer global require psy/psysh
– Robin Andrews Commented Mar 27, 2017 at 18:55composer
? – Tom J Nowell ♦ Commented Mar 27, 2017 at 22:42