Tech Tips on Computers, Internet, Blogging, Web Development, Social Media, Android and more

Full width home advertisement

Post Page Advertisement [Top]

Unlike WordPress platform, in which updates can be installed automatically, Drupal has to be done manually or using Drush. This may be a pain for some especially who do not want to fiddle arround with the site files too often. It might even break the site. So precautions are necessary when updating Drupal.

So, Drupal was throwing the familiar notice on the site when I logged in this time, that there are updates available and that I should update the core and some modules.

Where to check what updates are available?

To check the available updates for Drupal and it's modules, login using the admin account and go to "reports > Available Updates".
yoursite.com/admin/reports/updates



The updates available for Drupal core and modules will be displayed here. A link is also displayed from where the latest version can be downloaded.

How to update Drupal Core?

The following steps were followed to successfully update Drupal core:

  • Make a backup of your Drupal database instance.
This is an important step and should not be ignored. You can backup your database (MySQL) from phpmyadmin or from the control panel provided by your host. In cPanel, it can be done from "Backups".
  • Download the latest release of your current Drupal version.
  • Extract the [tar ball or zip] Drupal package.
Since I have access to the cPanel's File Manager, I uploaded the Drupal Core zip file directly to /public_html directory. Saves some time than uploading extracted files.
 
Then extracted the drupal core zip package. The result is drupal x.x.x folder.
  • Set the site on maintenance mode
To set Drupal Site in Maintenance mode, go to "Configuration" > "Site Maintenance". Check "Put site into maintenance mode".
  • Delete all the files & folders inside your original Drupal instance except for /sites and its sub-folders. Backup any files and folders where customizations were done.
This activity may vary depending on where your customized files are. In my case, they are all in /sites directory. So deleted all files and folders, except the /sites folder.  So the /public_html directory now has the /sites folder only.
  • Copy the new Drupal core files and folders and put in the original Drupal directory
Copied the files and folders from /public_html/drupal x.x.x folder except the /sites and put in the /public_html folder. Delete drupal x.x.x folder after copying.

Replace any customized files and folders if any. If you have modified files such as .htaccess, favicon or robots.txt re-apply those changes to the new files.
  • Login to site as administrator or as user no 1
  • Run update.php by navigating to http://yoursite/update.php
Followed the process and onscreen steps to update your Drupal instance.
  • Disabled maintenance mode


No comments:

Post a Comment

Bottom Ad [Post Page]