-
-
Save sobujbd/248d94267def607f19e6ccaab36e2174 to your computer and use it in GitHub Desktop.
wp-cli-create
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=dbname | |
DBUSER=dbuser | |
DBPASS=dbpass | |
DBHOST=localhost | |
DBPREFIX=oxo_ | |
URL=http:// | |
TITLE=BlogTitle | |
ADMINUSER=admin | |
ADMINPASS=admin | |
[email protected] | |
REPOPLUGINS="wordpress-importer theme-check plugin-check developer" | |
# Remove Current Installation | |
wp db drop --yes; | |
wp core download; | |
# Install WordPress | |
wp core config --dbname=${DBNAME} --dbuser=${DBUSER} --dbpass=${DBPASS} --dbhost=${DBHOST} --dbprefix=${DBPREFIX} | |
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 | |
wp plugin delete akismet | |
# Install Repo Plugins | |
wp plugin install ${REPOPLUGINS} --activate | |
# Misc Cleanup | |
wp post delete 1 | |
wp plugin delete hello-dolly | |
wp rewrite structure "/%year%/%monthnum%/%day%/%postname%/" | |
wp rewrite flush | |
# Install WPTest.io | |
curl -OL https://raw.githubusercontent.com/manovotny/wptest/master/wptest.xml | |
wp import wptest.xml --authors=create | |
rm wptest.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment