How to upgrade Drupal 7.x

Submitted by Nicola Rainiero on 2012-08-21

Here it is a simple list with the operations that I use to upgrade new release of installed modules and Drupal itself, at the moment only 7 major release, i.e. from 7.x to 7.y where y>x. As far as I know this little guide is sufficient for Altervista.org domains and even for other ones.

The Drupal upgrade is a topic very widespread in the web, among other things it is treated by Drupal Community here, besides it is inserted as text file, UPGRADE.txt, in Drupal itself and it is useful like point of beginning. Why talk about it here?

Well I want a very little list, with only the direct actions, no description, no divagations... That's all I need!

When you have to upgrade? Generally Drupal warns you:

  • by email, if you have enabled this warning during installation or by this link:
    http://MY_SITE/admin/reports/updates/settings
    or
    http://MY_SITE/?q=admin/reports/updates/settings
  • by a message on the screen when you log as administrator and if the updates are considered useful for security of your site.

(Take note: I won't use anymore the prefix: http://MY_SITE/)

 Upgrade new modules released^

  • Put site into maintenance mode from here admin/config/development/maintenance;
  • evaluate if you have to make a backup of your data (database and entire content in sites/ folder);
  • copy new modules with folders themselves, erasing the existing versions in sites/all/modules/;
  • modify sites/default/setting.php file in this manner:
    $update_free_access = FALSE; --> $update_free_access = TRUE;
  • run update.php in the root of your site;
  • restore sites/default/setting.php (from TRUE to FALSE);
  • rnter in your site writing user o ?q=user in the browser address line;
  • remove maintenance mode.

 Upgrade of a new minor version of Drupal 7^

  • Put site into maintenance mode from here admin/config/development/maintenance;
  • in this case I suggest you to make a backup of your data (database and entire content in sites/ folder); if you use sqlite it is sufficient to save the file with homonym format located in /sites/default/files/ (using Filezilla you have to put the Modality of transfert in binary).
  • In local directory:
    • download and uncompress new version of Drupal and update languages if they are released;
    • apply additional patches inserted in the .htaccess remote file, in the same released with the new version of Drupal;
    • rename default.settings.php in settings.php and apply additional patches inserted in the same remote file, but above all add the definition and location of your installed database.
  • In remote directory:
    • delete all the folders and files, but don't touch sites/ and its contents;
    • copy setting.php previously modified in sites/default/ (overwriting the existing file and checking the permissions); then edit it in this manner:
      $update_free_access = FALSE; --> $update_free_access = TRUE;
    • put all the files and folders in your local directory in the remote one (but don't touch anything in sites/ of course!).
  • Run update.php in the root of your site;
  • restore sites/default/setting.php (from TRUE to FALSE);
  • enter in your site writing user o ?q=user in the browser address line;
  • remove maintenance mode.



Related Content:

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.