Just sharing my experience over the yearsā¦
Many different caching plugins get hyped up over the years⦠(but caching is essential).
Switching to a host that does it all for me has been a breath of fresh air, and I only enqueue scripts & styles on pages & post-types that require it.
My first experience of this was @ Pressable.com⦠I had a good experience, but with so many eCommerce plugins I need, the backend was about 2-3s load⦠(they used batcache with memcache)⦠I didnāt like how it took 2 page loads to cache, and would not stay cached all the timeā¦
I then switched to Rocket.net which does full-page cache & object cache (caches after first page load)⦠same site backend is under 1.5s, and front-end is typically 750ms. (So I would assume more powerful CPUā¦)
I do not have any asset management plugins for minifying, etc. (I was manually minifying assets for a bit, but very small gains for work involved).
Iāve found dequeuing assets from plugins has provided the most benefits⦠as many plugins enqueue many scripts & styles on non-relevant pages.
Takes a bit to setup, but donāt have to rely on plugins, and more control. ![]()
Dequeue example:
add_action( 'wp_enqueue_scripts', function() {
if ( !is_admin() ) {
wp_dequeue_style('wcv_vendor_store_style');
}
}
Enqueue Example:
add_action('wp_enqueue_scripts', function() {
if ( is_home() ) {
wp_enqueue_style( 'home-style', get_stylesheet_directory_uri() . '/your/folder/home-example.css' );
}
}
In short: Plugins are annoying. Custom code that sticks to WordPress core Iāve found easier to maintain with less changes⦠(and a host that does both Page & Object Cache, and one less thing to worry about on your site!)
This also goes for firewall & security plugins⦠a host that does it for you has been such a nice approach.