Skip to content

Instantly share code, notes, and snippets.

@davekellam
Created October 8, 2013 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davekellam/6892838 to your computer and use it in GitHub Desktop.
Save davekellam/6892838 to your computer and use it in GitHub Desktop.
Bash script for batch importing of WordPress XML files via WP-CLI
#!/bin/bash
FILES=/path/to/files/*
for file in $FILES
do
echo "Processing $file..."
wp import $file --authors=skip
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment