Forum Moderators: phranque
What I do is, I always have a mirror version of the site hosted at dev.domainname.com, where I make changes to first. Once I'm satisfied with the changes, I upload the new files to the domainname.com folder, preferably at a time when traffic is at its lowest.
Is there a better way to do this? What seems to be great about wordpress if you use that as a CMS is that you can just upload the updates as a new template and using the "presentation" function, point the site to the new template files once they're all uploaded. This way, the change is instantaneous, and if there is something wrong, you can just switch it back to the old template.
the other questions you asked depend on how much traffic your site gets. It all depends, I usually do things like template and database updates live once I have tested them on my local machine. At very worst, there may be a glitch to a tiny handful of users during the 15 seconds or so it takes to upload the changes.
It all depends on how the site is made, if it's big, I just update one section at a time.
I'd say as a very rough guess, once a site gets more than say 5000 visitors a day, you probably want to get the update down to as fast as humanly possible, but below that, if you do it at night, during slow times, only a handful of people would ever register the change, or see a bad page load, and then they'd just refresh and never know what happened.
But run working versions of your site locally, it's the key. You can always do a mysqldump to update your local site before and after the changes, it's easy to do, fast too. If you're using access... well, you shouldn't be using access to make a website that's real, but if you are, it's just copying a standard file.
I'd turn the question around: why not have a perfect working copy of your website on your development computer? it's not hard to install apache/php/mysql ir IIS/asp etc on your box, takes a few hours, you only need to do it once for the life of the box, so why not do it and never think about it again?
If someone takes down one of my sites I really don't care that much, I back up the dbs daily, so it's just a matter of uploading the files from my local machine, uploading the db, recreating it, and that's about it. And that's a very worst case scenario, realistically that's very unlikely to happen in the first place.
It's not really a mirror in the technical sense, it's just a full working copy, the base copy that is. it depends on how big the site is though, how many people work on it, lots of variables would determine this decision. Working on a live remote mirror would be my last choice in that scenario though, why bother, what's the point? Unless you use a bad hoster that is going to go down often enough to warrant the need for a true mirror, but then why not just use a real hoster?