LoginSignup
1
1

More than 5 years have passed since last update.

wp cliが普段動いていたのに何かしらのerrorで急に動かなくなった場合

Posted at

いままで動いていたWP-CLIが動かない!そんなときはたいていバージョンの問題です。
以下のようなエラーが出る感じですね。

PHP Fatal error:  Uncaught Error: Call to undefined function apply_filters() in /wp-includes/load.php:317
Stack trace:
#0 /usr/local/Cellar/wp-cli/0.23.1/php/utils-wp.php(22): wp_debug_mode()
#1 /usr/local/Cellar/wp-cli/0.23.1/php/wp-settings-cli.php(59): WP_CLI\Utils\wp_debug_mode()
#2 /usr/local/Cellar/wp-cli/0.23.1/php/WP_CLI/Runner.php(807): require('/usr/local/Cell...')
#3 /usr/local/Cellar/wp-cli/0.23.1/php/WP_CLI/Runner.php(755): WP_CLI\Runner->load_wordpress()
#4 /usr/local/Cellar/wp-cli/0.23.1/php/wp-cli.php(21): WP_CLI\Runner->start()
#5 /usr/local/Cellar/wp-cli/0.23.1/php/boot-fs.php(17): include('/usr/local/Cell...')

その際はとりあえずWP-CLIを最新バージョンにしてみましょう

wp cli update

でアップデートできるはずです。もしそれでもエラーが出る場合。例えば以下の様な感じです

Error: You can only self-update Phar files.

権限がなにかしらおかしい可能性が高いです。その場合は、再度インストールをし直したほうがさくっと進められる可能性が高いです。

よい、WP−CLI生活を

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1