Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

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:

share|improve this answer
    
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
2  
Thanks a lot, David! –  Vlad Stratulat Dec 12 '13 at 10:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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