Instantly share code, notes, and snippets.

Embed
What would you like to do?
エックスサーバーに wp-cli を導入するシェルスクリプト。PHP のバージョンは要確認。
#!/bin/bash
mkdir bin
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar bin/
echo -e "\nalias wp='/opt/php-7.1.2/bin/php ~/bin/wp-cli.phar'" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment