How to update a website without showing 'under construction' or down time

Quick look at how to update your website without the site becoming unavailable or showing 'under construction' messages.

Published in Web Development on Monday, October 15, 2007 by Ben Vallack
0 comments

RSS Print Email to a friend

Ok so you might have noticed we've had a bit of an overhaul. Actually, behind the scenes, the overhaul is pretty significant. I've totally rebuilt the whole thing, it now uses Smarty, a long overdue change.

Anyway, as its so different in its layout to the old site I couldn't just update the old files with new files. I'm sure this is a common problem and others must scratch their heads at least a little bit when thinking about updating their sites. I found myself wondering, if Google started crawling my site and seeing an 'under construction' message, would it hurt my page rank? And of course there's the visitors to think about, its not exactly very user friendly is it, taking all your content offline for however long it takes to update the site (Quite a while considering I have to re-upload all the panoramas from the Dartmoor Panoramic Photography page).

I considered the possibility of using some sort of temporary redirect to point to my development server while I update the live server, but didn't really want the development server address getting around. Instead it occurred to me, after some time spent seeing if anyone else had this problem, to just move the old site into one folder on my server. Then I added an htaccess RewriteRule to send all links into that folder (without changing the address shown in the browser), effectively making that folder the new public root. The line to add in the .htaccess file is this:
RewriteRule ^(.*)$ /TEMPOLD/$1
That takes whatever comes after the domain section and adds /TEMPOLD/ (my new temporary folder) before it.

This change can be done seamlessly without any interruption just by overwriting the root .htaccess file once all your files are in the temporary folder. Once that is working you can then delete all files (apart from the .htaccess file and your temporary folder) from the server. Now you have an almost empty server to upload your new files to, and all the while your site is carrying on as normal. Once you've uploaded your new files just delete the .htaccess file (or replace it with one for your new site) and in an instant your new site will be live and complete. To complete the transition just remove your temporary folder, you might want to back it up though.

About the author

Ben Vallack is Creative Director at Phototropic Productions. His many roles include web design, photography, camera operating and editing.

Comments

Notebook

Products

Landscape Leaps

Enjoy the view from 96 stunning interactive 360º panoramic images and leap from one location to another. Learn more

Swiftlet

Swiftlets are a kind of Bookmarklet. Once clicked, they email the address of the page you're currently looking at to a person you choose.
Get Started

Platypus

Platypus is a fast, lightweight, 'web 2' application that makes timing tasks and creating invoices effortless. Features zero learning curve interface with live editing.
Get Started

Services

We create no-frills, usable websites. Accessibility and content reign supreme. Search engine optimization goes hand in hand with this philosophy and, as Jen Bryant discovered, a Phototropic Productions CSS website rebuild can get you to number 1 on Google. Learn More

By using a small High Definition video camera we can be very flexible as well as discrete. Virtues that many production companies loose in their efforts to 'appear professional' by using bigger cameras where they aren't always necessary. Learn More

Our background in fine art means we can take high quality photographs in a variety of situations. Whether you need some pictures on a white backgrounds of a product line-up or are after a family portrait, our photographs will leave a lasting impression.
Learn More

As with websites, DVDs need to be accessible and usable. The creative freedom allowed by both can be easily over-used. We know where to stop and allow the content to do its work. Our DVD Authoring services can include any of the features the DVD format supports as well as high definition Blu-Ray encoding. Learn More

Advertisement