WordPressのwp cliが突然PHP Fatal errorを吐いて動かなくなってしまった



PHP Fatal error:  Call to undefined function apply_filters() in load.php on line 317



# wp cli update
Error: YIKES! It looks like you’re running this as root. You probably meant to run this as the user that your WordPress install exists under.

If you REALLY mean to run this as root, we won’t stop you, but just bear in mind that any code on this site will then have full control of your server, making it quite DANGEROUS.

If you’d like to continue as root, please run this again, adding this flag: –allow-root

If you’d like to run it as the user that this site is under, you can run the following to become the respective user:

sudo -u USER -i — wp

# wp cli update –allow-root
You have version 0.23.1. Would you like to update to 0.24.1? [y/n] y
Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar…
New version works. Proceeding to replace.
Success: Updated WP-CLI to 0.24.1