I've updated from Drupal 7.22 to 7.34 on my Development Machine along with some Module updates. Now I am going to update my Production environment.

Question: Do I have to upload the entire root directory or can I just upload the Sites folder? I'm assuming I have to upload the entire root directory as this is a Drupal 7 version core update.

P.S. Got the database update stuff covered. P.S.S Would use Drush, but I'm just not comfortable with it yet.



4 Answers 4


It is always recommended to keep the core up to date. You will have to replace the updated files of the core which were updated with the fixes. For e.g. An update from the Drupal version 7.31 to 7.32, which was a fix for the SQL injection issue, changed the following files

  1. includes/database.inc, and
  2. All the info files in the core modules, themes, and profiles.

So, you would need to update all the files. It is strongly recommended to use a code version control system like git when working with Drupal. So that you only need to push the changes and not the complete code again and again. Also, as @darol100 mentioned in his answer, using drush saves a lot of time! So, I would suggest you to spend some time learning it.

For steps on how to update the Drupal core, refer: https://www.drupal.org/node/1494290


Even thought you said that you are not comfortable with Drush. I would strongly suggest for you to used Drush to update your modules and core. Its just easier and faster. If you decide to give a try you can update modules and core by running.

drush up -y

If you want to update just the core use drush up drupal -y

You can upload a copy of the latest Drupal version on your production website and then replace sites folder with your dev sites folders. And this would take care of Drupal Core updates.

  • That's it? One command?
    – John
    Commented Jan 30, 2015 at 21:18
  • There are only a few modules that I want to update, not all.
    – John
    Commented Jan 30, 2015 at 21:19
  • Yes, this is going to download all Drupal core and contribute modules updates. This also takes care of the database updates. Commented Jan 30, 2015 at 21:20
  • 1
    If you want to update just the core use drush up drupal
    – AjitS
    Commented Jan 30, 2015 at 21:20
  • drush up drupal -y This is going to update or Drupal core only. Commented Jan 30, 2015 at 21:21

If you have stage environment (which should be exact mirror of your prod), you may upgrade your stage environment first (drush up or manually) and then once tested, synchronise the files via rsync, in example (when having configured drush aliases):

drush rsync -vur @stage @prod

Here is simple script which will deploy the changes from qa to prod (including the backup):

# Script to deploy files between remote environments by updating the changed files only.
[ -z "$2" ] && { echo Usage: $0 @remote.src @remote.dst; exit 1; }

DIR=$(git rev-parse --show-toplevel 2> /dev/null)

cd $DIR
drush $DST arb --tags=$DST,$USER
if [ $(drush site-alias --fields=host --format=csv $SRC) = $(drush site-alias --fields=host --format=csv $DST) ]; then
  # Remotes are the same.
  drush $* $DST rsync -vur `drush dd $SRC` @self
  # Remotes are not the same.
  drush $* rsync -vur $SRC $DST

This script will do the full backup (code, files, and database) before deploying your changes to prod (arb = archive-dump). So if your deployment to prod fails, then you can easily restore it (archive-restore).


Here is what I do for the site that I've been working on. I have created a git repo to apply changes from dev to prod. I never work on prod, only dev. When I update something, I add those changes to the git repo with the commands git add -A && git commit -m "your commit message" && git push origin master. Then I go to prod's docroot, and type git pull. Very convenient. You can find out how to create a git repo on this very useful article.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.