Seravo / wordpress

The WordPress project layout used by many of Seravo's customers, suitable also for local development with Vagrant and git deployment
https://seravo.com
GNU General Public License v3.0
104 stars 53 forks source link

Update WP CLI in local environment #189

Closed samikeijonen closed 3 years ago

samikeijonen commented 3 years ago

Is it possible to update WP CLI in local environment?

At least I'm seeing version 2.4 in local and version 2.5 in live sites.

In my use case wp i18n for JS and JSON files only works in more recent version.

ypcs commented 3 years ago

Hi. Sorry for the delay in answering to this.

In local development environment you should have sudo access, so it's technically possible to upgrade the WP-CLI. In our setup wp-cli.phar is installed to /usr/local/bin/wp-cli, so you could eg. run something like

curl -fsSL -o wp-cli https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# here you probably should confirm that WP-CLI binary downloaded is valid
sudo mv wp-cli /usr/local/bin/wp-cli

Note: above is not tested as I don't have access to dev environment right now, but something like this should work anyways.

samikeijonen commented 3 years ago

Thanks.

I needed to give more access to bin, after that I was able to update.

Closing out.