Drupal update shell commands

The command line is much faster than doing it with a UI or FTP.
It's assumed you know to get shell access to your server and basic linux commands.
Replace all sample names below with the latest names and urls.

Using cp because mv does not overwrite folders.
Using \cp to avoid any alias cp command.

Set site to maintenance mode before either process.
Run http://update.php after each process.


Core update process:
cd root
wget --no-check-certificate https://ftp.drupal.org/files/projects/drupal-7.43.tar.gz
tar -xizf drupal-6.20.tar.gz
\cp -R -f drupal-6.20/* .
rm -rf drupal-6.20
rm -rf drupal-6.20.tar.gz


Modules:
cd sites/all/modules
wget http://ftp.drupal.org/files/projects/date-6.x-2.7.tar.gz and so on
su
tar -xizf date-6.x-2.7.tar.gz and so on
exit su

Comments