Question

Move Opencart Image Folder To Spaces

Posted November 26, 2018 2.5k views
CentOSApplicationsOpen SourceDigitalOcean 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

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.

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

Jarland

Submit an Answer