Skip to content

Instantly share code, notes, and snippets.

@schurpf
Created October 24, 2014 17:51
Show Gist options
  • Save schurpf/b3220afc0ba209ee7dfb to your computer and use it in GitHub Desktop.
Save schurpf/b3220afc0ba209ee7dfb to your computer and use it in GitHub Desktop.
sh: create new wp install with wp-cli
#!/bin/bash
mysql -u root -proot -e "CREATE DATABASE wp_test_setup;"
mysql -u root -proot -e "CREATE USER 'mywpuser'@'localhost' IDENTIFIED BY 'H3S7g7vkzQwGvk';"
mysql -u root -proot -e "GRANT ALL PRIVILEGES ON wp_test_setup.* TO 'mywpuser'@'localhost';"
mysql -u root -proot -e "FLUSH PRIVILEGES;"
wp core download
wp core config --dbname=wp_test_setup --dbuser=mywpuser --dbpass=H3S7g7vkzQwGvk --dbhost=localhost
wp core install --url=localhost:8888/wp-test --title="Just another test site" --admin_name=admin [email protected] --admin_password=12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment