Installation - jellesiderius/mage-db-sync GitHub Wiki
Requirements
Optional requirements
- WP CLI when using WordPress databases
Installing mage-db-sync
New Installation (Recommended)
Install directly from npm:
npm i -g mage-db-sync@latest
After installation, the tool will automatically:
- Create
~/.mage-db-sync/config/directory - Generate sample configuration files in
~/.mage-db-sync/config/
Manual Installation (For Development)
If you want to develop or customize the tool:
-
Clone the repository:
git clone https://github.com/jellesiderius/mage-db-sync.git cd mage-db-sync -
Install as a global package:
npm install -g
Configuration
After installation, you'll find sample configuration files in ~/.mage-db-sync/config/:
1. Configure Settings
Edit ~/.mage-db-sync/config/settings.json:
# General settings for mage-db-sync
vi ~/.mage-db-sync/config/settings.json
2. Configure Databases
Edit the database configuration files:
# For staging databases
vi ~/.mage-db-sync/config/databases/staging.json
# For production databases
vi ~/.mage-db-sync/config/databases/production.json