Can’t run or update WP CLI due to fatal error
-
I am attempting to run WP CLI on my server, but I get an error when I try to run it. My server is running on Ubuntu 18.04 and PHP 7.4. When I run WP CLI I get this error:
PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string
given in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php:75
Stack trace:
#0 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php(75): implode()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php(32):
WP_CLI\DocParser->get_longdesc()
#2 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(113):
WP_CLI\Dispatcher\CompositeCommand->__construct()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(45):
WP_CLI\Dispatcher\CommandFactory::create_composite_command()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php(513):
WP_CLI\Dispatcher\CommandFactory::create()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/cache-command/cache-command.php(12): WP_CLI::add_command()
#6 phar:///usr/local/bin/wp/vendor/composer/autoload_real.php(66): require(‘…’)
#7 phar:///usr/local/bin/wp/vendor/composer/autoload_real.php(56):
composerRequire6501cc48682cc22d1e9df4be5afc251e()
#8 phar:///usr/local/bin/wp/vendor/autoload.php(7):
ComposerAutoloaderInit6501cc48682cc22d1e9df4be5afc251e::getLoader()
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php(46):
require(‘…’)
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74):
WP_CLI\Bootstrap\AutoloaderStep->process()
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(23): WP_CLI\bootstrap()
#12 phar:///usr/local/bin/wp/php/boot-phar.php(11): include(‘…’)
#13 /usr/local/bin/wp(4): include(‘…’)
#14 {main}
thrown in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php on line 75
root@andre-4:~# cd usr/local/bin/wp/vendor/wp-cli/wp-cli/php/
-bash: cd: usr/local/bin/wp/vendor/wp-cli/wp-cli/php/: No such file or directoryI can’t even update it using: wp cli update –allow-root without getting the same error.
Please help, I use this to update my plugins on my server, and it wont run. I have no idea how to fix this, because I can’t even update it.
- The topic ‘Can’t run or update WP CLI due to fatal error’ is closed to new replies.