Title: Kill Heartbeat
Last modified: August 21, 2016

---

# Kill Heartbeat

 *  [derek53](https://wordpress.org/support/users/derek53/)
 * (@derek53)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/kill-heartbeat/)
 * Hostgator in responding to issues over Heartbeat suggested I add the following–
 * add_action( ‘init’, ‘kill_heartbeat’, 1 );
    function kill_heartbeat() { global
   $pagenow; wp_deregister_script(‘heartbeat’); } A good bit of controvery is where
   to add this. I dug through more the coding, and I found the answer is two places.
   One being the functions.php file of the current theme, and one being within the
   wp-includes/plugin.php file. This ensures it always is working, regardless of
   what is called. The functions.php file of the them “might” be good enough. But
   I found it sometimes is not. The plugin.php is something always called, so that
   is a safe bet to run it. Since you cannot call a deregister function twice, you
   will probably want to place it somewhere that is called quite often. The theme’s
   functions.php is called 90% of the time on the site, as is the plugin.php of 
   the wp-includes folder. My go-to (as it were) is the theme’s functions.php, but
   if that doesn’t work for you (or the theme doesn’t have one), then the wp-includes/
   plugin.php should work just fine.

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/kill-heartbeat/#post-5068570)
 * Never de-register core WordPress scripts! I think your hosts gave you some pretty
   bad advice and you need to go back to them about this.

Viewing 1 replies (of 1 total)

The topic ‘Kill Heartbeat’ is closed to new replies.

## Tags

 * [heartbeat](https://wordpress.org/support/topic-tag/heartbeat/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/kill-heartbeat/#post-5068570)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
