How do I upgrade Drupal Core?

November 20, 2014 2.8k views

How can I upgrade to the latest version of Drupal to 7.34 through SSH?
https://www.drupal.org/drupal-7.34-release-notes

3 Answers

The Drupal One-Click application comes with Drush, a command line tool for administering Drupal., pre-installed. It allows you to upgrade Drupal easily.

First change into the directory containing Drupal:

cd /var/www/html/drupal/

To check for an available update run:

drush pm-update -n

And to update to the new release, run:

drush pm-update drupal-7.34

For more info on what you can do with Drush, check out:

Drush is a very useful tool which helps you perform various admin tasks using just one or two commands in the terminal, replacing the many clicks and page refreshes needed in the UI. This tutorial will go through some of the basic Drush commands and will work with a standard Drupal installation to illustrate them.
  • Amazing, thank you :) I had only used Drush for basic user based commands and managing views. So this is great. Thanks! :)

Just to update. Some might get this error.

Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.                                              [error]
The drush command 'pm-update' could not be executed.                                                [error]
Drush was not able to start (bootstrap) the Drupal database.                                          [error]

Same here. Any solution?

Have another answer? Share your knowledge.