Updating your Drupal 6 website using Drush

I got the sample Drupal 6 website working on Quickstart. Now I want to update the modules and core using Drush.

My next step is to update all the Drupal 6 modules and Drupal core from 6.20 to 6.22. I changed directories to example6-dev and ran the command "drush update". I got the message asking if I really want to do this. Be sure to backup robots.txt and .htaccess files which will be over written. So I created a backups folder in example6_dev and made backup copies of robots.txt and .htaccess.

1. Before updating Drupal core, be sure to make backups of your code, especially robots.txt and .htaccess. These 2 files will be overwritten by the new version of Drupal core.

mkdir backups
cp robots.txt to backups/robots-prev.txt

cp .htaccess to backups/.htaccess-old

I'm new to using the command line to do file management, so I listed the commands above.

2. I typed the command "drush update". It worked but I received a message saying that the "update" command has been deprecated. Please use "drush pm-update" or "drush up".

None of the contributed modules have been enabled on this sample site, so none were flagged for updating. I went into the site admin panel and tuned on all the modules for CCK and Views. I also added a couple of my favourite modules, admin_menu and backup_migrate. I use them on every Drupal website and I wish they could be included in core.

drush dl admin_menu
# this command downloads the module admin_menu and installs it in the modules folder

drush en -y admin_menu
# this command enables the admin menu without having to navigate to the modules admin page of your site

My question is, how do I download Drupal 6.22 using Drush? I want to create a new fresh install of Drupal 6 using Drush. That will be the topic for my next blog post.

Comments

How to download Drupal 6.22 using Drush

You can use the following drush command to download Drupal 6.22

drush dl drupal-6.22

Or you can use this one to download the latest version of Drupal 6

drush dl drupal-6