Move Opencart Image Folder To Spaces

November 26, 2018 2.4k views
CentOS Applications Open Source DigitalOcean 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.

edited by jarland
1 Answer

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 :)


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!