WordPress Disable Heartbeat: Cutting Background API Calls

WordPress’s Heartbeat API polls your server in the background (commonly every 15 seconds) to power features like post auto-save, revision locking, and live admin notifications. On some sites this shows up as admin-ajax.php taking a long time to respond in speed-test tools like Pingdom — and if it’s contributing meaningfully to your load time, it’s […]

Wordpress Completely Disable Heartbeat Control

WordPress’s Heartbeat API polls your server in the background (commonly every 15 seconds) to power features like post auto-save, revision locking, and live admin notifications. On some sites this shows up as admin-ajax.php taking a long time to respond in speed-test tools like Pingdom — and if it’s contributing meaningfully to your load time, it’s worth tuning or disabling.

Option 1: Slow it down instead of disabling it

If you have multiple administrators actively editing content at the same time, disabling Heartbeat entirely isn’t a good idea — you’d lose the auto-save/lock protections that stop two people overwriting each other’s edits. Instead, install the Heartbeat Control plugin and set the interval to something longer, like 60 seconds, rather than the default 15.

Option 2: Disable it completely

If you’re the only person editing your site, you can disable the Heartbeat AJAX calls entirely. Back up your site before editing theme files — a mistake here can take your site down.

  1. In your WordPress admin, go to Appearance > Theme Editor and open your active theme’s Theme Functions (functions.php) file.
  2. Add the following code immediately after the opening <?php tag:
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
  1. Click Update File.

Important: if you’re currently using the Heartbeat Control plugin (or any other heartbeat-modifying plugin), disable and remove it first — running both approaches together can crash your admin area.

A safer alternative to editing functions.php directly is adding this same snippet via a child theme’s functions.php, or a lightweight “code snippets” plugin — either avoids the risk of losing the change on a theme update.

Resources

🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.

3 thoughts on “WordPress Disable Heartbeat: Cutting Background API Calls

  1. Can the heartbeat control plugin be used in any way to speed up the wordpress dashboard? IF so, what what you recommend for a rule?

  2. Can the heartbeat control plugin be used in any way to speed up the wordpress dashboard? IF so, what what you recommend for a rule?

  3. Can the heartbeat control plugin be used in any way to speed up the wordpress dashboard? IF so, what what you recommend for a rule?

Comments are closed.