WordPress Instant Support
We can make your website load BLAZING FAST  
LET US FIX IT

👋 Hi... I am Jarrett
I own WP Fix It and I wanted to let you know that we can make your website faster than you can imagine. We can start NOW.
Check it out below.
LEARN MORE

Why Is Woocommerce So Slow and Here Is How To Fix It!

Why is WooCommerce So Slow – Here is how to FIX IT!

With a Plugin Way of Doing It

We have created a plugin called WC Speed Drain.  This plugin stops loading the extra items you do not need on non- WooCommerce pages or posts in your site and speeds up WordPress core admin-ajax.php file. 

You can download this plugin at the link below or simply do this inside your site by being logged into your WordPress administrative area and going to PLUGINS > ADD NEW and search for WC Speed Drain.

https://wordpress.org/plugins/wc-speed-drain-repair

Without a Plugin Way of Doing It

You can take the below code and add this into the functions.php file of your active theme. If you are not sure how to do this, comment below and we will guide you through it.  WE LOVE QUESTIONS!!!

add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );

function child_manage_woocommerce_styles() {
    //remove generator meta tag
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );

    //first check that woo exists to prevent fatal errors
    if ( function_exists( 'is_woocommerce' ) ) {
        //dequeue scripts and styles
        if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
            wp_dequeue_style( 'woocommerce_frontend_styles' );
            wp_dequeue_style( 'woocommerce_fancybox_styles' );
            wp_dequeue_style( 'woocommerce_chosen_styles' );
            wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
            wp_dequeue_script( 'wc_price_slider' );
            wp_dequeue_script( 'wc-single-product' );
            wp_dequeue_script( 'wc-add-to-cart' );
            wp_dequeue_script( 'wc-cart-fragments' );
            wp_dequeue_script( 'wc-checkout' );
            wp_dequeue_script( 'wc-add-to-cart-variation' );
            wp_dequeue_script( 'wc-single-product' );
            wp_dequeue_script( 'wc-cart' );
            wp_dequeue_script( 'wc-chosen' );
            wp_dequeue_script( 'woocommerce' );
            wp_dequeue_script( 'prettyPhoto' );
            wp_dequeue_script( 'prettyPhoto-init' );
            wp_dequeue_script( 'jquery-blockui' );
            wp_dequeue_script( 'jquery-placeholder' );
            wp_dequeue_script( 'fancybox' );
            wp_dequeue_script( 'jqueryui' );
        }
    }
 }

Some Other Snippets Here:

/** Disable Ajax Call from WooCommerce */
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
function dequeue_woocommerce_cart_fragments() { if (is_front_page()) wp_dequeue_script('wc-cart-fragments'); }
 
/** Disable Ajax Call from WooCommerce on front page and posts*/
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
function dequeue_woocommerce_cart_fragments() {
if (is_front_page() || is_single() ) wp_dequeue_script('wc-cart-fragments');
}
 
/** Disable All WooCommerce Styles and Scripts Except Shop Pages*/
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 );
function dequeue_woocommerce_styles_scripts() {
if ( function_exists( 'is_woocommerce' ) ) {
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
# Styles
wp_dequeue_style( 'woocommerce-general' );
wp_dequeue_style( 'woocommerce-layout' );
wp_dequeue_style( 'woocommerce-smallscreen' );
wp_dequeue_style( 'woocommerce_frontend_styles' );
wp_dequeue_style( 'woocommerce_fancybox_styles' );
wp_dequeue_style( 'woocommerce_chosen_styles' );
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
# Scripts
wp_dequeue_script( 'wc_price_slider' );
wp_dequeue_script( 'wc-single-product' );
wp_dequeue_script( 'wc-add-to-cart' );
wp_dequeue_script( 'wc-cart-fragments' );
wp_dequeue_script( 'wc-checkout' );
wp_dequeue_script( 'wc-add-to-cart-variation' );
wp_dequeue_script( 'wc-single-product' );
wp_dequeue_script( 'wc-cart' );
wp_dequeue_script( 'wc-chosen' );
wp_dequeue_script( 'woocommerce' );
wp_dequeue_script( 'prettyPhoto' );
wp_dequeue_script( 'prettyPhoto-init' );
wp_dequeue_script( 'jquery-blockui' );
wp_dequeue_script( 'jquery-placeholder' );
wp_dequeue_script( 'fancybox' );
wp_dequeue_script( 'jqueryui' );
}
}
}

Hope this was helpful and GET READY FOR SOME SPEED!!!

Never again with you ask “Why is WooCommerce So Slow”.

24 Comments

  • Hi

    I would like to remove geolocation from the main page only – how do I do that? it causes extra 5 seconds of delay and I only really need this on woocommerce pages.

    Reply
    • We can help with a support ticket at the link below.

      https://www.wpfixit.com/product/fix-it-ticket/

      Reply
  • I have the Enfold theme, it has been slow for quite a while but more recently
    the safari browser has been extremely slow to load menus and text on front and shop pages. Do you know of a fix for this.?

    Reply
    • We can fix it with the service at the link below.

      https://www.wpfixit.com/product/wp-sup/

      Reply
  • thanks WP Fixit … if you are interested you can try our free plugin to disable all Woo styles in one click, for websites that want to keep all the styles in style.css file only (you know what I mean)

    https://wordpress.org/plugins/disable-wc-styles-littlebizzy/

    Reply
    • Yes at the link below. Make sure to click on the “ENTIRE INTERNET” tab. Guess you do not believe us uh. We do not make things up here in our articles.

      https://trends.builtwith.com/shop

      Reply
  • Once I install it, do I need to do anything, or does the plugin run in the background once activated?
    Thanks

    Reply
  • Hey guys,

    thanks for creating the plugin. I think it is helping speeds a bit.

    The issue is now add to cart is not working on my home page.

    Any ideas?

    Reply
  • My page instantly slows down by about 8-10 seconds when Jetpack is enabled – and I need jetpack for WooCommerce. Any suggestions to help me out with this issue?

    Reply
    • Did you know we have a special product made to get your site blazing fast and deal with speed issues? See full details at https://www.wpfixit.com/product/wp-sup/

      Reply
  • Please on which section of function.php should the snippet be pested

    Reply
  • Good and useful tutorial . Also cache plugins for WordPress could help to speed up WooCommerce website

    Reply
  • This… actually worked lol, got the page load from 11s to 4s, I’ll have to look for how to get from 4 to like 1 maximum but still you guys are awesome.

    Reply
  • Hello, I have tried it and it improved my performance a lot, congratulations

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *