3

I want to know if it's possible to move the files directory, put it in another partition, and point to it. I've tried several methods and can't find the solution.

This is what I've tried:

  • I created a second partition on my disk and moved all /files/ folders into it, so I have a D:/files folder.

  • I went to admin/config/media/file-system and changed the 'Public file system path' prompt from 'sites/FirstProject/files' to D:/files/.

However, the styles are missing from the site and I don't know why.

The installation path of my project is C:/xampp/htdocs/www/proyects/sites/FirstProject/files (it is a multi-site installation), and I want to move the files directory to this partition, D:/files.

Can someone help me?

Thanks in advance.

2

It's probably easier to simply use symlinks to point to the new folder. That way, you can leave the default settings as they are. In addition, Windows will deal with the change instead of Drupal. Move the files folder to D:/files, open a command prompt (cmd), and run the following:

C:\> mklink /j "C:\xampp\htdocs\www\proyects\sites\FirstProject\files" d:\files\

Are you sure its proyects and not projects?

  • That was my first idea, but a partner told me about some issues and in this thread [drupal.org/node/363013] they talk about problems with SymLinks. I'll test it, thanks again. About Proyects or Projects, I'm from Argentina and I get confused with some words. Another thing, that path was an example, isn't the original. – Andres Grosso Mar 7 '12 at 19:03
  • Im actually a linux user (especially when using drupal) and have used symlinks successfully many times with the files directory. That thread is very old and I have not seen any such issues myself. – 7wonders Mar 8 '12 at 7:07
  • I have a problem with SymLink, isn't finding the images, when i see it on firebug the path is correct, but isn't showing the image. what can be? The rest seems to be correct. Any idea? – Andres Grosso Mar 9 '12 at 12:17
  • Can be this drupal.org/node/702106? i am trying this now: EDIT: Isn't work, any idea? – Andres Grosso Mar 9 '12 at 14:04
0

Although I haven't used Windows in years, your approach seems basically fine. Your problems with image styles may stem from write permissions in the new location; you may want to check whether all directories in the path for the derived images are actually present. If not, check the watchdog log for errors regarding the creation of these directories. You could manually create them, but that may run you into problems down the line when e.g. new styles are added.

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.