Skip to content

Instantly share code, notes, and snippets.

@timneutkens
Created April 24, 2016 20:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timneutkens/32c9bcd7d8576e663958ed4b1389c1dc to your computer and use it in GitHub Desktop.
Save timneutkens/32c9bcd7d8576e663958ed4b1389c1dc to your computer and use it in GitHub Desktop.
Export / import wordpress database oneliner
# Uses these 2 tools:
# http://wp-cli.org/
# https://github.com/xwp/wp-cli-ssh
# Remote to local
wp ssh db export - --host=production | wp db import -
# Local to remote BEWARE THIS IS DANGEROUS BUT KEPT AS REFERENCE
wp db export - | wp ssh db import - --host=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment