Advertisement
Guest User

Untitled

a guest
Apr 11th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!/bin/bash
  2. # Requires WP-CLI. Assumes WP-CLI is in your $PATH.
  3. # Set the default LOC, TITLE, EMAIL, USER & PASSWORD as you like.
  4. # Set the DB user and pass (line 11) to a user that has permissions to create DBs.
  5. # run with ./installwp.sh in most cases.
  6.  
  7. read -p "Locale? (en_GB): " -e LOC
  8. [ -z "${LOC}" ] && LOC='en_GB'
  9. wp core download --locale=$LOC
  10.  
  11. read -p "DB Name?: " -e DBNAME
  12. wp core config --dbname=$DBNAME --dbuser=[user] --dbpass=[pass]
  13.  
  14. wp db create
  15.  
  16. read -p "URL?: " -e URL
  17. read -p "Title?: " -e TITLE
  18. #[ -z "${TITLE}" ] && TITLE='Test Site'
  19. read -p "Admin email?: " -e ADEMAIL
  20. [ -z "${ADEMAIL}" ] && ADEMAIL='you@yourdomain.com'
  21. read -p "Admin username?: " -e ADUSERNAME
  22. [ -z "${ADUSERNAME}" ] && ADUSERNAME='defaultusername'
  23. read -p "Admin password?: " -e ADPASSWORD
  24. [ -z "${ADPASSWORD}" ] && ADPASSWORD='defaultpassword'
  25. 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