Updating sites without interruption

Hello,

I am wondering what is the best method to update a php intense site without interrupting service to customers.

I manage a site that does a small amount of selling. When I’m fiddling around with scripts and debugging these php/MySQL pages, I would rather not do it on the “live” site. I’m not really into the “Sorry, our site is unavailable from 2 pm PST to 8 pm PST” method either… Any suggestions? Setting up mirrors? Copying to another domain?

I would work on my offline stuff, but my php and mysql require me to be online… Don’t they?

Suggestions would be very much appreciated.

You could setup PHP & MySQL locally. Work off that then push the changes live when they’re good to go.

A better idea might be to setup a second site as a development site. Make your changes there, then copy them over when you’re ready. You may want to use CVS, subversion or similar code management system.

There are countless ways of doing this. The key is to stop mucking around on the production site, you’ll come to sticky grief one day! :slight_smile:

I run a dev site on my pc and then upload at a quiet time

For customer review, I setup a development version of the site and database

e.g. http://dev.yoursite.com/ and dev_db.yoursite.com,

a release then could be as simple as cp -r /dev…/ /prod…/ (of course, you may not want to over write config files or that sort of thing, so you’ll have to keep that in mind)

Symlinks are also a possiblity, although i haven’t tried that on dreamhost.

have your document root as a symlink to a real directory. Release your test code to another directory - test and then change the symlink for the prod site.