PHPackages                             jorisnoo/craft-remote-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jorisnoo/craft-remote-sync

ActiveLibrary[Database &amp; ORM](/categories/database)

jorisnoo/craft-remote-sync
==========================

Sync databases and storage files between remote and local Craft CMS environments

1.2.1(1mo ago)1213↑21.4%[1 PRs](https://github.com/jorisnoo/craft-remote-sync/pulls)MITPHPPHP ^8.1CI passing

Since Feb 28Pushed 1mo agoCompare

[ Source](https://github.com/jorisnoo/craft-remote-sync)[ Packagist](https://packagist.org/packages/jorisnoo/craft-remote-sync)[ RSS](/packages/jorisnoo-craft-remote-sync/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (8)Versions (9)Used By (0)

Remote Sync for Craft CMS
=========================

[](#remote-sync-for-craft-cms)

A Craft CMS module that syncs databases and storage files between remote and local environments over SSH/rsync.

[![Craft CMS 5](https://camo.githubusercontent.com/646aa7bbfe6207419071b2c149215078937a9efb85e8941a3d23f5c6a9154534/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e782d6535343232622e737667)](https://camo.githubusercontent.com/646aa7bbfe6207419071b2c149215078937a9efb85e8941a3d23f5c6a9154534/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e782d6535343232622e737667)[![PHP 8.2+](https://camo.githubusercontent.com/2aa5b7a42b0b1e753e89bde4c29254180e3cfc88c6f7a99f05d0e52213a71148/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737376262332e737667)](https://camo.githubusercontent.com/2aa5b7a42b0b1e753e89bde4c29254180e3cfc88c6f7a99f05d0e52213a71148/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737376262332e737667)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)

---

Features
--------

[](#features)

- Pull a remote database to your local environment with a single command
- Push your local database to a remote environment
- Sync storage subdirectories (uploads, rebrand, etc.) via rsync
- Interactive CLI with dry-run preview before any destructive operation
- Automatic safety backups before overwriting either environment's database
- Support for multiple named remotes (production, staging, etc.)
- Atomic deployment support (`current/` symlink pattern)
- Push protection — remotes are push-disabled by default

---

Requirements
------------

[](#requirements)

VersionCraft CMS5.xPHP8.2+Server tools`ssh`, `rsync`, `mysqldump` / `pg_dump` on both local and remote---

Installation
------------

[](#installation)

```
composer require jorisnoo/craft-remote-sync
```

Then add it to your `config/app.php`:

```
return [
    'modules' => [
        'remote-sync' => \Noo\CraftRemoteSync\Module::class,
    ],
    'bootstrap' => ['remote-sync'],
];
```

The `bootstrap` entry is required so the module registers its console controllers on every request.

---

Configuration
-------------

[](#configuration)

Publish the config file to your Craft project:

```
cp vendor/jorisnoo/craft-remote-sync/src/config.php config/remote-sync.php
```

Example `config/remote-sync.php`:

```
