Skip to content

Instantly share code, notes, and snippets.

@abaicus
Last active October 11, 2019 13:37
Show Gist options
  • Save abaicus/730f98b4addc6116cc9c9cb755fbff22 to your computer and use it in GitHub Desktop.
Save abaicus/730f98b4addc6116cc9c9cb755fbff22 to your computer and use it in GitHub Desktop.
Starter sites import
#!/usr/bin/env bash
# Delete all network sites.
wp site list --field=blog_id --allow-root | xargs -I % wp site delete % --yes --allow-root
wp plugin activate neve-pro-addon --network --allow-root;
# Create all onboarding sites and switch theme.
wp themeisle-si list --field=slug --allow-root | xargs -n1 -I % wp site create --slug=% --allow-root
wp site list --field=url --allow-root | xargs -n1 -I % wp --url=% theme activate neve --allow-root
export DEMO_SLUGS=$(wp themeisle-si list --field=slug --allow-root);
for SLUG in $DEMO_SLUGS
do
echo $SLUG
wp site list --field=url --allow-root | grep "${SLUG}/" | xargs -n1 -I % -- sh -c "wp --url=% themeisle-si import ${SLUG} --allow-root && wp --url=% elementor flush_css --allow-root"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment