Create symlink of magento 1 “media” folder
-
25-02-2021 - |
Question
I need to create a symlink of my magento1 "media" folder on another disk of my server because I need to make space on current disk. In which way can I do this?
Solution
For a symbolic link you will need first to attach the other disk. After that copy the media folder to the new disk:
cp -r /path/to/media /mnt/new/drive
Rename media folder:
mv /path/to/media /path/to/oldmedia
Create symlink to new destination
ln -s /mnt/new/drive/media /path/to/media
Check that everything is fine, add some new pictures, verify they are created at new destination. Then delete old media folder
rm -rf /path/to/oldmedia
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange