Skip to content

Instantly share code, notes, and snippets.

@craigiswayne
Last active January 29, 2019 08:25
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 craigiswayne/04498f43c1eec23ed4e0209a1ac16343 to your computer and use it in GitHub Desktop.
Save craigiswayne/04498f43c1eec23ed4e0209a1ac16343 to your computer and use it in GitHub Desktop.
Install WP-CLI, Composer and Imagick on Digital Ocean WordPress Droplet (Ubuntu 16)
echo "Installing WP-CLI...";
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
sudo mv wp-cli.phar /usr/local/bin/wp
echo "Installing Composer...";
sudo apt-get update;
sudo apt-get install curl php-cli php-mbstring git unzip -y;
cd ~;
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
echo "Installing Imagick PHP Extension";
sudo apt-get install php-imagick -y;
cd /var/www/html;
wp --info --allow-root;
composer --version;
@craigiswayne
Copy link
Author

Usage:

sh -c "$(curl -fsSL https://gist.githubusercontent.com/craigiswayne/04498f43c1eec23ed4e0209a1ac16343/raw/f16136469bc326de952d38684c62d2ef0737edf3/install-wp-cli-composer-imagick.sh)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment