Updating drupal
Last modified on July 24, 2026 • 2 min read • 240 wordsHere’s what I need to to to update drupal (minor updates, e.g.
cd /var/wwwsuwget http://ftp.drupal.org/files/projects/drupal-7.19.tar.gztar -xvzf drupal-7.19.tar.gz chown -R jeltsch:www-data drupal-7.19rm drupal-7.19.tar.gz cp -a drupal-7.18/sites/ drupal-7.19/The above cp command makes a copy of the complete site, which can take a long time and use lots of disk space. Instead, you can delete the “sites” subdirectory in the new drupal folder and make a link to the old “sites” subdirectory:cd drupal-7.19rm -rf sitesln -s ../drupal-sites/ sitesHere you should log into your site and put it into maintenance mode! mysqldump -u root -p --databases drupal7_jeltsch_org drupal7_claudia_jeltsch_org drupal7_lammertlab_org > drupal7_all.sqlrm drupal7ln -s drupal-7.19/ drupal7Here you should click the link to the update script. After the updates were successfully performed you can put your site online again.** ****Drupal 9**Updating Drupal 9 is most easily done using composer:composer update "drupal/core-*" --with-all-dependenciesAlso the modules can be updated. However, in my case the update was not always targeting the module that was actually in use but a module that was lower in the priority list in some other directory. For minor version updates:composer update drupal/modulename --with-dependenciesFor major version updates:composer require drupal/modulename:^2.0After this, don’t forget to visit
https://yoursite.com/update.php
!