Using Aliases to Sync Databases Across Development Environments

One of the common tasks that web developers run on a regular basis is syncing development sites with a live site to ensure that the data is the same. Using WordPress aliases it is possible to reference a site from the command line that is on a remote server without changing directories. I combined aliases with a few quick WP-CLI commands to create a simple and repeatable way to pull a production database to a local or staging site. These commands can be run one by one, but the simplest method I’ve found is to create a shell script, make … Continued