digitalquery/wp-vagrant

PHP Fatal error during "vagrant up"

Closed this issue · 1 comments

When running "vagrant up", I get this Fatal error at the end of the provisioning:

==> default: PHP Fatal error:  Uncaught Error: Call to undefined function apply_filters() in /vagrant/wp-includes/load.php:317
==> default: Stack trace:
==> default: #0 phar:///usr/local/bin/wp/php/utils-wp.php(22): wp_debug_mode()
==> default: #1 phar:///usr/local/bin/wp/php/wp-settings-cli.php(59): WP_CLI\Utils\wp_debug_mode()
==> default: #2 phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(807): require('phar:///usr/loc...')
==> default: #3 phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(755): WP_CLI\Runner->load_wordpress()
==> default: #4 phar:///usr/local/bin/wp/php/wp-cli.php(21): WP_CLI\Runner->start()
==> default: #5 phar:///usr/local/bin/wp/php/boot-phar.php(5): include('phar:///usr/loc...')
==> default: #6 /usr/local/bin/wp(4): include('phar:///usr/loc...')
==> default: #7 {main}
==> default:   thrown in /vagrant/wp-includes/load.php on line 317

What could be the case?

It's because the version of wp-cli I have on the box by default is now very old and breaks with 4.6.1 - I'll update this in the next few hours.

In the meantime, you can:

  • vagrant ssh into the box
  • run sudo wp cli update --allow-root
  • exit your ssh session
  • run vagrant provision to rerun the provisioning process, which should work fine this time