Cloning Sites
Cloning a site copies its content, files, and settings. The theme and plugin functionality is assigned, but separate, to a site’s content.
Migration Tool
Designers & Developers can clone a production server site to their development sandbox using the migration tool in their sandbox admin.
Access the migration tool by visiting your sandbox admin [root URL] and selecting “Clone Site” under the Sites tab.
Example: https://YOUR-SANDBOX.cms-devl.bu.edu/wp-admin/network/sites.php?page=bu-clone-site
Because the clone tool doesn’t do it…
Sandbox sites MUST ALWAYS have WordPress Reading settings SET TO UNLISTED to prevent search engines from indexing them.
How the Clone Tool Works
- Only two clones can run at a time – the rest will show as pending, and can’t be canceled. Please do not run large clones at the beginning of the workday, or more than two clones at a time, to avoid clogging up the clone tool for everyone.
- Content can always be cloned FROM live, but never TO live. For example, in Production > Staging > Sandbox, you can clone from production to staging, staging to a sandbox, or production to a sandbox. But you can never clone your sandbox back up to production or staging.
- You can clone from sandbox to sandbox. For example, you can clone from your sandbox to id-presents, because they are both sandboxes. But you cannot clone id-presents to staging because it is going TO live, not FROM live.
- Cloning a site only clones content, not theme or plugin files. To get an exact copy of a website, you should clone first, and then update your sandbox by uploading the latest version of the theme or plugin. You can do this by uploading files through SFTP. If you need to update many themes or plugins, or are very behind because you haven’t worked on code in a few months, you can also request a deploy to your sandbox.
The only exception to this rule is launching a site, which moves content from Staging to Production (but that’s not a clone; that’s a launch).
Any member of ID and IS&T, as well as their vendor partners, has the ability to clone a site down to their sandbox to make and view theme and plugin adjustments.
However, before cloning a site down to a shared sandbox, such as id-presents, check to see if there is a copy already up, and check with the team in Slack to make sure no one else has been working on the site recently, as all changes will be overwritten upon cloning.
Clone Tool Instructions
To clone to a sandbox, such as id-presents:
- In your sandbox’s WordPress Admin: visit Sites > Clone Site
(The URL will be something along the lines ofhttps://id-presents.cms-devl.bu.edu/wp-admin/network/sites.php?page=bu-clone-site. Replace the bolded portion of this URL with your sandbox name.) - Enter the full URL of the live site you would like to clone down, e.g.,
http://www.bu.edu/interactive-design - The destination URL on your sandbox will automatically populate in the next field.
- If a site already exists there, it will display a warning. In that case, you will also need to check the “Force clone to execute” box.
In most cases, you’ll want to leave the “Remove existing users” box checked. - Click “Clone Site”
- Upon submitting, you will be given the option to monitor the status of the clone. You can also find this by going to Jobs Monitor in the WordPress network admin for your sandbox. The status will show as “Complete” when the clone process is finished.
Advanced Topics
Skipping rsync
There is a new option available in the deploy tool under the SHOW ADVANCED OPTIONS section of the clone tool, `Skip rsync of media library.` This option will skip rsync of the media library from the source URL to the destination URL. This is needed for the Homepage and will be useful for other sites like Law, where an updated clone is needed for development but the media library is not needed.
If you choose this option, you are required to understand the rsync process and manually rsync the media library as needed.
BU Homepage
With the launch of One Editorial for the BU Homepage, the standard cloning process no longer works.
The skip rsync option was added so the clone of the Homepage would complete.
At the time of writing this, the Homepage clone takes 1.25 hours without the rsync.
Rsync of the files needs to be completed manually.