Roots Discourse

Update WP-CLI?

#1

Hello :slight_smile:

I would like to update WP_CLI but I don’t want to do anything stupid, is there an easy and clean way to do that?

When I check the current installed version, I have this:

 wp cli version 
WP-CLI 2.0.1

However, the latest version of WP-CLI is 2.1.0.

And if I try to update it manually I have that back:

 wp cli update
Error: /usr/bin/wp is not writable by current user.

Updating it would allow me to install a different language for each of my plugins automatically (see https://github.com/wp-cli/language-command/issues/59).

Thanks! :slight_smile:

0 Likes

#2

Are you on macOS? If so, you should be installing it into /usr/local/bin/wp instead.

$ sudo rm /usr/bin/wp
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp

This would fix your permission issue.

0 Likes

#3

Thank you! I was trying to update WP-CLI in vagrant ssh :sweat_smile:

0 Likes