Last active
August 12, 2019 19:37
-
-
Save larscmagnusson/da9f998e5f03d07ff8ef3806698ffd40 to your computer and use it in GitHub Desktop.
wp cli -- db export/import encrypted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#export | |
wp db export - | openssl smime --encrypt --text --binary --aes256 --outform DER --out database.sql.enc PATH_TO_PUBLIC_KEY | |
#import | |
openssl smime --decrypt --in database.sql.enc --binary --inform DER --inkey PATH_TO_PRIVATE_KEY | wp db import - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment