Answers.Body: <p>I have been dealing with upgrades a lot lately, and I have the process "down" so that it is very fast.  I am impressed with how fast I can do an upgrade.  The key is shell access - or something that mimics it - because using sftp is very slow.  That might be your problem.  Once I have the data backed up it basically goes like this:</p>
  
  <ul>
  <li>ssh into the server and tar/gz (archive) the existing civicrm directory.  One command, 15 seconds or so.</li>
  <li>upload the new version tar/gz.  This of course will vary greatly by internet connection speed, but generally only a couple of minutes or less.</li>
  <li>delete the existing directory.  This is what's horrendously slow via most sftp programs I've used.  They usually do a recursive delete on each individual file and directory, and since there's a ton of them in CiviCRM it takes forever.  It takes 1 second in the shell.</li>
  <li>Unarchive the new version.  Usually less than a minute.</li>
  <li>run the upgrade script.</li>
  </ul>
  
  <p>Very, very fast.</p>
  
  <p>If you aren't a command line person - I'm not, actually - there are some ways around it.  Our systems all have Webmin installed as a helpful control panel, and it's Filemin file manager deletes directories as quickly as the shell commands do.  I also regularly use Cyberduck for SFTP work, and it has a built in tar function, so I can archive/unarchive just as quickly as from the command line.  So, even though I don't really use the command line I am getting the benefits.</p>
  
  <p>I would add that if you are concerned about security the very LAST thing you would want to do is have excessive writable directories on your server, and most built in upgrade systems require these.  Don't give in.  You can reduce writable directories by not using those systems and save you many troubles down the road.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-26T17:34:10.300Z
