The WordPress Heartbeat API sends AJAX requests every 15-60 seconds to sync data between the browser and server. While useful, it can consume massive CPU on shared hosting.
// Reduce Heartbeat frequency
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
Recommendation: Instead of disabling it entirely, use a plugin like ‘Heartbeat Control’ to limit it only to post editing screens, keeping your dashboard fast without breaking autosave.
