Why is my CSS not updating?

If you are not seeing changes that you have applied to your website, you may need to clear your browser cache and/or the CDN cache.

Browser Cache

Browsers can often cache files independently of directives from the server.

If you are adding/modifying in-line CSS or JavaScript and not seeing the changes reflected in the HTML source, the page is likely being cached. The solution may be to purge the WordPress object cache, which stores our page caching (Batcache) renders.

If you are adding/modifying CSS or JavaScript in files, the file itself may be cached. The solution may be to 1) ensure you are properly enqueuing CSS and JavaScript and 2) update the $ver parameter in the wp_enqueue_style() and wp_enqueue_script() functions.

Updating the $ver will force the browser to download the file anew and is a good mechanism to bust not only the browser cache, but the CDN cache as well.

CDN Cache

If the CDN is enabled, static assets will be cached, how Pressable CDN works. If you do not wish to bust the cache with parameters, you should be able to flush the CDN cache and achieve the same effect. (That said, it’s up to the browser to make the request in this case.)

Plugin/Theme Cache

Some plugins and themes include their own caching which can result in changes not being reflected until they are cleared. The most common of these are performance-related plugins and themes such as Divi and Elementor.