Last active
March 23, 2018 03:16
-
-
Save gjreasoner/813c48f4c917634d0fda5e38f09ef2bb to your computer and use it in GitHub Desktop.
Quick WordPress setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Usage: wp-create [site-name] | |
SITENAME=$1 | |
cd ~/git/; | |
mkdir $SITENAME | |
cd ~/git/$SITENAME; | |
wp core download | |
mysql -u root -e "create database $SITENAME" | |
wp config create --dbname="$SITENAME" --dbuser=root | |
wp core install --url="$SITENAME.test" --title="$SITENAME" --admin_user=root --admin_password=password [email protected] | |
# Install WP Pusher (example plugin) | |
wget https://dashboard.wppusher.com/download/latest | |
mv latest wp-content/plugins | |
cd wp-content/plugins | |
unzip latest | |
cd ../../ | |
wp plugin activate wppusher | |
# Remove themes | |
rm -rf wp-content/themes/twentyfifteen | |
rm -rf wp-content/themes/twentysixteen | |
# Lock down file changes | |
wp config set DISALLOW_FILE_MODS true --raw --type=constant | |
# Ready to deploy? | |
# wp search-replace 'example.dev' 'example.com' --skip-columns=guid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment