I’ve taken extra 40 GB disk space with my droplet to store my all media files there and I wanted to access my existing media file from there and view them as per product images.
So I need to move my previous wp-content/upload media files to new the volume. Here you can see on the image I have 40 GB unused storage.
I wanted to move my existing file there and use them from that folder as I’m using from the main storage.
How can I move all data from main storage to new disk space? How can point that data so that there will be no problem to my product image view?
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!
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!
Before proceeding, I would strongly recommend making sure that you have a backup of your Droplet, just in case, so that you can revert to a working version of your website if ever needed.
Once you have a backup, to move your WordPress media files to the new volume and use it for your existing site, you can follow these steps:
Copy Existing Media Files to the New Volume: First, copy your existing
uploads
directory to the new volume.Backup and Remove the Old
uploads
Directory: Backup your currentuploads
directory and then remove it.Unmount the New Volume: Unmount the new volume from its current mount point.
Mount the New Volume to the Correct Path: Mount the new volume to the
/var/www/html/wp-content/uploads
directory.Update
/etc/fstab
for Persistent Mounting: To ensure the new volume mounts automatically at the correct path after a reboot, update the/etc/fstab
file.Open the
/etc/fstab
file:Add the following line to mount the volume at boot:
Set Correct Permissions: Ensure the new
uploads
directory has the correct permissions so that the web server can read and write to it.Verify the Setup:
uploads
directory is accessible and correctly mounted.For more detailed information, you can refer to the following resources:
fstab
ManualLet me know if you have any questions!
Best,
Bobby