Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Created December 17, 2015 17:10
Show Gist options
  • Select an option

  • Save kjohnson/f376d56dbf8450163a0e to your computer and use it in GitHub Desktop.

Select an option

Save kjohnson/f376d56dbf8450163a0e to your computer and use it in GitHub Desktop.
Bash download, configure, and install WordPress using the WP-CLI
#!/bin/bash
read -p "Site Name: " siteName
echo "Creating the '$siteName' folder..."
cd public
mkdir $siteName
cd $siteName
echo "Downloading WordPress..."
wp core download
wp core config --dbname=$siteName --dbuser=root --dbpass=root
wp db create
wp core install --url="scotchbox/$siteName" --title=$siteName --admin_user=admin --admin_password=password --admin_email="[email protected]"
wp plugin delete akismet
wp plugin delete hello
wp plugin install ninja-forms
wp plugin activate ninja-forms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment