Hi DigitalOcean Community,
I’ve gone down bit of a rabbit hole when researching CDNs and cache options…
I am trying to improve the loading time on Woocoommerce website on a LON1 region droplet (WordPress 1-Click). The target audience is UK only.
Should the Spaces CDN cache be used or not?
There isn’t a Spaces datacenter in London. The closest Spaces region is Amsterdam which I assume shouldn’t be used for a UK website as it would make it slower to load for the UK audience?
The website has about 20gb product images.
Alternatively would this work better? Can I create another LON1 droplet and make that a CDN?
Or would it be better to use a the WP Offload Media plugin and try Amazon S3 or Google Cloud Storage? link: en-gb.wordpress.org/plugins/amazon-s3-and-cloudfront/
The Google Cloud Storage geo redundant option sounds like the best of all I think?
I found a Google Chrome developer report on image optimization tools and for some reason Google doesn’t recommend their own Google Cloud Storage option? link: images.tooling.report/
Also, I found a Cloudways article and it suggests a CDN is not recommended when the website targets users from the same location -
However, using a CDN is not recommended if you are running a site that only targets users from the same location as your web hosting. It can cause a bad user experience as users might face delays due to unnecessary interference from extra connections between the user and hosting.
Rocket CDN says the same thing -
In most cases, if your site is already hosted on a server that is in the same geographic region as your visitors, you do not need a CDN.
That being said, should I not use a CDN for this website?
Also, another option I read about was “Hiding Spaces behind Cloudflare”? source: www.digitalocean.com/community/questions/hiding-spaces-behind-cloudflare
Would it be beneficial to use Spaces with Cloudflare? Wouldn’t that make it even slower by adding another layer?
What if Cloudflare was to be used and not Spaces? For example this WP plugin - link: wordpress.org/plugins/cloudflare/
From what I can tell this Cloudflare plugin isn’t really a CDN, its a Proxy/CDN as it doesn’t host the files. Would there be any speed gains if used?
Or would the Cloudflare images need to be used? Is this the equivalent of Spaces? link: www.cloudflare.com/en-gb/products/cloudflare-images/
Also I have some questions about caching!
What’s the best cache strategy on a dynamic Woocommerce website?
For example, when a product has sold it still shows in stock when it should be out of stock.
An untested solution I’ve found is WP Rocket offers this plugin Clean Post Cache after WooCommerce Order.
Both WP Rocket and W3 Total Cache recommend installing Memcached and Redis. The WordPress 1-Click droplet didn’t have these installed. Should I install them or should I move the website to a new droplet like the OpenLiteSpeed WordPress 1-Click droplet? This has Memcached & Redis already installed Link: marketplace.digitalocean.com/apps/openlitespeed-wordpress
My biggest concern here is will the transition be smooth? Changing from Apache to OpenLiteSpeed? MySQL server to MariaDB?
I am tempted to try the LiteSpeed WP plugin which seems to handle the Woocommerce cache issues with "smart purge” technology, quote:
If your stock is managed by WooCommerce, then product pages can be purged from the cache whenever the stock changes (whether this is at checkout or by an administrator at the wp-admin Dashboard)… Additionally, with our “smart purge” technology, when a product page is purged (for whatever reason), the related category and tag pages can also be purged from the cache, this way you never have outdated product information showing anywhere on your site.
To summarise, what I am thinking of trying:
If anyone can recommend anything I missed or advice on the best approach I would appreciate it.
Thank you in advance to anyone that can help.
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
To summarize, based on your specific needs, here’s what I recommend:
or just the How to Create docs:
I woudln’t use CDN in that case if the website speed is the only purpose. Amsterdam and UK is not that long distance. I host all my websites in EU because we have there better, faster and cheaper hostings and then use CDN if I target US people.