Created
November 24, 2014 18:56
-
-
Save danielpataki/2093481b226b8e64d567 to your computer and use it in GitHub Desktop.
W-CLI Script
This file contains 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 | |
# Setup Variables | |
DBNAME=blog | |
DBUSER=root | |
DBPASS=root | |
DBHOST=localhost | |
DBPREFIX=9239jej9md_ | |
URL=http://blog.local | |
TITLE=blog | |
ADMINUSER=danielpataki | |
ADMINPASS=danielpataki | |
ADMINEMAIL=mymail@mail.com | |
REPOPLUGINS="advanced-custom-fields regenerate-thumbnails wordpress-importer" | |
REPOTHEMES="sorbet" | |
ACTIVETHEME="sorbet" | |
# Install WordPress | |
wp core download; | |
wp core config --dbname=${DBNAME} --dbuser=${DBUSER} --dbpass=${DBPASS} --dbhost=${DBHOST} --dbprefix=${DBPREFIX} --extra-php <<PHP | |
define( 'WP_DEBUG', true ); | |
PHP | |
wp db create; | |
wp core install --url=${URL} --title=${TITLE} --admin_user=${ADMINUSER} --admin_password=${ADMINPASS} --admin_email=${ADMINEMAIL} | |
# Delete Base Plugins | |
wp plugin delete hello akismet | |
# Install Repo Plugins | |
wp plugin install ${REPOPLUGINS} --activate | |
# Install Themes | |
wp theme install ${REPOTHEMES} | |
wp theme activate ${ACTIVETHEME} | |
# Misc Cleanup | |
wp post delete 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment