• Anonymous User 7944234

    (@anonymized-7944234)


    hello all.

    I have a very long load time for admin-ajax.php in ALL my woocommerce shops.

    I search around the web and i cant find any solution. Does anyone here have any idea what I can do about it?

    This is NOT working for me:

    add_action( ‘init’, ‘my_deregister_heartbeat’, 1 );
    function my_deregister_heartbeat() {
    global $pagenow;

    if ( ‘post.php’ != $pagenow && ‘post-new.php’ != $pagenow )
    wp_deregister_script(‘heartbeat’);
    }

    Thanks a lot in advance

    Greetings from the Netherlands
    Robbie

    https://www.ads-software.com/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • Hi Robbie,

    I have been also having a big problem with the page load speed on one of my woocommerce sites and found that caching plugins (W3 Total Cache and WP Cache) did not play nice with my shop.

    I have been using pingdom to track my page load speed (as well as user testing) and although I haven’t fixed all of my problems yet, the following changes/additions to my child theme functions.php did speed it up considerably.

    1. I deregistered the heartbeat using this code:

    add_action( 'init', 'stop_heartbeat', 1 );
    
    function stop_heartbeat() {
            wp_deregister_script('heartbeat');
    }

    from this site:

    https://www.inmotionhosting.com/support/website/wordpress/heartbeat-heavy-admin-ajax-php-usage

    I did find that it took a little bit of time for that change to show up on pingdom.

    2. Added the code from this site to optimize the WooCommerce scripts: https://wordimpress.com/how-to-load-woocommerce-scripts-and-styles-only-in-shop/

    3. And finally, I spent the bulk of my time adding code that will selectively load my css and js files. I followed the instructions on this page:

    https://www.organizedthemes.com/loading-scripts-conditionally/

    and implemented it for all css and js files that were showing up on pingdom.

    I hope this helps – this is a super frustrating problem to have.

    Ellen

Viewing 1 replies (of 1 total)
  • The topic ‘ADMIN-AJAX slow on all my woocommerce sites.’ is closed to new replies.