How To Disable The WordPress Heartbeat API (The Easy Way)

The WordPress Heartbeat API should usually be disabled because it consumes server resources.

The easiest way to disable WordPress Heartbeat is to install the Heartbeat Control plugin, view the settings, and modify the Heartbeat interval in the dashboard, frontend, or post editor, or disable it completely. Other methods include adding a few lines of code to your functions.php file or using a plugin that already has an disable Heartbeat option like WP Rocket or LiteSpeed.

At the cost of server resources, the Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the browser. In turn, it is able to show you real-time plugin notifications, when other users are editing a post (this sends a request every 15 seconds), and other unneeded features.

What Does The WordPress Heartbeat API Do?

  • Shows real-time plugin notifications
  • Shows when other users are editing a post
  • Shows when users are locked out for being idle
  • Creates periodic auto saves, drafts, and revisions
  • Shows real-time sales data when using eCommerce plugins

Important: always make sure you save your drafts when editing! If you disable the Heartbeat API and have auto drafts and post revisions turned off, you could risk losing all your hard work.


1. Install The Heartbeat Control Plugin

The easiest way to disable the WordPress Heartbeat API is with the Heartbeat Control plugin. Once installed, go to the General Settings and you can disable Heartbeat in the WordPress dashboard, frontend, and the post editor. Ideally, it is recommend you disable it everywhere.

Disable Heartbeat

If you don’t want to disable Heartbeat and limit it instead, you can modify Heartbeat and choose your own intervals. By default, the WordPress heart beats once every 15 seconds.


2. Manually Disable The WordPress Heartbeat API

To disable the WordPress Heartbeat API without a plugin, go to Appearance > Theme Editor, then edit the functions.php file of your theme. Next, paste the code right after the <?php tag:

Disable WordPress Heartbeat Manually

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {


3. Disable Heartbeat With WP Rocket

If you’re already using WP Rocket, they also have an option to disable or limit Heartbeat. One major advantage of WP Rocket is that it comes with more built-in speed optimizations than other cache plugins. This not only means less plugins running on your WordPress site, but better speed optimizations and GTmetrix scores. That’s why it’s usually #1 in Facebook polls.

WP Rocket Heartbeat Control Settings


4. Disable Heartbeat With Perfmatters

You can also use the Perfmatters Plugin (by Kinsta) to disable the WordPress Heartbeat. This plugin also lets you selectively disable plugins, scripts, and styles from loading on certain pages, limit post revisions, and disable many unnecessary things in the WordPress admin. I use it on my own website and like to say “it takes care of the last 10% of your WordPress speed.”

Permatters Heartbeat Control Settings


5. Disable Heartbeat With Clearfy

Clearfy does little bits of speed optimization, security, and SEO.

They also have an option to disable Heartbeat, but it also does a good job of cleaning up trash in your WordPress admin. Take a look at the plugin page as it has many “miscellaneous features” that can help your fix a slow WordPress site and improve both your security + SEO.

Clearfy Disable Heartbeat Control


What’s Next?

I have some great resources on WordPress speed optimization:

And many more which you can find below.

Hope this was helpful! Comment if you need any help at all.


About Tom Dupuis

Tom Dupuis 2017Tom Dupuis writes WordPress speed and SEO tutorials out of his apartment in Denver, Colorado. In his spare time, he plays Rocket League and watches murder documentaries. Read his bio to learn 50 random and disturbing things about him.

Notify of
Inline Feedbacks
View all comments