Bedrock installed through VV: WP-CLI errors

I’ve installed Bedrock on my local machine via VV.

While the site is running fine, I’m having an issue getting wp-cli to run (errors below).

The contents of my wp-cli.yml file are:

path: web/wp

and the error in question

PHP Fatal error:  Uncaught Error: Call to undefined function apply_filters() in Users/christianmagill/Code/VVV/www/influencebydesign/htdocs/web/wp/wp-includes/load.php:317
Stack trace: 
#0 /usr/local/Cellar/wp-cli/0.23.0/php/utils-wp.php(22): wp_debug_mode()
#1 /usr/local/Cellar/wp-cli/0.23.0/php/wp-settings-cli.php(59): WP_CLI\Utils\wp_debug_mode()
#2 /usr/local/Cellar/wp-cli/0.23.0/php/WP_CLI/Runner.php(807): require('/usr/local/Cell...')
#3 /usr/local/Cellar/wp-cli/0.23.0/php/WP_CLI/Runner.php(755): WP_CLI\Runner->load_wordpress()
#4 /usr/local/Cellar/wp-cli/0.23.0/php/wp-cli.php(21): WP_CLI\Runner->start()
#5 /usr/local/Cellar/wp-cli/0.23.0/php/boot-fs.php(17): include('/usr/local/Cell...')
#6 {main}
thrown in /Users/christianmagill/Code/VVV/www/influencebydesign/htdocs/web/wp/wp-includes/load.php on line 317

Fatal error: Uncaught Error: Call to undefined function apply_filters() in /Users/christianmagill/Code/VVV/www/influencebydesign/htdocs/web/wp/wp-includes/load.php:317
Stack trace:
#0 /usr/local/Cellar/wp-cli/0.23.0/php/utils-wp.php(22): wp_debug_mode()
#1 /usr/local/Cellar/wp-cli/0.23.0/php/wp-settings-cli.php(59): WP_CLI\Utils\wp_debug_mode()
#2 /usr/local/Cellar/wp-cli/0.23.0/php/WP_CLI/Runner.php(807): require('/usr/local/Cell...')
#3 /usr/local/Cellar/wp-cli/0.23.0/php/WP_CLI/Runner.php(755): WP_CLI\Runner->load_wordpress()
#4 /usr/local/Cellar/wp-cli/0.23.0/php/wp-cli.php(21): WP_CLI\Runner->start()
#5 /usr/local/Cellar/wp-cli/0.23.0/php/boot-fs.php(17): include('/usr/local/Cell...')
#6 {main}
  thrown in /Users/christianmagill/Code/VVV/www/influencebydesign/htdocs/web/wp/wp-includes/load.php on line 317

`

Much thanks for any help,

Not sure how much help we can be since we don’t know anything about “VV” (did you mean VVV?). Either way, seems like an issue with it and not Bedrock.

VV is a site setup wizard for VVV

I’ve noticed that wp-cli does work when I SSH into Vagrant but not locally. I’m not sure if it’s possible to get things working locally, or whether that is by design.

Thanks,

I’m seeing the same error on a recent deploy. Working on it now.

Please let me know what you find.

Update WP-CLI to the latest version

Updating WP-CLI fixed the apply_filters() error.

I had installed the CLI via Brew, and in order to get the latest update 24.1, I had to reinstall via phar package

http://wp-cli.org/#installing

This then lead me to a database error, which I fixed by updating the database details in my .env to

DB_USER=external
DB_PASSWORD=external
DB_HOST=example.dev:3306

The database issue is VVV specific.