Currently Have Several Layers of Website Caching. How Should I Set This Up?

Cash Builder

BuSo Pro
Joined
Jan 14, 2017
Messages
456
Likes
608
Degree
2
I have a question about caching.

I am using WPX for my hosting, and they have a CDN which is enabled. I also have the caching app installed on Ezoic which is enabled. Then on top of that, I have W3 TotalCache installed in Wordpress, which has page cache and CSS/JS minification enabled. Database cache and object cache are not enabled.

Something tells me I don't need all of this, so what is the best set-up? Ideally I would like to remove the plugin if possible, but then I wouldn't have the minification.

Or should I just get rid of everything and go with Cloudflare? I see that has minification options.
 
With so many caches, you can easily run into a situation where updates take forever because of cache synching.

This can happen with as little as two caches.
 
@Cash Builder, WPX uses Varnish caching, I think. It's why you'll make a change on your website and not be able to see the change push through for 6 minutes or 15 minutes, etc. Feeding them cached versions from W3TC to cache on their side isn't harmful and can reduce the amount of bandwidth they're using from refetching your pages constantly, all day every day (triggered by a user visiting the page... I'm sure it's optimized as much as it can be). The longer expirations of the W3TC cache is good here.

The CDN is probably only serving CSS, JS, and images, so this won't interfere with the others.

If you just want minification you can use something like the Autoptimize plugin but it's not perfect either. The best move is to minify files yourself, but that's not going to happen on a pre-built theme unless you're willing to de-enqueue and re-enqueue files. I don't minify HTML, it's just a pet peeve of mine for minimal gain. I don't want ugly code in the developer tools.

Caching, G-Zip, & Minification are good. I don't think your setup is problematic, though you might want object caching if you display comments and have things like related posts showing. It'll reduce strain on the server so it's not running to the database each time to grab those.

I'm not a fan of Cloudflare unless you're using higher tiers of their service. Otherwise you end up showing "Please wait while we check your IP address" to users, so they can provide DDOS protection to higher tiers without making their users see that.
 
@Cash Builder, WPX uses Varnish caching, I think. It's why you'll make a change on your website and not be able to see the change push through for 6 minutes or 15 minutes, etc. Feeding them cached versions from W3TC to cache on their side isn't harmful and can reduce the amount of bandwidth they're using from refetching your pages constantly, all day every day (triggered by a user visiting the page... I'm sure it's optimized as much as it can be). The longer expirations of the W3TC cache is good here.

The CDN is probably only serving CSS, JS, and images, so this won't interfere with the others.

If you just want minification you can use something like the Autoptimize plugin but it's not perfect either. The best move is to minify files yourself, but that's not going to happen on a pre-built theme unless you're willing to de-enqueue and re-enqueue files. I don't minify HTML, it's just a pet peeve of mine for minimal gain. I don't want ugly code in the developer tools.

Caching, G-Zip, & Minification are good. I don't think your setup is problematic, though you might want object caching if you display comments and have things like related posts showing. It'll reduce strain on the server so it's not running to the database each time to grab those.

I'm not a fan of Cloudflare unless you're using higher tiers of their service. Otherwise you end up showing "Please wait while we check your IP address" to users, so they can provide DDOS protection to higher tiers without making their users see that.

I actually have Autoptimize installed too, so I'm thinking I don't need that and W3TC. Should I keep Autoptimize for the minification and remove W3TC seeing as I have caching elsewhere?
 
I actually have Autoptimize installed too, so I'm thinking I don't need that and W3TC. Should I keep Autoptimize for the minification and remove W3TC seeing as I have caching elsewhere?

If you're still with WPX, they actually recommend you use W3TC and have a guide for how to set it up to best match their own server configurations: https://wpxhosting.com/knowledgebase/article/43/w3-total-cache-guide/

W3 Total Cache has minification built in. Autoptimize would be doing it twice. I'd get rid of Autoptimize, follow the WPX guide on W3TC, and ignore their suggestion not to minify (and turn it on).
 
Back