[Linux] How to install WP CLI 

// Download wp-cli phar, can download from https://wp-cli.org/
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

// put it to bin
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

// done. check the version
wp --info

***
Please install PHP for your server then run wp-cli
***
PHP Fatal error:  Uncaught Error: Call to undefined function json_encode()
Please install php-json to solve it.
***
Please install php-mbstring for support i18n making pot.
Back