Support » Fixing WordPress » Upload files from external hard drive issue

  • Resolved chaiiin

    (@chaiiin)


    Hi everyone,

    This is my first time posting here, but I have browsed the forums for some time now. I was not able to find a solution to my question (maybe my wording) so I seek some assistance.

    I have a raspberry pi 3 hosting my webserver. I am running the latest version of Ubuntu Mate on it. I have an external hard drive plugged into it that has photo/video files that I would like to make available on the website.

    When I try to upload files from the hard drive to the webpage, the hard drive folder is empty. The folder in reality holds over 2 tb of stuff, so I know this is wrong.

    Is there any way I can upload my files to my site from the external hard drive, without having to re copy all of them to my website folder?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi!

    This is not really a WordPress question, but a general server question.

    You can bind mount your WordPress uploads directory to the hard drive directory so the uploads will be stored on the external disk instead of the Raspberry SD card.

    This is an example of how you can achieve this:

    
    $ mv wp-content/uploads uploads-old # move the old uploads dir out of the way
    $ mkdir wp-content/uploads # create a new wp-content dir
    $ mount --bind /mnt/mydrive/wordpress-uploads wp-content/uploads
    

    After this all your uploads will use the wordpress-uploads directory inside your external drive filesystem. You can then just upload all your files via the WordPress media uploader.

    Hi

    Thanks a ton. I was afraid it wasn’t a question for this forum, but I did not know where to go. Ill give this a try when I get to my PC.

    It worked flawlessly! Thank you so much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Upload files from external hard drive issue’ is closed to new replies.