Skip to content

Instantly share code, notes, and snippets.

@NasirNobin
Created October 9, 2017 10:37
Show Gist options
  • Select an option

  • Save NasirNobin/a79a7efe4173123313250adc32cbdacc to your computer and use it in GitHub Desktop.

Select an option

Save NasirNobin/a79a7efe4173123313250adc32cbdacc to your computer and use it in GitHub Desktop.
Single Command WP Installation
if [ $2 ]; then
DB_NAME=$2
else
DB_NAME='default_db'
fi
NAME=$1
TITLE=$(echo $NAME | tr 'a-z' 'A-Z')
wp core download
wp config create --dbname=$DB_NAME --dbuser=root --dbprefix=$NAME"_"
wp core install --url=http://$NAME.dev --title=$TITLE --admin_user=admin [email protected] --admin_password=admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment