Question

SOLVED: Best/Viable WordPress plugin for DO Spaces CDN

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


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.

Accepted Answer

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.

alexdo
Site Moderator
Site Moderator badge
April 3, 2020

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.