Skip to content

Instantly share code, notes, and snippets.

@xtetsuji
Last active August 20, 2017 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xtetsuji/e620792db74640a81906920b9254ec81 to your computer and use it in GitHub Desktop.
Save xtetsuji/e620792db74640a81906920b9254ec81 to your computer and use it in GitHub Desktop.
wp-cli installer. it is simple and tiny.
#!/bin/bash
# e.g.
# ssh server "curl -L git.io/v7xmi | bash"
# This script is stored as
# git.io/v7xmi
# and
# https://gist.github.com/xtetsuji/e620792db74640a81906920b9254ec81
set -eu
if [ -n "${DEBUG:-}" ] ; then
set -x
fi
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
mv -i wp-cli.phar /usr/local/bin/wp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment