Vvv: WP CLI v0.23 support- or how to update it within VVV

Created on 19 May 2016  路  4Comments  路  Source: Varying-Vagrant-Vagrants/VVV

I've pulled the latest from VVV master branch and ran vagrant reload --provision. The current installed version of WP CLI is 0.22.0-alpha.

I have a custom WP CLI script that gets fatally errored (Fatal error: Uncaught Error: Class 'WP_Metadata_Lazyloader' not found in /srv/www/sitename/htdocs/wp-includes/meta.php:865) when I try to run a WP_Query, and after doing some research I believe it's because of the incompatibility with WordPress 4.5 and anything less than WP CLI 0.23 (https://wp-cli.org/blog/version-0.23.0.html).

I tried figuring out how to upgrade WP CLI to the latest version, but running wp cli upgrade results in an error message about needing to run that from the .phar file. I'd appreciate any help / or nudges in the right direction as far as how to update WP CLI within VVV, or perhaps a different approach I may have missed.

Most helpful comment

It's fairly awkward, but here's what I do:

cd /srw/www/wp-cli
git checkout -- .
git pull origin master
composer update

All 4 comments

It's fairly awkward, but here's what I do:

cd /srw/www/wp-cli
git checkout -- .
git pull origin master
composer update

just run vagrant up --provision

I'm not sure what the issue was- I think somewhere along the line something I did ended with my not being able to run composer update without errors, and that made the --provision never fully run (since composer wouldn't run).

By running vagrant destroy and vagrant up, all seems to be working again. Thanks for the comments @pento and @cfoellmann

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings