WP CLI just changed my life – Admin wordpress sites from the command lineApr 20th, 2017 | By admin | Category: Linux / Freebsd, wordpress
I’ve installed somewhere between 300-500 wordpress sites in my life and I have no idea how I hadn’t heard of WP CLI until now but man oh man this thing is awesome. Never again have to log into an admin site to do updates and maintenance because WP CLI is here.
First off, head over to http://wp-cli.org/ for general info.
To install it do the following steps:
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
- php wp-cli.phar –info (make sure it is working properly)
- chmod +x wp-cli.phar (make it writable)
- sudo mv wp-cli.phar /usr/local/bin/wp (move it to a globally accessible dir)
- wp –info (test it again)
And you’re good. Some useful commands are:
- wp cli update
- wp search-replace
WP-CLI also comes with a tab completion script for Bash and ZSH. Just download wp-completion.bash and source it from
Don’t forget to run
source ~/.bash_profile afterwards