Forum Moderators: phranque

Message Too Old, No Replies

Best practice for pushing site updates live

         

sodani

10:43 pm on Jan 26, 2006 (gmt 0)

10+ Year Member



I'm not an experienced webmaster, but I have my own way of making site updates and I'd like to see what other people do or if anyone has a list of best practices.

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.

2by4

11:07 pm on Jan 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Always run your site on your own local development server, running on the computer you use normally. Except for database changes, that site should be an exact mirror of the live site.

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.

sodani

12:01 am on Jan 27, 2006 (gmt 0)

10+ Year Member



But why use a mirror on a local server, and not a live, unlisted subdomain?

2by4

1:20 am on Jan 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Because you don't have to deal with ftp or anything when you work on the site, programming is way easier to do when you're working on the thing locally, debugging is easier, it's all easier.

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?

sodani

5:30 pm on Jan 30, 2006 (gmt 0)

10+ Year Member



Cool. Thanks for your feedback!