Created
April 26, 2017 20:08
-
-
Save rorymcdaniel/5c05f042b3370d49cf1d78502367d85e to your computer and use it in GitHub Desktop.
Sync a remote WordPress database with local
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
# this assumes you have a WP CLI alias set up for your production environment already | |
# https://roots.io/leveraging-wp-cli-aliases-in-your-wordpress-development-workflow/ | |
# Just add this to your ~/.bashrc for unix or ~/.bash_profile for Mac | |
alias syncwpdb='wp @production db dump - > production.sql && wp db reset --yes && wp db import production.sql && rm production.sql' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment