Below is the code to deactivate WordPress Heartbeat API.
<?php | |
//* Deactivate WordPress Heartbeart API | |
function stop_heartbeat() { | |
wp_deregister_script('heartbeat'); | |
} | |
add_action('init', 'stop_heartbeat', 1); |
Alternatively, if you don’t want to deactivate WordPress Heartbeat API but prefer to limit it, then you can download and install Heartbeat Control from the WordPress Plugin Repository.