Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CoachBirgit/62df2f9120024692e8df0d278af6ef46 to your computer and use it in GitHub Desktop.
Save CoachBirgit/62df2f9120024692e8df0d278af6ef46 to your computer and use it in GitHub Desktop.
echo "Welcome to Create WordPress Site Wizard!"
echo -n "Enter Folder Name:"
read foldername
echo -n "Enter Site Name:"
read sitename
echo "Creating Site Folder"
mkdir ${foldername}
cd ${foldername}
echo "Parking the Site URL"
valet link
echo "Securing Site URL"
valet secure
echo "Downloading WordPress"
wp core download
echo "Creating Database"
mysql -u root -e "CREATE DATABASE ${foldername}"
echo "Setting up Config File"
wp core config --dbhost=localhost --dbname=${foldername} --dbuser=root --dbpass=
chmod 644 wp-config.php
echo "Installing WordPress"
wp core install --url=${foldername}.test --title="${sitename}" --admin_name=${foldername} --admin_password=admin --admin_email=info@wp.test
echo "Site Created Successfully $sitename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment