Skip to content

Instantly share code, notes, and snippets.

@mgratch
Last active August 3, 2018 20:48
Show Gist options
  • Save mgratch/c72a13788f83428c34cb479ec3ee723d to your computer and use it in GitHub Desktop.
Save mgratch/c72a13788f83428c34cb479ec3ee723d to your computer and use it in GitHub Desktop.
insert db that is split into multiple tables. Using a for loop and wp-cli. This will work for parts to but you might need to run to ensure all tables are successfully created.
// insert db that is split into multiple parts
for f in /sql/*.sql; \
do wp db import $f; \
done; \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment