Hello,
Please try the solution described here: https://www.inmotionhosting.com/support/website/wordpress/heartbeat-ajax-php-usage
Thank you. Regards, Eva Kemp.