I recently noticed my droplet’s storage becoming full (98.8%), not allowing me to do my daily rotating backups and I therefore decided to take the plunge to implement a DO Spaces CDN.
All seemed to go well in creating the DO Spaces CDN, but not so good with the DO Spaces Sync for WordPress. I think I managed to implement it okay since when I upload images to the Media gallery I can now see the images being stored on the CDN.
However, the WordPress Media gallery only has greyed out placeholder blocks and no normal thumbnail. Plus when I try to view image (by clicking on the greyed out placeholder block) it also doesn’t display the image, also the link to the image simply 404’s as it’s not available in the normal URL (same for ‘Edit Image’ and ‘View attachement’).
So basically I have a DO Spaces CDN that stores uploaded images onto the CDN, but is of no use since I can’t see the thumbnails in the gallery and also can’t view the individual images.
I’ve created a DO support ticket, but guess they must be very busy at the moment. I also can’t post a screenshot, but maybe the following config might shed some light?
FILE & PATH SETTINGS
Full URL-path to files: https://mydomain.com/wp-content/uploads
Local path: /var/www/mydomain/wp-content/uploads
Storage prefix: /
Filemask/Regex for ignored files: *
I’ve also tried prepending the ‘FULL URL-path to files’ with the name of my CDN (i.e. https://mycdn.mydomain.com/wp-content/uploads) but that makes all previous images greyed out and again doesn’t display new uploads in the Media gallery (but they’re uploading to the CDN).
Any ideas as to where I’m going wrong?
Thanks,
Derrick
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.
SOLVED: After ‘Reading The Fantastic Manual’ again, I noticed that I’d incorrectly specified the ‘Full URL-path to files’ setting.
I should have simply just specified my CDN without the ‘/wp-content/uploads’ i.e. just https://mycdn.mydomain.com
Result is that it now works in that I can see the thumbnails and the full sized images, being delivered via the CDN and displaying in WordPress.
Now all I have to do is copy over the previous images to my CDN and I should be good to go!
Just posting in case this can help anybody else for the future.
Hello, @derrickr
I’ve just answered a question about the DigitalOcean Spaces product which you can check here:
https://www.digitalocean.com/community/questions/how-can-droplet-mount-with-spaces
You can use the DigitalOcean Spaces Sync plugin in order to achieve this. You can easily install the plugin using ```wp`` from your command like:
First enter your WordPress plugin direcotry:
cd /var/www/html/wp-content/plugins
From here, we can install DigitalOcean Spaces Sync using the
wp
command:wp plugin install do-spaces-sync
To activate the plugin, we can run:
wp plugin activate do-spaces-sync
From there you can navigate to the plugins tab in WordPress admin area and activate the plugin.
I will recommend you to check on this tutorial in order sot this up:
https://www.digitalocean.com/community/tutorials/how-to-store-wordpress-assets-on-digitalocean-spaces
Hope this helps!
Regards, Alex