Error updating WP-CLI

First of all, locate your installation of WP-CLI.


If you’re using Composer you can list all globally installed packages on the command line like this:

composer global show

Then update the WP-CLI composer package:

composer global update wp-cli/wp-cli

If you’re using Homebrew, you can list all installed packages on the command line like this:

brew list

And update the package:

brew upgrade wp-cli

After that you should be able to upgrade to the next version of WP-CLI via the built-in command:

wp cli update

In return, you’ll get a prompt like this:

You have version 1.4.1. Would you like to update to 1.5.0? [y/n]


Downloading from https://github.com/wp-cli/wp-cli/releases/download/v1.5.0...
New version works. Proceeding to replace.
Success: Updated WP-CLI to 1.5.0.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)