Single Blog

Drupal 7 – Performing Minor Version Updates

20 June, 2016, Written by 0 comment

drupal

Drupal is a powerful Content Management System (CMS). In fact it’s power and flexibility would lead some people to more correctly describe it as a Content Management Framework (CMF). The power comes from a higher level of abstraction than is typically available to WordPress projects.

However, in some ways it is more time intensive than it’s rival open source system. Whereas WordPress performs minor version updates painlessly (and usually automatically) Drupal requires some “hands on” effort. The following is a simple cheat sheet of the steps to follow when performing a minor version upgrade e.g. 7.43 to 7.44.

  • Completely backup your file system. Nearly all web hosting providers offer a CPanel File Manager tool. If you are a bit leery about “power user” tools like Shell Commands or the Drupal “Drush” utility, there is no shame in using the File Manager. Simply select ALL the files in your directory, compress to a zip file, download.
  • Next step is to download your database but there are some configuration housekeeping tasks to take care of before doing so.
    1. Switch your configuration out of “clean URL” mode
    2. Put your site in “maintenance mode”.
    3. Make sure that the Core “Updates” Module is enabled.
    4. Finally, do a full Cache Flush.
  • Now you are ready to download your database. In the hosting CPanel look for the MyPHP utility, navigate to your database, select ALL tables, click on the EXPORT tab and download your data as an SQL file.
  • Put your zip file containing the data and SQL file containing the database in a safe place. DropBox.com is a great idea for hassle free offsite storage.
  • It’s recommended that you perform any upgrades on a TEST version of the site or on your local desktop. Acquia has an installer to create a Drupal Development environment on your destop https://www.acquia.com/downloads
  • If you have tested the upgrade and/or want to dive in the next step is to get the most recent version of Drupal and download it to a temp directory on your computer https://www.drupal.org/project/drupal . Unzip the package. Now look for a directory called “sites” DELETE IT! (It’s important. You’ll see why.) Now zip everything back up and call it something like “drupal-core-modified-v7.44” (you decide).
  • On your live hosted site check the “/profiles” directory. If you are using a custom profile (like profiles/acquia) you must zip this directory and download.
  • IMPORTANT: Download the current version of your .htaccess file. The reason you may need this is because some hosting providers add custom Apache handlers to the file. If you perform your update and get the dreaded WSOD (white screen of death) this is probably what happened.
  • Now it’s time to get brave. On your live hosted site, delete ALL files EXCEPT the /sites directory (now you see?).
  • Upload the Drupal Core zip file “drupal-core-modified-v7.44” you created just earlier. Unzip everything and delete the zip file.
  • Upload any custom profile zip files you created just earlier into the “/profiles” directory. Unzip everything and delete the zip file.
  • Log in at “www.yoursite.com/?q=user
  • Enter the URL “www.yoursite.com/update.php
  • If all is going well at this point, you will be given some instructions on-screen about the update process. Just follow the prompts.
  • If you’ve done everything correctly you should get to the Drupal update success screen. Click on the Admin menu option “Reports” and check the site Status. It should tell you the your current Drupal Core Version is up to date. Congratulations.
  • Don’t forget to change back to “Clean URLs” from the configuration menu.
  • Log out. Check your site.
  • Open a beer. Celebrate.