Your Website Just Got a Promotion

Building and maintaining sites correctly is hard. Best practices say you need a separate environment for experimentation, approval and content development to minimize mistakes. But figuring out how to get from Staging to your live Production site is out of reach for most. That is, until today…

By Jay Gilmore  |  Updated: July 7, 2016  |  5 min read
Your Website Just Got a Promotion

Chances are you’ve been there: you quickly make what should be a simple change to a site but you wind up with a mess. You save over the wrong page on accident, break the formatting of your site, or worse, tweak something that winds up taking your site offline. The vast majority of users work on live sites, and most of the times it just works.

Except when it doesn’t.

At best, it’s frustrating and you have to scramble to fix things. Often it can have real monetary or reputation implications.

Some site owners come up with creative ways to keep work in progress out of the public eye, like duplicating pages to start work on new content. There are Extras that allow you to make drafted changes prior to publishing, and others to roll back to changes when things go wrong. These are fine for individual pages, and we use them ourselves. We even used Complete Snapshots in Cloud (see below), but it was not ideal.

When you’re working on many pages for a campaign, or creating a new section for your site, things can get complex and require careful coordination.

The time tested, recommended practice for managing updates to an important website is to use a Staging site. But let’s be honest: in the real world, it’s hard to do things right, especially when you don’t have a technically savvy dev team and sysadmins backing you up around the clock.

The new Promote Snapshot in MODX Cloud allows you to capture the right content, Elements and new system settings, leaving users, and existing system settings alone. This is seriously cool, and lets even completely non-technical teams manage their sites the right way, without having to think about it.

It’s even smart enough to push new settings over, and to leave existing ones alone.

The MODX Cloud marketing site constantly changes, especially the User Guide.

While it is a fairly simple website with a small signup application, we make, preview and test changes in a staging environment and then deploy completed and approved changes to the live site. Doing this one page at a time on the live site simply won’t work.

More importantly, we have different settings on the staging and live sites, so we can test without worrying about dirtying up the data in production. These things include:

  • Analytics Account IDs
  • A test Billing System URL
  • A test Checkout URL
  • Test Users
  • Test CDN zones

Before Promote, we had to go through a cumbersome process. Granted, MODX Cloud Snapshots probably cut the migration time in half, but we knew it could be a lot better. Here are the steps we had to go through to move from the staging server to the live site:

  1. Snapshot the Staging site everyone approved using the Complete Snapshot template. This is a safety net to fall back on if needed, and is in fact needed in the last step of this process. It’s also nice to keep for historical archives.
  2. Find the checklist containing all the caveats and gotchas to look out for. Don’t ask how we came up with the list.
  3. Meticulously change the settings in Staging to match the live site by copy/pasting.
  4. Snapshot the Staging site with the updated settings using the Complete Snapshot Template.
  5. Snapshot the Users from the live site using the Users Snapshot template.
  6. Back up the live site using the Cloud Dashboard.
  7. When the backup is complete, inject the Staging site Snapshot from step 4 into the live site. Hope this goes quickly!
  8. Inject the users from the live site take in step 5 into the newly injected live site.
  9. Test the live site.
  10. Inject the Snapshot from step 1 back to Staging site to reset it and its test data.

After doing this for months, on a good day we managed to get this process down to about 15 minutes, depending on how recently we had last done a push from stage > production. It was not uncommon for this to take 30+ minutes. If you had never done this before it was intimidating, but way better than doing it manually from the command line.

After the Cloud team created the new Promote Snapshot, here are the steps it takes to move our changes to the live site:

  1. Snapshot the Staging site with the Promote Snapshot Template.
  2. Backup the live site (in extremely rare case of an issue—none have happened so far).
  3. Inject the Snapshot from Step 1 into the live site.
  4. There is no step 4 … it’s done!

This process is way faster, taking about 3-4 minutes from start to finish. Since it’s so easy, it makes it so you’re willing to make changes more frequently, and more people can update the site, too, because it’s virtually foolproof.

If you have a website where you should review content or design changes before pushing those updates into production, Promote Snapshots are for you, today. This is especially true when multiple people in an organization have a say in what happens on your website. Standard Promote Snapshots are available to any customer on a current Basic, Pro, Studio or Agency plan.

Customers on legacy plans will need to choose one of the new plans to use Promote Snapshots (there’s also much more coming for the new plans).

If your site has custom data, such as comments or user generated content, the Promote template will copy it all from your staging site and replace it on your production site. This may or may not be the behavior you want, depending on the use case. Customers on Agency or Premium plans can request a custom Promote Snapshot template to fit your site perfectly, as we did for modxcloud.com.

To get started with your own Staging environment, follow the simple steps below:

  1. Take a Snapshot of your live site using the Complete template.
  2. Create a new Cloud from this Snapshot.
  3. Customize settings and users that should differ between Staging and Production.

We hope you’ll find the new Promote Snapshot helps you manage your content in a much more effective manner. Let us know what you think.