MODX Cloud Snapshots make it possible for you or your clients to make changes to their MODX Revolution websites out of the public eye on a separate Cloud. This Cloud is often called a staging site; where you stage changes, get sign-off from stakeholders and then push the approved changes to the live site (aka the production site).
A staging-to-production workflow in Cloud works well with sites that do not have frequent daily changes such as a blog or user submitted content.
In the staging-to-production workflow, the live/production site becomes off-limits to changes. If you make changes on the live site and then inject a Snapshot into it, those changes of content or elements will be overwritten. That said, there are always backups you can restore.
Setting Up The Staging Cloud
Before you can have a staging-to-production workflow you'll need to create the staging site.
- Login to the MODX Cloud Dashboard
- From the list of Clouds on the Clouds page, locate the Cloud you wish to create a staging site for
- Click on the name of the Cloud in order to go to the Cloud edit page.
- On the Cloud edit page, click Create Snapshot from the right hand side of the page
- In the window that pops up, Select the Complete Snapshot template, choose a category, then, give the Snapshot a good name, such as, "Live Site for Staging," and click Extract Snapshot from Cloud
- Once the Snapshot, you'll receive an email notification
- Upon notification, go to the Snapshots page by clicking Snapshots at the top of the Dashboard
- Find the Snapshot you named in step 5 and below the name, find and click the link, Create New Cloud from Snapshot
- You'll receive an email to let you know the new Cloud has been completed and you can now start using this Cloud for making changes.
It's a good idea to turn off search indexing for your staging site. This can be accomplished by using the robots.txt file as outlined in this guide.
Pushing Changes from Staging to Live (aka Production)
Once you've made your website changes and have sign-off from your stakeholders, you're ready to send your changes to the live site.
Both your development and live sites need to be on the same version of Revo. You cannot inject a 2.5.0 install into a 2.3.6 etc. If you have differing versions, you'll need to upgrade one or the other to match.
- Login to the MODX Cloud Dashboard
- From the list of Clouds, select the Develop/Staging Cloud you created in the first section of this page and click on its name
- From the right hand side of the Cloud edit page click on Create Snapshot
- From the window that opens up, select the Promote Snapshot, give it a name and click Extract Snapshot from Cloud
- Once you receive notification by email that the Snapshot has completed, at the top of the page, click on Snapshots.
- Locate the Snapshot you made in Step 4
- Click the link below the name that says Inject Snapshot… into Cloud
- From the window that pops up, find and select the name of the live site as the Cloud to inject the Snapshot into and click Inject into Cloud
- Await notification that he injection has completed. It should only take a couple minutes and then the changes should appear on the live site.