Skip to content

Instantly share code, notes, and snippets.

@noinarisak
Last active July 5, 2016 14:14
Show Gist options
  • Save noinarisak/06da1646e07cb980820033c77781a55e to your computer and use it in GitHub Desktop.
Save noinarisak/06da1646e07cb980820033c77781a55e to your computer and use it in GitHub Desktop.
#!/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