This sync script is a Bash script, not a WordPress plugin, and is compatible with Bedrock-based WordPress installs.
Avoid the need for a WordPress plugin that handles database and media library migrations/synchronization by using WP-CLI aliases and
Sync in any direction:
- Development to staging
- Development to production
- Staging to development
- Production to development
- Staging to production
- Production to staging
WP-CLI performs a
search-replace during the sync to make sure that your domain always matches the correct environment.
Optionally turn on a Slack notification when the sync direction is up or horizontal.
This script must be manually configured to fit your environment setup before it can properly work. Instructions are included, and the initial config should take just a few minutes and you won’t have to touch it again.
- Bedrock-based WordPress install
- Working local development setup ( Windows is supported in WSL)
- Deployed and installed remote environments
Place the sync script in a directory called
$ ./sync.sh production development 🔄 Would you really like to ⚠️ reset the development database (https://example.test) and sync down from production (https://example.com)? [y/N] ✅ Able to connect to production ✅ Able to connect to development 🔄 Sync from production to development complete.
Unable to connect to development
Make sure that your local development setup is up and running.
Unable to connect to production or staging
Make sure that you’re able to successfully connect with a SSH connection with the same details configured for the same WP-CLI alias.
If your SSH connection doesn’t fail, make sure WordPress is first already installed.