Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Requires WP-CLI. Assumes WP-CLI is in your $PATH.
- # Set the default LOC, TITLE, EMAIL, USER & PASSWORD as you like.
- # Set the DB user and pass (line 11) to a user that has permissions to create DBs.
- # run with ./installwp.sh in most cases.
- read -p "Locale? (en_GB): " -e LOC
- [ -z "${LOC}" ] && LOC='en_GB'
- wp core download --locale=$LOC
- read -p "DB Name?: " -e DBNAME
- wp core config --dbname=$DBNAME --dbuser=[user] --dbpass=[pass]
- wp db create
- read -p "URL?: " -e URL
- read -p "Title?: " -e TITLE
- #[ -z "${TITLE}" ] && TITLE='Test Site'
- read -p "Admin email?: " -e ADEMAIL
- [ -z "${ADEMAIL}" ] && ADEMAIL='you@yourdomain.com'
- read -p "Admin username?: " -e ADUSERNAME
- [ -z "${ADUSERNAME}" ] && ADUSERNAME='defaultusername'
- read -p "Admin password?: " -e ADPASSWORD
- [ -z "${ADPASSWORD}" ] && ADPASSWORD='defaultpassword'
- wp core install --url=$URL --title="$TITLE" --admin_email=$ADEMAIL --admin_user=$ADUSERNAME --admin_password=$ADPASSWORD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement