Skip to content

Instantly share code, notes, and snippets.

@jrobinsonc
Created April 6, 2019 03:02
Show Gist options
  • Save jrobinsonc/264a1fa0237e634be1e4bcd5c97d1717 to your computer and use it in GitHub Desktop.
Save jrobinsonc/264a1fa0237e634be1e4bcd5c97d1717 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
set -e
[ -d wp-admin ] || wp core download
[ -f wp-config.php ] || wp config create \
--dbhost="$WP_DB_HOST" \
--dbname="$WP_DB_NAME" \
--dbuser="$WP_DB_USER" \
--dbpass="$WP_DB_PASSWORD"
if ! wp core is-installed
then
gunzip -c /tmp/db.sql.gz > /tmp/db.sql
wp db import /tmp/db.sql
rm /tmp/db.sql
# wp core install \
# --url="$WP_SITE_URL" \
# --title="$WP_SITE_TITLE" \
# --admin_user="$WP_ADMIN_USER" \
# --admin_password="$WP_ADMIN_PASSWORD" \
# --admin_email="$WP_ADMIN_EMAIL" \
# --skip-email
# wp option update blogdescription "$WP_SITE_DESCRIPTION"
# wp theme delete twentysixteen twentyseventeen twentynineteen
# wp user update admin --user_pass=123
# wp plugin delete akismet hello
# wp plugin install --activate --force \
# advanced-custom-fields \
# jwt-authentication-for-wp-rest-api \
# /var/www/plugins/*.zip
# wp import /var/www/content.wordpress.xml --authors=skip
wp theme activate "jr"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment