Created
October 9, 2017 10:37
-
-
Save NasirNobin/a79a7efe4173123313250adc32cbdacc to your computer and use it in GitHub Desktop.
Single Command WP Installation
This file contains hidden or 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
| 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