Step 3 of https://api.drupal.org/api/drupal/core!UPGRADE.txt/8 says

Also remove all of the files in the top-level directory, except any that you added manually.

it doesn't exclude or include hidden files explicitly, so my logic would say 'all' includes hidden files.

later it says

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

which does not copy any hidden files except .htaccess.

This would suggest not to delete the old hidden top level files. On the other hand the new version/patch of Drupal 8.y.z comes with (new?) hidden files.

So my question is: what is the correct way to handle top level hidden files other than .htaccess while upgrading Drupal 8?

  • if you are upgrading manually, just delete everything beside sites(and possibly modules and themes if you have added themes and modules in there) directory, copy the new drupal over and run updates, that's it. – user21641 Jan 9 '16 at 12:06
  • Then cp -R drupal-x.y.z/* drupal-x.y.z/.htaccess /path/to/your/installation would be wrong because it doesn't copy hidden files. – Gerd Castan Jan 9 '16 at 12:50

You should delete all files hidden and not hidden that you didn't place there yourself.

Drupal core has a lot of hidden files, which are used when developing Drupal itself (git, lint and possibly more) but none of those are needed or relevant for running a Drupal site in production. They are highly relevant when you are working on Drupal itself.

The only hidden file you need for a production site is the .htaccess, if you have more than that they are safe to delete.

|improve this answer|||||
  • can you add what to do with those hidden files when updating a development installation? – Gerd Castan Jan 26 '16 at 17:31
  • @GerdCastan Your production and development installation should be 100% alike, not to be confused with a installation used for developing Drupal Core. – googletorp Jan 27 '16 at 10:30
  • Will mark the answer solved when tested with the next update :-) – Gerd Castan Jan 27 '16 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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