ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Upgrading with Less Downtime

June 22, 2007 10:24pm

Subscribe [9]
  • #1 / Jun 22, 2007 10:24pm

    Vik

    209 posts

    In this forum post from January, RonnieMc discussed a way to upgrade with less downtime. Here’s a slight variation on that that I just tried, and it seems to have worked correctly.

    (All my EE files are in a folder on my web host called exp.)

    - Downloaded latest version of EE
    - Backed up my database
    - Copied latest EE files into a new folder on my web host, called exp_new
    - Copied path.php and system/config.php from exp to exp_new
    - Copied the extensions, language, modules, and plugins that I had installed, from exp to exp_new
    - Verified file permissions

    - Only then did I take my site offline

    - Renamed exp to exp_old
    - Renamed exp_new to exp
    - Ran update.php
    - Copied all images I’d uploaded, from exp_old to exp
    - Put the site back online
    - Verified that the site was working properly
    - Deleted update.php and the update directory
    - Deleted install.php

    (You’ve got to be careful not to run “install.php”, because if I remember correctly, that initializes - i.e. wipes out - your database.)

    I was holding my breath, but everything seems to be working fine on the updated site. And it’s a big benefit to have the site down for only 5 minutes, instead of 20.

    Now to check out the cool new features of 1.6!

  • #2 / Jun 22, 2007 11:18pm

    Ryan M.

    1511 posts

    Thanks for sharing your method. I haven’t done enough upgrades yet to really have it down to a science, but posts like this help.

  • #3 / Jun 22, 2007 11:21pm

    Lisa Wess

    20502 posts

    I would just like to add to this that at some point during this process (preferably right before making it live) that you clear out your caches.  Many tech support posts can be avoided by that simple step. =)  Do so via the Admin Utility especially if you use relationships -but make sure they were removed from the filesystem. =)

  • #4 / Jun 23, 2007 12:53am

    Ingmar

    29245 posts

    - Only then did I take my site offline

    You could’ve copied the images before that step, too. Then I rename “system” to “system_old” and “system_new” to “system” and run update.php. Takes all of 30 seconds.

    (You’ve got to be careful not to run “install.php”, because if I remember correctly, that initializes - i.e. wipes out - your database.)

    Not any more, actually, since 1.6 😊

  • #5 / Jun 23, 2007 1:07pm

    Vik

    209 posts

    Thanks for the great advice, Lisa and Ingmar. For easy reference if anyone is reading this thread and wants to try it out, here are the updated steps, with Lisa and Ingmar’s advice included:

    (All my EE files are in a folder on my web host called exp.)

    - Download the latest version of EE
    - Back up the database
    - Copy the latest EE files into a new folder on the web host, called exp_new
    - Copy path.php and system/config.php from exp to exp_new
    - Copy the extensions, language, modules, and plugins that I had installed, from exp to exp_new
    - Copy all images I’d uploaded, from exp to exp_new
    - Verify file permissions

    - Take site offline

    - Rename exp to exp_old
    - Rename exp_new to exp
    - Run update.php
    - Put the site back online
    - Log into the control panel and clear out your caches using the Admin Utility at CP Home ›  Admin ›  Utilities ›  Clear Cached Data.
    - Verify that the site is working properly
    - Delete update.php and the update directory
    - Delete install.php

  • #6 / Jun 23, 2007 10:26pm

    Ryan M.

    1511 posts

    - Copy path.php and system/config.php from exp to exp_new
    - Copy the extensions, language, modules, and plugins that I had installed, from exp to exp_new
    - Copy all images I’d uploaded, from exp to exp_new

    What is the easiest method of doing this? What method do you use? Right now, I’m opening two windows in Transmit (mac FTP program) and grabbing files from the one to put in the other. This is less than ideal as lately Transmit has been very flaky and loves to hang. It’s taking forever to do what should take a few minutes.

    Ideally I’d have ‘exp’ and ‘exp_new’ open at the same time, left/right, and then just synchronize the necessary folders. I’m not seeing how I can open two remote folders side-by-side in Transmit (I’m also not sure you’re on a mac, for that matter…) Just looking for a better way to synchronize Plugins, Language, etc.

  • #7 / Jun 23, 2007 10:43pm

    Vik

    209 posts

    I’m on a Mac. I use Fetch. I had two windows open, one showing exp and one showing exp_new. It worked very well. You can control-click and use Fetch’s “clone window” command to quickly open a new window for your site.

  • #8 / Jun 24, 2007 11:10am

    Ingmar

    29245 posts

    What is the easiest method of doing this? What method do you use? Right now, I’m opening two windows in Transmit (mac FTP program) and grabbing files from the one to put in the other. This is less than ideal as lately Transmit has been very flaky and loves to hang. It’s taking forever to do what should take a few minutes.

    I prefer to do this on the server, using the commandline: upload the .zip, unzip, cp & mv as needed. I like the command line, but I realise this is not for everybody.

  • #9 / Jun 24, 2007 1:00pm

    Ryan M.

    1511 posts

    @Ingmar: I think I might do some of this via command line. It’s certainly the easiest way to get files to and from my machine using scp (or cp) etc. I put up a wiki on my new ee site (almost ready to take over my existing WP install…) where I’m keeping notes for myself on these processes, and I’m constantly revising them, based on things I’m finding in threads like these.

    @Vik: That works much the same way as Transmit, but I think I might just drop Transmit (trendy as it is to use the Panic guys’ stuff with Coda and everything) for Cyberduck, which seemed to do a much better and quicker job without stalling, or “unexpectedly closing”.

    Also, there is a nice little app for mac called Fugu that puts a GUI on SSH and scp actions.

  • #10 / Jun 24, 2007 7:41pm

    Vik

    209 posts

    I prefer to do this on the server, using the commandline: upload the .zip, unzip, cp & mv as needed. I like the command line, but I realise this is not for everybody.

    Does this require SSH (is that the right acronym?) access? I have to check to see if my web host, HostingMatters, provides this sort of access.

  • #11 / Jun 25, 2007 3:36am

    Ingmar

    29245 posts

    Yes it does. And a certain familiarity with the command line, may I add 😊

  • #12 / Jun 27, 2007 7:48pm

    narration

    773 posts

    Hi Vik,

    I have a further item to add to your excellent checklist.  Found out the hard way, of course - did the latest build upgrade, and worked fine, which fooled me - until I got to static pages.

    I suspect this should go right after Copy path.php etc. so it is not forgotten, as it might be after the more complicated updates.

    - Copy .htaccess from exp to exp_new, if you are using an .htacess.

    I by the way support the command line method Ingmar mentions—if you have as some of us fingers that never forget the ways of shell 😉.  So many years ago.

    Regards,
    Clive

    Thanks for the great advice, Lisa and Ingmar. For easy reference if anyone is reading this thread and wants to try it out, here are the updated steps, with Lisa and Ingmar’s advice included:

    (All my EE files are in a folder on my web host called exp.)

    - Download the latest version of EE
    - Back up the database
    - Copy the latest EE files into a new folder on the web host, called exp_new
    - Copy path.php and system/config.php from exp to exp_new
    - Copy the extensions, language, modules, and plugins that I had installed, from exp to exp_new
    - Copy all images I’d uploaded, from exp to exp_new
    - Verify file permissions

    - Take site offline

    - Rename exp to exp_old
    - Rename exp_new to exp
    - Run update.php
    - Put the site back online
    - Log into the control panel and clear out your caches using the Admin Utility at CP Home ›  Admin ›  Utilities ›  Clear Cached Data.
    - Verify that the site is working properly
    - Delete update.php and the update directory
    - Delete install.php

  • #13 / Jun 28, 2007 11:20am

    sm9

    352 posts

    What is the easiest method of doing this? What method do you use? Right now, I’m opening two windows in Transmit (mac FTP program) and grabbing files from the one to put in the other. This is less than ideal as lately Transmit has been very flaky and loves to hang. It’s taking forever to do what should take a few minutes.

    I prefer to do this on the server, using the commandline: upload the .zip, unzip, cp & mv as needed. I like the command line, but I realise this is not for everybody.

    I use Transmit for FTP’ing files after they’ve been unzipped on my hard drive, and it can take ages as it uploads all the files one by one. If I uploaded a zip file via FTP, do you know if Transmit can unzip this on the server?  Or else, what software do you use to unzip files on the server as you mention above?

    Thanks,

    Ste

  • #14 / Jun 28, 2007 11:40am

    Ingmar

    29245 posts

    ... what software do you use to unzip files on the server as you mention above?

    Well, it’s aptly named “unzip”, a command line tool installed on just about any server I ever did work on. But yes, CL again.

  • #15 / Jun 30, 2007 4:46am

    Vik

    209 posts

    Good addition, narration.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases