Skip to content

Instantly share code, notes, and snippets.

@yayMark
Created May 28, 2018 22:49
Show Gist options
  • Save yayMark/23009807e5ca8f8a44453c965993e386 to your computer and use it in GitHub Desktop.
Save yayMark/23009807e5ca8f8a44453c965993e386 to your computer and use it in GitHub Desktop.
Linux shell, wp-cli, Valet: install WordPress, clone a theme from GitHub, remove plugins and themes, add to Valet, open site in browser
#!/bin/bash
# params
# 1 project folder
# 2 github user
# 3 github repo
cd ~/projects
mkdir $1
cd $1/
wp core download
cd wp-content/themes
git clone git@github.com:$2/$3.git
wp config create --dbname=$1 --dbuser=root --dbpass=root
wp db create
wp core install --url=$1.test --title=$1 --admin_user=mxyzptlk --admin_email=mxyzptlk@example.com
wp plugin delete hello
wp plugin delete akismet
wp theme activate $3
wp theme delete twentyfifteen
wp theme delete twentysixteen
wp theme delete twentyseventeen
cd ~/projects/$1
valet link $1
xdg-open http://$1.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment