I have been struggling with a site that I inherited from another developer.
My main problem is that, changes I make in the css file of the template don't get picked up right away, indicating that some kind of caching is kicking in. What I checked is.
- The .htaccess file for any caching directive.
- Any caching WordPress plugins that might be activated.
- Any caching functionality implemented by the hoster.
- Cloudflare or any other CDN.
- [EDIT] I have tried different browsers and computers so the caching is server side.
As you can imagine none of the above is enabled and yet my changes to the css take some hours to be seen.
I am not a WordPress expert in any way, so I am asking the community of what other caching mechanism I might missing here.
Thanks
wp_enqueue_style( 'theme-style', get_template_directory_uri() . '/style.css' );
and change it towp_enqueue_style( 'theme-style', get_template_directory_uri() . '/style.css', array(), filemtime( get_template_directory_uri() . '/style.css' ) );
. This will change the file version each time you save it, forcing the new version to get loaded.