Site Clone - A Terminus plugin that adds command(s) to facilitate cloning sites on Pantheon.
Installs: 23 000
Open Issues: 15
This package is auto-updated.
Last update: 2023-06-09 13:30:12 UTC
Site Clone - A Terminus plugin that adds the
site:clone command to facilitate cloning sites on Pantheon.
While this script has worked well for us your mileage may vary due to local machine configuration. If you are having issues with running this plugin locally try using this Dockerfile, which has all the tools needed pre installed.
Installing via Terminus 3
terminus self:plugin:install pantheon-systems/terminus-site-clone-plugin
Installing with Composer (deprecated method using Terminus 2)
composer -n create-project pantheon-systems/terminus-site-clone-plugin:^2 ~/.terminus/plugins/terminus-site-clone-plugin
Clone this project into your Terminus plugins directory found at
$HOME/.terminus/plugins. If the
$HOME/.terminus/plugins directory does not exists you can safely create it. You will also need to run
composer install in the plugin directory after cloning it. See installing Terminus plugin for details.
- git command line
terminus site:clone <source>.<env> <destination>.<env> where
<destination> are site UUID or machine name and
<env> is a valid environment (dev or multidev).
Code cannot be cloned to or from test and live environments as work must go through the Pantheon workflow. You can, however, use
--no-code to clone the files and database to or from a test or live environment. Note that if you use
--no-code, the PHP version won't be set to the one from the site you are cloning from.
You can also pass the argument(s)
--no-code to skip cloning one or more items. You cannot, however, skip all three as there would be nothing left to clone.
By default, backups are made on both the source and destination environment before cloning. Use
--no-destination-backup to omit one of both backups.
- Files and database backups over 500MBs will not work** due to Pantheon import file size limits. If your files or database are over 500MB they will need to be manually migrated.
- If you pass the
--no-source-backupflag, the system will use the last taken backup as the source database.
- Add support for Terminus
- Remove support for Terminus
- Separate options for backing up source and destination
git clone --single-branchto avoid downloading unnecessary history
- Initial release