Answers.LastActivityDate: 2016-04-26T17:34:10.300Z
Answers.UserDisplayName: Rob Brandt
Answers.Body: <p>The documented upgrade process is long but has to cover every eventuality. I've got it down to 11 steps - 2 of which I don't normally do. I can do an upgrade in about 10-15 minutes, but this depends on my cPanel access which makes most steps very fast.  Do you have cPanel access?  Here are my 11 steps:</p>
  
  <ol>
  <li>Check extensions will work (don't do this if a minor update)</li>
  <li>Logon as Admin</li>
  <li>Backup the database (using phpmyadmin)</li>
  <li>Disable extensions (I don't normally do this, never been a problem)</li>
  <li>Clear Civi cache</li>
  <li>Delete templates.c folder (using cPanel file manager)</li>
  <li>Delete old code           (ditto)</li>
  <li>Upload &amp; unpack new code  (ditto)</li>
  <li>Run upgrade code (/civicrm/upgrade?reset=1)</li>
  <li>Enable extensions (if disabled)</li>
  <li>Test</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-26T17:24:23.420Z
Answers.LastActivityDate: 2016-04-26T17:24:23.420Z
Answers.UserDisplayName: Andy Clark
Answers.Body: <p>I find using Drush to upgrade CiviCRM is very quick. Here are some instructions:
  <a href="https://civicrm.stackexchange.com/questions/4829/is-it-easy-to-upgrade-civicrm-using-drush">Is it easy to upgrade CiviCRM using drush?</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-27T06:21:33.977Z
Answers.LastActivityDate: 2016-04-27T06:21:33.977Z
Answers.LastEditDate: 2017-04-13T12:53:13.167Z
Answers.UserDisplayName: Stuart Parker
Answers.Body: <p>Re: <em>why not to upgrade CiviCRM just like any other Drupal Module</em></p>
  
  <p>CiviCRM can be used with Wordpress or Joomla as well as Drupal, so it cannot rely on Drupal's update mechanism.</p>
  
  <p>Re: <em>deleting all previous civicrm code files is very long, and downloading then unpacking, then transfering the new code files is very time consuming.</em></p>
  
  <p>This is certainly easier if you have shell access to the server.</p>
  
  <p>Re: <em>why : - not to include l10n and sql inside the upgrade ?</em></p>
  
  <p>l10n is I think not included because many installations don't need it and it roughly doubles the size of the download.</p>
  
  <p>Can you clarify what you mean by including sql?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-23T13:33:21.687Z
Answers.Text: Thank you for your quick answser : I had not seen this multiple CMS aspect. What do you mean by "shell access to the server" (I use Filezilla). Does it make any difference, once I have deleted all civicrm code files, if (1) I re-install CiviCRM like a "new" Drupal Module, or if (2) I unpack civicrm-4.7.6.tar.gz on my PC, and then copy its content to the server ? What if I do the same with civicrm-4.7.6-l10n.tar.gz ? (BTW, this file contains 2 folders : l10n and sql).
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-25T09:24:34.517Z
Answers.Text: Shell access is remote command line access to a server, so you can log in over ssh (secure shell) and run commands. This enables you to use a command-line tool such as wget or curl to download the tar files directly onto your server. You can then extract them into a temporary directory and then swap the new code for the old almost instantly. What did you have in mind by re-installing like a "new" Drupal module?
Answers.UserDisplayName: davejenx
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-30T08:38:05.797Z
Answers.Text: thank you davejenx for your answser : About "new" Drupal Module : go to Modules in the Drupal Menu, then click "Install a new Module" : this opens a form which enables you to install your Module from an URL ending with ...tar.gz that you can directly pick from the Module page (https://www.drupal.org/project/...) : quick and easy !
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T12:15:08.647Z
Answers.LastActivityDate: 2016-04-21T12:31:44.957Z
Answers.LastEditDate: 2016-04-21T12:31:44.957Z
Answers.UserDisplayName: davejenx
Answers.Body: <p>Since the OP talks about 'doing this all twice' thought I would mention that using code repo eg git, can mean that the download of new codebase occurs only on dev instance, then git add/commit/push, and on live git pull, then run civi upgrade, via cli if you are happy with that, cvupdb, which isn't quite the same as 'doing this all twice'.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-24T23:59:49.507Z
Answers.LastActivityDate: 2017-06-29T21:23:09.047Z
Answers.LastEditDate: 2017-06-29T21:23:09.047Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>Upgrading CiviCRM is a painful process (18 steps) :</p>
  
  <p>Of course, I admit the necessity to previously backup, put the site offline, disable some Modules, ...</p>
  
  <p>But deleting all previous civicrm code files is very long, and downloading then unpacking, then transfering the new code files is very time consuming.
  ... and we do this twice : one for test, and one for good.</p>
  
  <p>So, why :
  - not to include l10n and sql inside the upgrade ?
  - not to upgrade CiviCRM just like any other Drupal Module, or, at least, reinstall CiviCRM like any Drupal Module (copy-paste the tar.gz URL) ?</p>
  
Tags: <upgrade>
Title: Why is CiviCRM Upgrade so Complex?
ThreadText: # Why is CiviCRM Upgrade so Complex?
  
  (Asked by: username_0 on 2016-04-21)
  
  Upgrading CiviCRM is a painful process (18 steps) :
  
  Of course, I admit the necessity to previously backup, put the site offline, disable some Modules, ...
  
  But deleting all previous civicrm code files is very long, and downloading then unpacking, then transfering the new code files is very time consuming.
  ... and we do this twice : one for test, and one for good.
  
  So, why :
  - not to include l10n and sql inside the upgrade ?
  - not to upgrade CiviCRM just like any other Drupal Module, or, at least, reinstall CiviCRM like any Drupal Module (copy-paste the tar.gz URL) ?
  
  **Tags:** upgrade
  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_1 on 2016-04-26. Score: 7
  
  I have been dealing with upgrades a lot lately, and I have the process "down" so that it is very fast. I am impressed with how fast I can do an upgrade. The key is shell access - or something that mimics it - because using sftp is very slow. That might be your problem. Once I have the data backed up it basically goes like this:
  
  * ssh into the server and tar/gz (archive) the existing civicrm directory. One command, 15 seconds or so.
  * upload the new version tar/gz. This of course will vary greatly by internet connection speed, but generally only a couple of minutes or less.
  * delete the existing directory. This is what's horrendously slow via most sftp programs I've used. They usually do a recursive delete on each individual file and directory, and since there's a ton of them in CiviCRM it takes forever. It takes 1 second in the shell.
  * Unarchive the new version. Usually less than a minute.
  * run the upgrade script.
  
  Very, very fast.
  
  If you aren't a command line person - I'm not, actually - there are some ways around it. Our systems all have Webmin installed as a helpful control panel, and it's Filemin file manager deletes directories as quickly as the shell commands do. I also regularly use Cyberduck for SFTP work, and it has a built in tar function, so I can archive/unarchive just as quickly as from the command line. So, even though I don't really use the command line I am getting the benefits.
  
  I would add that if you are concerned about security the very LAST thing you would want to do is have excessive writable directories on your server, and most built in upgrade systems require these. Don't give in. You can reduce writable directories by not using those systems and save you many troubles down the road.
  
  
  ---
  
  ### Answer by username_2 on 2016-04-26. Score: 4
  
  The documented upgrade process is long but has to cover every eventuality. I've got it down to 11 steps - 2 of which I don't normally do. I can do an upgrade in about 10-15 minutes, but this depends on my cPanel access which makes most steps very fast. Do you have cPanel access? Here are my 11 steps:
  
  1. Check extensions will work (don't do this if a minor update)
  2. Logon as Admin
  3. Backup the database (using phpmyadmin)
  4. Disable extensions (I don't normally do this, never been a problem)
  5. Clear Civi cache
  6. Delete templates.c folder (using cPanel file manager)
  7. Delete old code (ditto)
  8. Upload & unpack new code (ditto)
  9. Run upgrade code (/civicrm/upgrade?reset=1)
  10. Enable extensions (if disabled)
  11. Test
  
  
  ---
  
  ### Answer by username_3 on 2016-04-27. Score: 4
  
  I find using Drush to upgrade CiviCRM is very quick. Here are some instructions:
  [Is it easy to upgrade CiviCRM using drush?](https://civicrm.stackexchange.com/questions/4829/is-it-easy-to-upgrade-civicrm-using-drush)
  
  
  ---
  
  ### Answer by username_4 on 2016-04-21. Score: 3
  
  Re: *why not to upgrade CiviCRM just like any other Drupal Module*
  
  CiviCRM can be used with Wordpress or Joomla as well as Drupal, so it cannot rely on Drupal's update mechanism.
  
  Re: *deleting all previous civicrm code files is very long, and downloading then unpacking, then transfering the new code files is very time consuming.*
  
  This is certainly easier if you have shell access to the server.
  
  Re: *why : - not to include l10n and sql inside the upgrade ?*
  
  l10n is I think not included because many installations don't need it and it roughly doubles the size of the download.
  
  Can you clarify what you mean by including sql?
  
  > **Comments:**
  > **username_0**: Thank you for your quick answser : I had not seen this multiple CMS aspect. What do you mean by "shell access to the server" (I use Filezilla). Does it make any difference, once I have deleted all civicrm code files, if (1) I re-install CiviCRM like a "new" Drupal Module, or if (2) I unpack civicrm-4.7.6.tar.gz on my PC, and then copy its content to the server ? What if I do the same with civicrm-4.7.6-l10n.tar.gz ? (BTW, this file contains 2 folders : l10n and sql).  
  > **username_4**: Shell access is remote command line access to a server, so you can log in over ssh (secure shell) and run commands. This enables you to use a command-line tool such as wget or curl to download the tar files directly onto your server. You can then extract them into a temporary directory and then swap the new code for the old almost instantly. What did you have in mind by re-installing like a "new" Drupal module?  
  > **username_0**: thank you username_4 for your answser : About "new" Drupal Module : go to Modules in the Drupal Menu, then click "Install a new Module" : this opens a form which enables you to install your Module from an URL ending with ...tar.gz that you can directly pick from the Module page (https://www.drupal.org/project/...) : quick and easy !  
  
  ---
  
  ### Answer by username_5 on 2017-06-24. Score: 1
  
  Since the OP talks about 'doing this all twice' thought I would mention that using code repo eg git, can mean that the download of new codebase occurs only on dev instance, then git add/commit/push, and on live git pull, then run civi upgrade, via cli if you are happy with that, cvupdb, which isn't quite the same as 'doing this all twice'.
  
  
  ---
  
  