How to update Drupal [Minor update]

How to update Drupal [Minor update]

how to update drupal for a minor version updateA minor update is when a new release of the same version number comes out, ( 7.0 to 7.1 and so on). This updates are normally patches for stability and/or security, usually do not include any major change to the core system.

WHAT DO YOU NEED

1- An Internet Connection
2- An FTP Program installed on your PC and already connected to your drupal site. (I will refer to Filezilla as it is the one I am using)
3- A basic knowledge of how to backup files from a root directory on your drupal site and database via PHP MySQL
4- Between 30 minutes to an hour, (depending from your internet connection speed)

DRUPAL MINOR UPDATE PART ONE

1- Visit Drupal official website, download the latest release for your Version Number and unzip them in a folder on your PC.

2- Create a folder on your PC and call it Drupal-backup-[date].

3- Login to your Drupal directory via Filezilla and download all your Drupal website to the backup folder you have just created, (just in case).

4- Login to your server CPanel and from here launch and login to your PHP MySql account

5- Backup the Drupal database and download it to the backup folder you have just created (just in case).

6- Go back to Filezilla, create a new folder on your drupal directory and call it drupal-new.

7- Upload all the new files that you have unzipped in your folder on your PC to the drupal-new folder you have just created.

8- Now Copy the [sites] directory and all the Customization files or folders you have from your backup to the drupal-new folder. This will allow you to overwrite the basic drupal files so that you can keep all the custom code you might have added to your pages. If you have made changes to the .htaccess and the robot.txt also overwrite this ones. As an example on my old site I have 2 extra folders on the images and I have some customisation on the .htaccess file that I want to keep on the new upgraded site, so I will overwrite this files. The [sites] directory is very important as you will have your themes and modules, plus any customization, so you definitely need to have that back as it was on the old site.

9- From the drupal-new folder open the [sites] folder and download the settings.php file to your PC.

10- Look for the line stating:  $update_free_access = FALSE; and change [FALSE] to [TRUE].

11- Save it and upload back to the server.

DRUPAL MINOR UPDATE PART TWO

You have done most of the job, now is time to update the database and do some testing to make sure all is fine.

A few more steps to success:

1- Navigate with your browser to [http://yourdomainname.com/drupal-new/update.php]. Please change yourdomainname.com with your site URL and add any missing [folder] path if your drupal site is not located on the root.

2- Click the continue button and follow the instructions.

3- You will be prompt with a list of changes, click on apply pending updates.

4- at this point if everything went smooth, there shouldn’t be any errors and your website is successfully updated. In that case proceed with the following:

A- Revert the values of the settings.php file from [TRUE] to [FALSE].
B- Open a new tab on your browser, navigate to you drupal-new website and perform a visual check that everything is in order by making sure that the images show correctly, there is no PHP warnings anywhere on the pages and all the forms are correctly displayed and functional.

If you you are happy with all the results it is a success and the update is finally over. Now the last thing you have to do is to rename the  drupal-new folder as per the old one so that your updated site is live.

NOTE

If your old drupal installation was located on the root directory and not on a subdirectory proceed with the following.

1- Create a new folder on your root directory and name it [drupal-old].

2- Copy all the root files except [drupal-new] into [drupal-old].

3- Delete everything from the root except [drupal-old] and [drupal-new].

4- Copy all [drupal-new] files to the root directory

5- Delete the directory [drupal-new]

All done, your drupal site is now updated and you have a backup in case on both the root directory and on your machine, this just in case for some reason you will need to revert the update back to its old state.

I normally keep the [drupal-old] for the next update in 6 months or so.

Please feel free to post any feedback or if you have a different method feel free to share it, I will be glad to come to know how you update your drupal site.

All the best
Dan

SEE ALSOHow to have a better control over your installed modules on Drupal

Share
Share
Website maintenance by: dp