Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Last active September 17, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpataki/1baa2e332d0d6ec1fdb5 to your computer and use it in GitHub Desktop.
Save danielpataki/1baa2e332d0d6ec1fdb5 to your computer and use it in GitHub Desktop.
Install.sh
#!/bin/bash
# Setup Variables
DBNAME=checker
DBUSER=root
DBPASS=root
DBHOST=localhost
DBPREFIX=9239jej9md_
URL=checker
TITLE=Checker
ADMINUSER=adminuser
ADMINPASS=adminpass
ADMINEMAIL=admin@email.com
REPOPLUGINS="advanced-custom-fields"
NONREPOPLUGINS="http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=b3JkZXJfaWQ9MzU0ODV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE0LTA3LTIyIDE0OjAwOjM1 http://download.advancedcustomfields.com/OPN8-FA4J-Y2LW-81LS/trunk/"
# Remove Current Installation
sudo wp db drop --yes --allow-root;
sudo wp core download --allow-root;
# Install WordPress
sudo wp core config --dbname=${DBNAME} --dbuser=${DBUSER} --dbpass=${DBPASS} --dbhost=${DBHOST} --dbprefix=${DBPREFIX} --allow-root --extra-php <<PHP
define( 'WP_DEBUG', true );
PHP
sudo wp db create --allow-root
sudo wp core install --url=${URL} --title=${TITLE} --admin_user=${ADMINUSER} --admin_password=${ADMINPASS} --admin_email=${ADMINEMAIL} --allow-root
# Delete Base Plugins
sudo wp plugin delete hello --allow-root
sudo wp plugin delete akismet --allow-root
# Install Repo Plugins
sudo wp plugin install ${REPOPLUGINS} --allow-root
# Install Non-Repo Plugins
sudo wp plugin install ${NONREPOPLUGINS} --allow-root
sudo wp plugin activate advanced-custom-fields --allow-root
sudo wp plugin activate acf-options-page --allow-root
# Misc Cleanup
sudo wp post delete 1 --allow-root
sudo wp rewrite structure "/%year%/%monthnum%/%day%/%postname%/" --allow-root
sudo wp rewrite flush --allow-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment