How can i connect Wordpress media library to one or multiple Block Storage(Volumes)?

Hi, The Block storage feature is awesome, i was one of the beta testers. I’m using Wordpress and i want to connect Media library or Uploads folder to one or multiple block storages i have created. I could do this buy linking folders in Ubuntu, but this just works for one volume. Is there any other way to do this that i don’t know?

Thank you in advance

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey everyone,

Just want to add for other folks that may help, if your using this article which is awesome so kudos guys, and your WordPress install whether one click or LAMP stack, your uploads folder will not exist until you upload a file to it or create it.

Hope that helps, Thanks for info above again!

I’m not sure how you would be able to point the uploads folder at multiple volumes at once short of doing something like setting up a RAID array. I’m curious what you use case is?

If you want to move the location of the WordPress Media library and Uploads folder without using sysmlinks, you can define the location in your wp-config.php file. You can not use absolute paths though. So if the folder is located at /mnt/volume-nyc1-01/wp-uploads, you would set:

define('UPLOADS', '../../../../mnt/volume-nyc1-01/wp-uploads');

Some other points to consider are that you need to ensure the folder is owned by the webserver user. On Ubuntu, this would be www-data To do so, run:

  1. sudo chown www-data:www-data /mnt/volume-nyc1-01/wp-uploads