WooCommerce Tweaks: How to Disable Blocks Stylesheet in WordPress

WooCommerce is a powerful eCommerce solution for WordPress, offering various features and design elements to enhance online stores. One of these features is the WooCommerce Blocks plugin, which provides customizable blocks for product displays, checkout pages, and more. However, the WooCommerce Blocks stylesheet (wc-blocks-style.css) is automatically loaded on all pages, even those that don’t utilize WooCommerce blocks. This can lead to performance issues, unnecessary resource loading, and conflicts with custom styling set in the active theme.
If you’re wondering whether you should disable the WooCommerce Blocks stylesheet globally, here are many reasons it might be beneficial.
1. Improve Page Load Speed
Every additional CSS file loaded on your website increases the amount of data that must be processed by the browser. If you’re not using WooCommerce Blocks extensively, keeping the stylesheet enabled adds unnecessary weight to your site, slowing down page load times. Disabling it helps optimize performance and enhances user experience, particularly for visitors on slower connections or mobile devices.
2. Reduce Unused CSS for Better Performance Scores
Performance measurement tools like Google PageSpeed Insights, GTmetrix, and Lighthouse flag unused CSS as an issue. Since WooCommerce Blocks’ stylesheet is often loaded on all pages regardless of necessity, it contributes to “unused CSS,” which negatively affects your site’s performance scores. By disabling it, you can achieve a leaner, more optimized website with better performance metrics.
3. Avoid CSS Conflicts with Custom Styling
Many WooCommerce store owners and developers customize their store’s appearance using custom CSS or third-party themes. The default WooCommerce Blocks stylesheet may override these custom styles, causing design inconsistencies. Disabling it allows you to have full control over your site’s styling without interference from unnecessary default styles.
4. Minimize HTTP Requests
Reducing the number of HTTP requests is a key strategy for improving site speed. Each additional stylesheet requires an HTTP request, adding latency to the page load process. If your site doesn’t rely on WooCommerce Blocks, disabling its stylesheet eliminates an extra request, streamlining resource loading.
5. Enhance Server Efficiency
Every optimization counts if you’re hosting your WooCommerce store on a shared or limited-resource server. Disabling unused style sheets reduces server load and processing time, ensuring better performance under heavy traffic conditions. This is especially useful for large stores with high traffic volumes.
How to Disable the WooCommerce Blocks Stylesheet Globally
If you’ve determined that disabling the WoCommerce Blocks stylesheet is beneficial for your site, you can do so using a code snippet. MainWP provides a solid extension for managing code snippets, which allows you to save and execute code snippets on connected sites.
This snippet disables the WooCommerce Blocks stylesheet from loading across your site. Always test changes on a staging environment before applying them to your live site to prevent potential issues.
Disabling the WooCommerce Blocks stylesheet globally can improve site performance, reduce conflicts, and give you greater control over styling. However, if you actively use WooCommerce Blocks on your store, consider selectively disabling the stylesheet on specific pages instead of removing it completely. By optimizing how styles are loaded, you ensure a faster, more efficient online store while maintaining the desired functionality.
Useful Links
https://wordpress.org/support/topic/default-stylesheets-cant-be-disabled
https://community.mainwp.com/t/disable-the-block-styles-in-woocommerce/10009
Share
Manage Unlimited WordPress Sites from One Dashboard!
- Privacy-first, Open Source, Self-hosted
- Easy Client Management
- 15+ & 30 + Premium Add-ons
- Bulk Plugins & Themes Management