I use multi-site drupal and find that links are smaller if I use symbolic links to shorten the upload file path. For instance, if I'm using mysite.com and mysite2.com:
ln -s sites/default/files s1
ln -s sites/mysite2.com/files s2

So an image might be located at:
http://mysite2.com/s2/images/image1.png
instead of
http://mysite2.com/sites/mysite2.com/files/images/image1.png
It often shortens the link considerably and looks neater.

However, when I update core using drush, all my symbolic links have to be recreated. Sites are broken until that's done. It would be great if my symbolic links at site root were not removed or destroyed during core updates.

Comments

izmeez’s picture

subscribing, sorry don't know the answer but interested in learning what others think.

discipolo’s picture

i want to create symbolic links using drush (make) for following the instructions for extending nodestream
http://drupal.org/node/1320064

i have tried putting stuff into my makefile but sadly i have not succeeded in creating links yet

stuff i tried:

$ns_mods = "../nodestream/modules modules/nodestream";
drush_op('ln -s', $ns_mods);

$ns_libs = "../nodestream/libraries libraries/nodestream";
drush_shell_exec(drush_op('ln -s', $ns_libs););

gr33nman’s picture

Version: All-versions-4.x-dev » 7.x-5.0
Status: Active » Fixed
Issue tags: +symbolic links

It looks like version 7.x-5.0 has fixed the problem with symbolic links.
Now my symbolically-linked short file paths are no longer deleted when drush does a core update.

Thank you drush maintainers!

Automatically closed -- issue fixed for 2 weeks with no activity.