Razorfrog Web Design Razorfrog Web Design
  • Home
  • About
  • Services
    • Responsive Web Design
    • E-Commerce Stores
    • Logo & Brand Identity
    • Search Engine Optimization
    • Copywriting & Editing
    • Photography & Imaging
  • Portfolio
  • News
  • Contact
Close
  • Home
  • About
  • Services
    • Responsive Web Design
    • E-Commerce Stores
    • Logo & Brand Identity
    • Search Engine Optimization
    • Copywriting & Editing
    • Photography & Imaging
  • Portfolio
  • News
  • Contact

Installing WP-CLI on a Mediatemple Grid Server

July 27, 2013

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
Posted in: Code, Resources Tagged: WordCamp, WordCamp SF Author: Max Elman

Share

FacebookTwitter

3 Comments

  1. Avatar of tallship
    tallship
    June 8, 2016 at 5:30 pm / Reply

    wp-cli is installed and standard on (mt) Grid Services (from at least as early as 2014). It is included by default on the WordPress hosting products that they resell from GoDaddy… ergo, it’s available by default there too without having to install anything.

    For more info, here are links describing these standard feature sets:

    wp-cli on (mt) Grid accounts: https://mediatemple.net/community/products/grid/204405704/using-wp-cli

    wp-cli on GoDaddy’s WordPress hosting accounts (including the one’s with the Media Temple branding):
    https://www.godaddy.com/help/use-wp-cli-to-manage-your-site-12066
    https://mediatemple.net/community/products/wordpress/204405704/using-wp-cli

    • Avatar of Max Elman
      Max Elman
      June 8, 2016 at 5:34 pm /

      Thanks for the links! This post is from 2013 and may no longer be necessary.

  2. Avatar of Ivan X
    Ivan X
    November 11, 2017 at 10:23 pm / Reply

    This post is fantastic. I was able to install wp-cli into a jailshell running on a typical web host (LunarPages), with the one minor change that I put the aliases into ~/.bash_profile (rather than ~/.profile). Thanks much for layout out a process that might have taken me hours.

Leave a Reply / Cancel Reply

  • Prev
  • Next

© 2008-2023 RAZORFROG WEB DESIGN
Sitemap • Terms of Service • Privacy • Cookie Policy • Accessibility
415-480-4587 • 1032 Irving St #984
, San Francisco, CA 94122
Powered by WordPress