• Hi,

    admin-ajax.php is being called on all my pages whereas there is no need for it. This slows down my site a lot.

    looking for solution I found a php function to disable it but on my site it does not disable anything. All topics on the subject have been closed but there does not seem to be a satisfactory solution.
    Could you please tell me what is wrong in the disabling code ? Or how I can find a hack around this problem ?
    Thanks a lot.
    Lyam
    ` /* WordPress Heartbeat Modification Code*/

    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’);
    } `

  • The topic ‘Admin-ajax.php slowing my site’ is closed to new replies.