Skip to content

Installation

Jelle Siderius edited this page Nov 12, 2025 · 16 revisions

Requirements

Optional requirements

  • WP CLI when using WordPress databases

Installing mage-db-sync

New Installation (Recommended)

Install directly from npm:

npm install -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:

  1. Clone the repository:

    git clone https://github.com/jellesiderius/mage-db-sync.git
    cd mage-db-sync
  2. 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

Clone this wiki locally