This repository contains a script to synchronize WordPress databases between local and remote environments using wp-cli. It serves as an alternative to the broken functionality of WordMove's database push/pull feature and works alongside WordMove's Movefile.
For more information on WordMove, visit the WordMove repository.
- wp-cli: Ensure
wp-cliis installed and properly configured on both local and remote environments. - SSH Key-based Authentication: The script requires SSH key-based authentication for secure connections. Password logins are not supported.
To install the wp-dbsync script, run the following command:
sudo ./installer.shAfter installation, you can use the wp-dbsync command as follows:
wp-dbsync {push|pull} {environment_name}{push|pull}: Specify whether you want to push to or pull from the environment.{environment_name}: The name of the environment (must be defined in the Movefile and not belocal).
wp-dbsync pull stagingThis project is licensed under the MIT License.