Skip to content

Instantly share code, notes, and snippets.

@rorymcdaniel rorymcdaniel/.bashrc
Created Apr 26, 2017

Embed
What would you like to do?
Sync a remote WordPress database with local
# 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
You can’t perform that action at this time.