Question

On http://www.slideshare.net/eljefe/automated-deployment-with-phing in slide 15 they are talking about "locking the live site" when doing deployment.

We are running multiple webshops in a SAAS application where it is possible that users are adding products, buying products and paying for products online, and so on...

When deploying we want to do this as clean as possible, so that not payments or orders or other critical data will be lost.

We have a deployment scenario set up using phing (amazing tool!) but we are missing one crucial step being the "locking of the live site" while deploying.

What is a possible way to lock a live site and bring it back online after deploying?

Was it helpful?

Solution

You could create a task that creates (or deploys) a maintenance page (HTML) and the accompanying .htaccess file to redirect all requests to it. Then do the rest of your deployment. Finally replace the .htaccess file with the regular version and you are done.

This is a nice example in the book Expert PHP 5 tools from packt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top