https://kinsta.com/blog/managing-wordpress-with-wp-cli/ http://wp-cli.org/commands/ https://www.smashingmagazine.com/2015/09/wordpress-management-with-wp-cli/ https://www.linode.com/docs/websites/cms/install-wordpress-using-wp-cli-on-ubuntu-14-04 https://www.linode.com/docs/websites/lemp/lemp-server-on-ubuntu-16-04
Last active
July 5, 2016 14:14
-
-
Save noinarisak/06da1646e07cb980820033c77781a55e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# # install php5 | |
# sudo apt-get update | |
# sudo apt-get install -y php5 | |
# curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
# chmod +x wp-cli.phar | |
# sudo mv wp-cli.phar /usr/local/bin/wp | |
# requires scotch.io vagrant box https://box.scotch.io/ | |
# wp core download | |
# wp core config --dbname=scotchbox --dbuser=root --dbpass=root --dbhost=localhost --dbprefix=scotchio | |
# wp core install --url=http://192.168.33.10 --title=ScotchIO --admin_user=username --admin_password=password [email protected] | |
os_setup() { | |
echo "TODO: Manual LEMP setup" | |
} | |
wp-cli_install() { | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
} | |
wp_install() { | |
wp core download --path=$1; | |
cd $1; | |
read -p 'name the database:' dbname; | |
# read -p 'name/ip address:' dbhost; | |
wp core config --dbname=$dbname --dbuser=root --dbpass=root --dbhost=localhost; | |
wp db create; | |
wp core install --prompt | |
} | |
wp_plugins_install() { | |
wp plugin install w3-total-cache | |
wp plugin activate w3-total-cache | |
wp plugin install wordpress-seo | |
wp plugin activate wordpress-seo | |
wp plugin install yoast-seo-acf-analysis | |
wp plugin activate yoast-seo-acf-analysis | |
wp plugin install wordfence | |
wp plugin activate wordfence | |
wp plugin install updraftplus | |
wp plugin activate updraftplus | |
wp plugin install google-analytics-for-wordpress | |
wp plugin activate google-analytics-for-wordpress | |
} | |
deploy() { | |
wp_install new-site | |
} | |
# Usage | |
# $ source ~/.bashrc | |
# $ wp_install new-site |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment