Advertisement
Guest User

Untitled

a guest
May 16th, 2017
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. clear
  3. # Take User Inputs
  4. read -p "Site URL: " url
  5. read -p "Site title: " title
  6. read -p "Site Slug: " sslug
  7. read -p "DB Name: " db
  8. read -p "DB Pass: " dbpass
  9. read -p "WP Prefix: " pf
  10. pass=$(date +%s | sha256sum | base64 | head -c 32 ; echo)
  11. wp core download --allow-root
  12. # using proc_open() function
  13. wp core config --dbname="$db" --dbuser="$db" --dbpass="$dbpass" --locale=zh_TW --allow-root --dbprefix="$pf"_ --extra-php <<PHP
  14. define('WP_MEMORY_LIMIT', '256M');
  15. define('WP_POST_REVISIONS', 3);
  16. define('WPLANG', 'zh_TW');
  17. PHP
  18. # wp db create --allow-root
  19. # Run WP Install
  20. wp core install --url="$url" --title="$title" --admin_user="$sslug"_user --admin_password="$pass" --admin_email="wp@example.com" --allow-root
  21. wp plugin install mxp-dev-tools --activate --allow-root
  22. wp plugin delete hello --allow-root
  23. wp post delete $(wp post list --post_type='page' --format=ids --allow-root) --force --allow-root
  24. wp post delete $(wp post list --post_type='post' --format=ids --allow-root) --force --allow-root
  25. wp post create --post_type='page' --post_title="Home" --post_status="publish" --allow-root
  26. wp core language install zh_TW --activate --allow-root
  27. # wp scaffold child-theme childtheme --parent_theme=basetheme --author=Knockers --allow-root
  28. wp option update timezone_string Asia/Taipei --allow-root
  29. wp option update blogdescription "" --allow-root
  30. wp option update default_pingback_flag 0 --allow-root
  31. wp option update default_ping_status 0 --allow-root
  32. wp option update default_comment_status 0 --allow-root
  33. wp option update comment_registration 1 --allow-root
  34. wp option update blog_public 0 --allow-root
  35. wp option update show_on_front page --allow-root
  36. wp option update page_on_front 3 --allow-root
  37. wp option update date_format "Y-m-d" --allow-root
  38. wp option update time_format "H:i:s" --allow-root
  39. chown www:www * -R
  40. echo "admin_user : $sslug"_user
  41. echo "admin_password: $pass"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement