The WordPress Heartbeat API: What It Is and Why It Might Be Slowing You Down

by dotCanada Team
The WordPress Heartbeat API: What It Is and Why It Might Be Slowing You Down

If you've ever noticed your wp-admin feeling sluggish, or seen unusually high CPU usage on your hosting account while editing posts, there's a reasonable chance the WordPress Heartbeat API is involved. It's one of those features that runs quietly in the background - useful by design, but easy to misconfigure or leave running at a rate that hurts performance.

Here's what you need to know.

What Is the Heartbeat API?

The WordPress Heartbeat API was introduced in WordPress 3.6. At its core, it's a browser-to-server communication mechanism. While you're logged into wp-admin, your browser periodically sends an AJAX request to the server. The server responds, and your session stays alive.

That pulse serves several purposes:

  • Autosave - your post drafts are saved automatically every 60 seconds
  • Post locking - when multiple users are logged in, WordPress can warn you if someone else is editing the same post
  • Dashboard widget refresh - some dashboard elements use Heartbeat to stay current
  • Plugin communication - some plugins hook into Heartbeat to send/receive data without requiring a page reload

By default, the Heartbeat fires once every 15 seconds in the post editor, and once every 60 seconds elsewhere in wp-admin. On the front end of your site, it's disabled unless a plugin has specifically enabled it there.

Why Can It Cause Problems?

The issue is AJAX requests. Each Heartbeat pulse triggers a POST request to wp-admin/admin-ajax.php. On shared hosting, every one of those requests spawns a PHP process. On a busy site - or one with multiple logged-in editors - those requests add up fast.

Typical symptoms of Heartbeat-related performance problems:

  • High CPU usage showing up in cPanel or your hosting dashboard during editing sessions
  • Slow page saves in Gutenberg or the Classic Editor
  • Server hitting resource limits (especially on entry-level shared hosting)
  • Hosting providers warning you about excessive server load

The problem is compounded when plugins hook aggressively into the Heartbeat API, or when the frequency has been increased (some plugins do this without obvious disclosure).

How to Check If Heartbeat Is the Culprit

Open your browser's developer tools (F12) while logged into wp-admin. Go to the Network tab, filter by XHR or Fetch, and watch for repeated requests to admin-ajax.php. If you see them firing every 15 seconds, that's the Heartbeat. Check the response payload size - if plugins are piggybacking a lot of data onto each pulse, that compounds the load.

Configuring the Heartbeat API

You have three main options: reduce the frequency, disable it in specific contexts, or disable it entirely. The cleanest way to do this is with the Heartbeat Control plugin by WP Rocket (free). It gives you a UI to:

  • Disable Heartbeat on the front end
  • Disable Heartbeat in wp-admin
  • Disable Heartbeat in the post editor
  • Reduce the frequency (e.g., from 15 seconds to 60 seconds)

For most sites, the right configuration is: disabled on the front end, reduced to 60 seconds in wp-admin, and left at default in the post editor (so autosave still works reliably).

If you prefer to handle it in code, add this to your theme's functions.php or a site-specific plugin:

add_filter( 'heartbeat_settings', function( $settings ) {
    $settings['interval'] = 60; // seconds
    return $settings;
} );

To disable Heartbeat entirely on the front end:

add_action( 'init', function() {
    if ( ! is_admin() ) {
        wp_deregister_script( 'heartbeat' );
    }
} );

What You Shouldn't Disable

Be careful about disabling Heartbeat in the post editor completely. Autosave depends on it. If you're writing a long post and your browser crashes, WordPress can only recover unsaved work if Heartbeat was running. For most solo-operated sites, reducing the frequency to 60 seconds is a reasonable compromise - you get autosave protection without hammering the server.

Post locking is another consideration if you have multiple editors on one site. Disabling Heartbeat means two people could edit the same post simultaneously without any warning.

The Bottom Line

The WordPress Heartbeat API is a legitimate feature that solves real problems. But its default 15-second interval is aggressive for shared hosting environments, and plugins that hook into it carelessly make things worse. Take five minutes to install Heartbeat Control, review your settings, and reduce the frequency. On most sites, you'll see a measurable reduction in server resource usage with zero impact on your editing experience.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today