Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
Forked from stevenkword/wp-cli-batch-import.sh
Created January 18, 2016 06:42
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 BronsonQuick/71fb10d98eb1b4b4987f to your computer and use it in GitHub Desktop.
Save BronsonQuick/71fb10d98eb1b4b4987f to your computer and use it in GitHub Desktop.
# Activate the wordpress importer
wp plugin activate wordpress-importer --url=http://localhost/example.com/
# Iterate over all of the import files in a given folder.
for f in myfolder/*.xml; do wp import $f --authors=skip --skip=attachment --url=localhost/example.com/; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment