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?

1 Answer 1


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
  • Hi sir, when you say "create symlink to new destination", what is /mnt/new/drive/media ? Is it the new folder that will contains "media" field?
    – Mastafis
    Apr 10, 2019 at 9:19
  • Yes, you copy media folder to the other drive. /mnt/new/drive is just a sample path where your drive is mounted. And /path/to/media is the sample path to media folder inside your Magento root. You should substitute them with real paths. Apr 10, 2019 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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