PHP Fatal error: Uncaught Error: Call to undefined function apply_filters()


#1

For some reason I cannot create wordpress sites anymore. It gets a failed message and when I check the logs it seems it is failing creating the wordpress tables.

This is error message

2016-08-17 01:52:44,601 (DEBUG) ee : ^[[95mSetting up WordPress tables^[[0m
2016-08-17 01:52:44,601 (DEBUG) ee : ^[[95mCreating tables for WordPress Single site^[[0m
2016-08-17 01:52:44,601 (DEBUG) ee : ^[[95mphp /usr/bin/wp  --allow-root core install --url='client.testing.dev' --title='client.testing.dev' --admin_name='myname' --admin_password= --admin_email='myemail@gmail.com'^[[0m
2016-08-17 01:52:44,668 (DEBUG) ee : ^[[95mCommand Output: ,
Command Error: PHP Fatal error:  Uncaught Error: Call to undefined function apply_filters() in /var/www/client.testing.dev/htdocs/wp-includes/load.php:317
Stack trace:
#0 phar:///usr/bin/wp/php/utils-wp.php(22): wp_debug_mode()
#1 phar:///usr/bin/wp/php/wp-settings-cli.php(59): WP_CLI\Utils\wp_debug_mode()
#2 phar:///usr/bin/wp/php/WP_CLI/Runner.php(807): require('phar:///usr/bin...')
#3 phar:///usr/bin/wp/php/WP_CLI/Runner.php(755): WP_CLI\Runner->load_wordpress()
#4 phar:///usr/bin/wp/php/wp-cli.php(21): WP_CLI\Runner->start()
#5 phar:///usr/bin/wp/php/boot-phar.php(5): include('phar:///usr/bin...')
#6 /usr/bin/wp(4): include('phar:///usr/bin...')
#7 {main}
  thrown in /var/www/client.testing.dev/htdocs/wp-includes/load.php on line 317
^[[0m
2016-08-17 01:52:44,669 (DEBUG) ee : ^[[95m'setup WordPress tables failed for single site'^[[0m
2016-08-17 01:52:44,669 (INFO) ee : ^[[94m^[[91mOops Something went wrong !!^[[0m
2016-08-17 01:52:44,669 (INFO) ee : ^[[94m^[[91mCalling cleanup actions ...^[[0m
2016-08-17 01:52:44,669 (DEBUG) ee : ^[[95mRemoving Nginx configuration^[[0m
2016-08-17 01:52:44,669 (DEBUG) ee : ^[[95mRemoving /etc/nginx/sites-enabled/client.testing.dev^[[0m
2016-08-17 01:52:44,669 (DEBUG) ee : ^[[95mRemoving /etc/nginx/sites-available/client.testing.dev^[[0m
2016-08-17 01:52:44,669 (INFO) ee : ^[[94mReload : nginx     ^[[0m

I googled this error but couldn’t find anything that seemed relevant. I don’t think I have hanged anything on server, it is just an image I use for developing wordpress sites. I am not sure why this error started as I could create sites fine before.

How can I fix this?


#2

This is a bug in WP CLI. Easy engine update doesn’t seem to update WP-CLI.

I ran “sudo wp cli update --allow-root” and it fixed the problem.


#3

Please use ee update command. Recently we released EE with WP CLI update https://github.com/EasyEngine/easyengine/releases


#4