I am trying to migrate Drupal 6.29 to 7.22. Part of migration I have deleted all files & directories except sites in D6 site. Now I downloaded Drupal 7.22. D7 version also has sites folder, so do I need to replace sites folder or not? In documentation I read like while copying the sites folder which files need automatically will be replaced, when I am copying sites it is asking for replace or not. Totally confused, can anyone help on this, it would be greatly appreciated!

  • May I ask why you would update to a very old release of Drupal 7? The latest version is 7.43, 7.22 is from 2013.
    – Michael
    Commented Mar 24, 2016 at 11:25
  • @ Micheal - Thanks for your response,Just i am checking with 7.22,thats it. hope procedure will be same for 7.22&7.43 .
    – DINE
    Commented Mar 24, 2016 at 11:41
  • Once worked for 7.22 i will go far 7.43...
    – DINE
    Commented Mar 24, 2016 at 12:11

1 Answer 1


The upgrade documentation is quite precise about this step:

  1. Update to the latest available version of Drupal 6.x


  1. Remove all old core files and directories, except for the 'sites' directory and any custom files you added elsewhere. [...]

  2. If you uninstalled any modules, remove them from the sites/all/modules and other sites/*/modules directories. Leave other modules in place, even though they are incompatible with Drupal 7.x.

  3. Download the latest Drupal 7.x release from http://drupal.org to a directory outside of your web root. Extract the archive and copy the files into your Drupal directory.

 cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation

Executing the above shell command, will copy all the content of the drupal-x.y directory recursively to your installation directory. This will silently overwrite all files in your installation that are also in the drupal-x.y directory and create directories that are not already there. If there is a directory in both, say sites/default/files, only those files will be overwritten that are also in the source, and no files will be deleted from a directory, that is why you had to remove the core files in step 9. This is the default behaviour of cp. If you want to know more about how this works you could read man cp.

If you are not on unix or you don't have shell access to your server, you have to emulate this behavior (at the moment I cannot think about a copy function either on Windows or Mac that behaves differently, e.g. replacing a folder with files inside with an empty folder), because it is the recommended one, using the admin interface you have.

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.