Atomic Site Deployment

Seamless and safe site deployment with rollback

As mentioned in previous posts, I am using Buddy Works as my deployment tool for THIS site. The default behavior of the deployment pipeline is to update directly to the live site – file by file. This did not sit well with me. What happens if someone tries to access mid-way through the update? And what happens if there is a problem with the site – how quickly could I roll the update back? Hence I wanted to explore the idea of Atomic Site Deployment.

Atomic Site Deployment

Well what do I mean by Atomic Site Deployment? I wanted the ability to update all the required files to the site and then VERY quickly switch to the new site. At the same time I wanted to keep a copy of the previous site that I could switch back to quickly if I needed to.

I managed to achieve both outcomes through a deployment script. This is the process the script takes: