My website is running on Windows and it sits on drive C:/, however I'd like to keep all my files on drive D:/. How can I do it? I know that I can move the whole site to drive D:/ but I was wondering if it's achievable at all.


On linux, you could create a symlink to the other folder, or mount it over NFS etc..

On Windows you can actually create a symlink as well.

Something like this should work:

# Open a windows terminal and
mklink /J "C:\Webroot\Drupal\Mysite\sites\default\files" "D:\Data\Drupal\Mysite\"

That should create a hard link connecting the files folder across the two drives, with the data being stored on D:

More info:

  • Thanks David. I'm trying to reproduce this on my local and I get Cannot create a file when that file already exists. Can you please tell me what does it mean? – Vlad Stratulat Dec 12 '13 at 10:26
  • 2
    You might need to rename the current files folder first, then create the symlink. After that copy / move the files back into the new linked folder. – David Thomas Dec 12 '13 at 10:31

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.