Speeding cars

Space Sync Plugin for Digital Ocean

I am a BIG fan of Digital Ocean’s hosting platform. I use them for many of my “off-the-clock” projects. One such project is my WordPress hosting. This site, for instance, is a WordPress site hosted on a Digital Ocean VPS. So when I wanted to host the images for my sites in a CDN to improve the load times of my web pages, Digital Ocean was a natural fit.

I looked around and found a WordPress plugin called Digital Ocean Spaces Sync. In theory, it’s just what I need. However, the project seems to be long abandoned and no longer supports a modern stack. Therefore, I’ve “borrowed” some of what was there, and created a new WordPress plugin. I’m just calling it Spaces Sync. I’ve also added some extra conveniences for resizing and compressing images on upload.

  • Introduction
    • Why? To improve the load times and reliability of your WordPress website.
    • A CDN, or content delivery network, is a system of servers that are distributed around the world. When a user visits a website that uses a CDN, the website’s content is delivered from the server that is closest to the user. This can significantly improve the website’s performance, as it reduces the time it takes for the content to load.
    • They also improve the reliability of a website, as they offload the work of loading images from the server.
    • Overall, CDNs can provide a number of benefits for website performance, reliability, and security.
    • Digital Ocean’s Spaces is just such a CDN. It operates almost identically to AWS’ S3, and only costs $5 / month!
    • With the Spaces Sync plugin installed, all of the files you upload will be sent into your Digital Ocean Space rather than onto your WordPress server, getting the advantages of a CDN as well as saving server storage space.
  • Features
    • Offload all your uploaded files into your Digital Ocean Space, updating the URL within WordPress to use the CDN files within posts and pages.
    • Optional user-configurable JPEG compression on upload.
      • Set how much compression to apply. (0% or 100% = no compression, 99% = highly compressed)
    • Optional user-configurable image resizing on upload.
      • Set a maximum width and height for your images and they’ll be resized before being stored in your Space.
  • Benefits
    • It’s FREE! And Digital Ocean’s Spaces are super inexpensive. Plus… Get $200 worth of credit if you’re new and signup using my affiliate link.
    • In the event you have to change where your WordPress is hosted, your static files won’t have to be moved.
    • Have a site that isn’t slowed by the loading of large uncompressed images.
  • Conclusion
    • Give it a try and let me know how it goes.
    • I’m not offering “support”, but I’ll try my best to help you if you’re stuck.

Installing Space Sync

  • Visit your WordPress Dashboard and Plugins > Add New, and click on Upload Plugin. Select your downloaded zip file, and click Install Now.
  • Now within the Settings menu, you should see a link to Spaces Sync. In there you’ll find the options to connect your Digital Ocean account and the settings for compression and size limits.

I’m just posting this in March of 2023. I hope to write up a more comprehensive guide on using the plugin soon. I am also aware of a bug. Unfortunately, if you use WordPress to resize the image, the one in your Digital Ocean Space isn’t updated. I’ll update this when I’ve found the time to fix that.

Good luck!

DigitalOcean Referral Badge

Discover more from thePaulCushing

Subscribe to get the latest posts to your email.


Comments

What do you think?