Skip to content

php-sync-toolDatabase & File Synchronization for PHP

Sync MySQL, MariaDB or PostgreSQL databases and files between systems over SSH/rsync/SFTP — with automatic framework credential detection

php-sync-tool

Quick Example ​

bash
# Install via Composer
composer require konradmichalik/php-sync-tool

# Sync a database from production to local using a config file
bin/sync-tool -f config.yaml

Supported Frameworks ​

Point path at a framework's config file and credentials are detected automatically:

FrameworkVersionConfig File
TYPO37.6 – 12.xLocalConfiguration.php / AdditionalConfiguration.php or .env
TYPO3≥ 13config/system/settings.php / additional.php or .env
Symfony≥ 3.4.env (DATABASE_URL)
Symfony≤ 2.8parameters.yml
Drupal≥ 8.0settings.php (via drush)
WordPress≥ 5.0wp-config.php
Laravel≥ 4.0.env

About This Project ​

php-sync-tool exists so that copying a database between environments is a one-line command that runs on the PHP already installed on your build and deploy hosts. It integrates with Composer-based projects, reads credentials straight out of your framework's configuration, and refuses to overwrite a target you did not mean to touch.

It succeeds the Python db-sync-tool by the same author. Existing config files keep working: Coming from db-sync-tool covers the move.

Released under the GPL-3.0-or-later License.