Skip to content

A quick update from the road while at Wordcamp 2013 in San Francisco. After heading Mike Schroder’s talk: Magical WordPress Management using WP-CLI, I decided to install WP-CLI on a new Grid Server from Mediatemple. Unfortunately wp-cli’s default installer fails, but the following commands work if you’d like to give it a shot on your own.

First off, you’ll need to have SSH enabled and log in. Stay in the default top level directory.

Clone the wp-cli code from Github

$ git clone git://github.com/wp-cli/wp-cli.git

Move into the new directory

$ cd wp-cli

Install Composer (Instructions from Jamie Rumbelow)

$ curl -s https://getcomposer.org/installer | php -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar

Add these lines to your bash profile located at /home/xxxxxx/users/.home/.profile creating the file if necessary. The alias for wp won’t work yet, but saves a step in this process. Be sure to update the xxxxx with your own site number from the Server Guide page.

alias get_composer="curl -s https://getcomposer.org/installer | php -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar"
alias composer="php -d memory_limit=512M -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar composer.phar"
alias wp="/home/xxxxxx/users/.home/wp-cli/bin/wp"

Reload your profile

$ source ~/.profile

Get the Composer files and install wp-cli and the optional Boris extension.

$ get_composer
$ composer install --dev
$ composer require --prefer-source wp-cli/wp-cli=@stable
$ composer --quiet require --prefer-source 'd11wtq/boris=@stable'

You’re all set! Run help for a listing of  commands to get started.

$ wp --help

Max Elman is Razorfrog's Founder and Project Manager. He is a tech-savvy internet guru and has led Razorfrog's award-winning web design team since 2008. View Max's bio for more details.

Toggle light/dark mode

Back To Top