Trellis Database and Uploads Folder Synchronisation scripts and example WP CLI Aliases
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts Add -L switch Jan 21, 2018
LICENSE Update LICENSE Jun 13, 2017
composer.json Trellis based tool so MIT Jun 13, 2017 Fix database export on sync-db scripts Aug 24, 2017
wp-cli.yml Rename wp-cli.yaml to wp-cli.yml May 23, 2017

Trellis Sync

This is a repository for the Trellis Database and Uploads Folder Synchronisation scripts and WP CLI Aliases. Two scripts have been added here. The database backup script or to synch the production database with the one on the local server and to synchronize both the database and uploads folder.

File location and changes

Make sure you change the domain in both the shell script and your wp-cli.yaml files. For using the script it should be placed in the Wordpress root. For using the it is setup to be run from site/scripts/. Or at least it is setup from a subdirectory inside your WordPress root or site folder.

Database Sync (Production -> Dev)

The Database sync script and aliases setup has been created by Raquelle. See Roots Blog post. It is set up to sync the database from production and update the one on development or on the local server.

Sync All

The Sync All script which can be used to synchronize the uploads folder and database has been created by Ben Word and thread post where he added can be found at Roots Discourse . It will work for synching to and from production to local and to and from staging to local. It is located in the scripts folder, but will work from any sub directory in your WordPress root which often tends to be site witha standard Trellis setup with Bedrock.


Installation can be done using composer require trellis-sync/trellis-sync. This is still not fully tested so do make a backup first!