Question

Move Opencart Image Folder To Spaces

Hi, I would like to move my /upload folder of Opencart to Spaces. Is there any ways or guide which I can refer to do this? I want to utilize the built in CDN from spaces to speed up my Opencart website. Thank you.


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey friend,

While you can do this with s3fs, I would actually recommend using our Volumes instead. Volumes are going to have less permission issues than a fuse mount. You could rename the images folder temporarily, create a new one, and then mount the volume in that folder. So, for example, let’s say these are the variables:

  • Volume: /dev/sda
  • Folder: /var/www/images
  • Web server user: www-data

I would run these commands, personally:

mkfs.ext4 /dev/sda
mv /var/www/images /var/www/images.bak
mkdir /var/www/images
mount /dev/sda /var/www/images
mv /var/www/images.bak/* /var/www/images
chown -R www-data. /var/www

Hope that helps :)

Jarland