最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

updates - Error updating WP-CLI

programmeradmin1浏览0评论

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
  • How is your copy of WP CLI installed? The message indicates that you have not used the standard WP CLI installation method of downloading and moving a .phar file – Tom J Nowell Commented Mar 27, 2017 at 18:46
  • I installed it thusly: composer global require wp-cli/wp-cli composer global require psy/psysh – Robin Andrews Commented Mar 27, 2017 at 18:55
  • have you tried updating it with composer? – Tom J Nowell Commented Mar 27, 2017 at 22:42
  • @Robin Did you manage to update WP-CLI? – Sven Commented Feb 19, 2018 at 22:39
Add a comment  | 

1 Answer 1

Reset to default 1

First 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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论