Add Volume to wordpress/content/uploads

March 11, 2018 2.8k views
WordPress Ubuntu 16.04 Storage


I have a WordPress site, how can I expand the current storage? Because if I buy Volumes it will be like if I plugged in another HD to my computer, is it possible to expand the existing volume into purchased block storage so that I don’t have to move the WordPress content folder?

1 Answer

It’s not possible to extend your existing filesystem with a Block Storage volume without modifying the filesystem. Is there any reason why you don’t want to move the content folder to the Volume? That’s the easiest and simplest way to do it. You can use a symlink so that you wouldn’t need to change any Wordpress settings or risk breaking plugins etc.

For example, if your Volume is mounted under /mnt/storage, you can move the content folder to it and then create a symlink that points to it:

sudo mv /path/to/wordpress/content /mnt/storage/
sudo ln -s /mnt/storage/content /path/to/wordpress/content
  • Well reason was bigger VPS was bought but it seems we can’t expand just storage on the VPS. I guess I can always take a snapshot then move to smaller VPS, but if I end up filling up a lot of space then it will be hard to do.

    • That’s correct, it’s not possible to resize just disk space right now. Block Storage is a great solution to contain larger files so you wouldn’t need to create a larger-than-necessary Droplet just for the disk space if you don’t need the extra RAM and CPU.

      You can always resize your Block Storage Volume if it starts getting full, though. See this tutorial:

      by Justin Ellingwood
      By attaching a DigitalOcean Block Storage volume to a Droplet, you can easily increase your server's capacity as your requirements change. While it's possible to attach multiple volumes to a single Droplet to expand the available capacity of your server, it's also possible to expand the size of an existing volume. This process involves increasing the size of the volume in your DigitalOcean account, followed by some operations on the server itself to expand any partitions and filesystems.
  • Excellent, I did with your solution and succeed, thank you so much @kamaln7

Have another answer? Share your knowledge.

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