How To

How to Control WordPress Heartbeat API and Stop Admin Slowdowns

Heartbeat runs every 60 seconds in core, not 15. How to set a floor, quiet admin screens and find what loads it on the front end. Checked 16 Nov 2026.

Shashank Dubey
·12 min read
Heartbeat pulse line above three cards: 60 seconds default admin tick, 10 seconds post editor, 120 seconds idle tab

The WordPress Heartbeat API is a browser-to-server poll that sends a POST request to wp-admin/admin-ajax.php on a timer. It is not a 15-second loop on every page, as many guides still say. In current WordPress core the default interval is 60 seconds, the post editor speeds it up to 10 seconds so post locks stay fresh, and an idle admin tab slows to 120 seconds and then suspends. To cut the load safely, set a floor with the minimalInterval option, switch off the login check on admin screens that do not need it, and find out which plugin loads Heartbeat on your front end before you remove anything. We read the Heartbeat script and the PHP around it in WordPress core (trunk, version 7.2 Beta 5) on 16 November 2026, and several numbers in older versions of this article did not survive that check.

No search queries have been recorded for this page yet, so the headings follow what people ask when admin-ajax.php starts to hurt: how often it runs, whether it is safe to disable, how to slow it, why it still fires after a tweak, and what breaks if you overdo it.

What is the Heartbeat API and how often does it run?

It is a small JavaScript loop in wp-includes/js/heartbeat.js. On each tick it posts to admin-ajax.php with action=heartbeat, lets any code attach data through the heartbeat-send browser event, and passes the server’s reply to code listening for heartbeat-tick. On the PHP side, the wp_ajax_heartbeat handler applies the heartbeat_received filter (only when the browser sent data), then the heartbeat_send filter (on every tick), then fires the heartbeat_tick action. Plugins use those hooks to piggyback their own checks. Core itself uses it for post locks, the editor’s autosave in the classic editor, the session-expired login dialog and nonce refreshes.

The interval is not one number. This is what the core source sets today:

Where

What loads Heartbeat

Interval in core

Most admin screens

The login check script, which depends on Heartbeat

60 seconds

Posts and pages list

The list screen enqueues it for post lock checks

60 seconds

Block editor

The editor page enqueues it and sets a faster rate

10 seconds

Classic editor with a lock dialog

post.js sets a faster rate

10 seconds

Public pages

Nothing in core; only a theme or plugin that enqueues it

Not running unless added

Checked on 16 November 2026 in heartbeat.js, edit-form-blocks.php, post.js, edit.php, customize.php and functions.php on the core trunk branch.

Two more behaviours matter for the load you see in the Network panel. When the tab has had no mouse or keyboard activity for five minutes, the script slows to one request every 120 seconds, a rate chosen because (a comment in the source says) post locks expire after 150 seconds. After ten minutes of inactivity it suspends entirely, except on the post editor screens where core turns suspension off. So an admin tab left open overnight does not poll all night, and the steady 10-second rhythm only exists while somebody is actually in the editor.

The Heartbeat settings object is built by the heartbeat_settings filter and printed into the page as heartbeatSettings. Core’s own callbacks add the AJAX URL and a nonce, and switch suspension off on the post editor. The script reads two options from that object that matter to us: interval (accepted from 1 to 3600 seconds) and minimalInterval (a floor, accepted from 1 to 600 seconds, which the script says cannot be changed after start-up). The official Heartbeat API handbook page speaks of ticks “every 15-120 seconds”, so keep your own settings inside that documented range even though the script is more permissive.

Does Heartbeat really slow down my admin?

Sometimes. Each tick is a normal PHP request. admin-ajax.php loads WordPress, runs your active plugins’ load code, answers, and exits. One tick is cheap. The cost appears when many tabs are open at once on a host with a low limit on concurrent PHP workers, or when a plugin hooks heartbeat_received and does heavy work on every tick. Hosting companies describe the same pattern: regular POSTs to admin-ajax.php from open admin tabs that add up against a CPU quota. Those posts are vendor advice rather than measurements of your site, so measure first.

We are deliberately not giving a number for “how many milliseconds a Heartbeat request costs”. The earlier version of this page listed per-plugin timings, and we could not trace them to a source. The cost is whatever your stack makes it, so the next section shows how to read it from your own site.

How do I see what Heartbeat is doing on my site?

Use the browser’s Network panel. Open any admin screen, filter requests by admin-ajax.php, and look for POSTs whose form data has action set to heartbeat. Note three things: how often the requests arrive on a dashboard page versus the editor, how long each one takes, and how large the response is. If the response carries large blocks you did not expect, a plugin is adding data through heartbeat_received.

Server logs are less useful than most guides claim. The action name travels in the POST body, so an ordinary access log shows only a line for each POST to admin-ajax.php, and you cannot tell Heartbeat from other AJAX calls unless you log request bodies. Count them anyway to see the trend before and after a change.

For the PHP side, Query Monitor shows queries, hooks and scripts for a page, and our Query Monitor developer tutorial explains how to read its panels. If the slow part is a plugin’s own AJAX call rather than Heartbeat, our guide to debugging admin-ajax.php walks through isolating it.

What does one Heartbeat request do on the server?

It is a full WordPress request with a short job. We read wp_ajax_heartbeat() in core. It refuses the request if the nonce is missing, then checks the heartbeat-nonce value. If the nonce has expired it adds a flag to the response and stops there, which is how the browser learns that it must refresh its nonces. Otherwise it reads the screen ID the browser sent (front when none was sent), unpacks any submitted data, and runs the filters in this order: heartbeat_received if data arrived, then heartbeat_send, then the heartbeat_tick action. It finishes by adding the server time to the response.

Core’s own callbacks are light. They look up post locks, compare an autosave, and refresh the login check. The weight on a given site comes from the hooks other code adds. A plugin that runs a database query inside heartbeat_send pays for it on every tick, for every open tab, on every screen where Heartbeat is loaded. The filter receives the screen ID for exactly this reason, so use it to return early.

How do I add my own data to Heartbeat without slowing it?

Return early everywhere you can, send small values, and cache anything that needs a query. The example sends a count from a transient on one screen only. It uses the screen ID that the filter gives you, and it does no work on any other screen.

<?php
/**
 * Add a cached pending-orders count to Heartbeat on one screen only.
 * File: /wp-content/mu-plugins/heartbeat-pending-count.php
 */
defined( 'ABSPATH' ) || exit;

add_filter(
	'heartbeat_send',
	static function ( array $response, string $screen_id ): array {
		if ( 'dashboard' !== $screen_id || ! current_user_can( 'manage_options' ) ) {
			return $response; // No work on any other screen.
		}

		$count = get_transient( 'my_pending_count' );

		if ( false === $count ) {
			$count = my_expensive_pending_count(); // Your own query; runs at most once a minute.
			set_transient( 'my_pending_count', (int) $count, MINUTE_IN_SECONDS );
		}

		$response['my_pending_count'] = (int) $count;

		return $response;
	},
	10,
	2
);

The function name my_expensive_pending_count() stands for whatever query you need, and the hook name and argument order come from the core handler above. On the browser side, read the value in a heartbeat-tick listener. A transient is the right tool here because the value is short-lived and cheap to rebuild, and the one-minute expiry means a dashboard with ten tabs open runs the query once, not ten times per tick.

If you cannot return early and cannot cache, that is a sign the feature does not belong on Heartbeat. A purpose-built request that fires on a user action costs far less than a timer that fires whether or not anything changed.

How do I slow Heartbeat without breaking post locks?

Set a floor with minimalInterval. This is the part most guides get wrong. They set interval in the heartbeat_settings filter and expect the editor to slow down. But the block editor runs wp.heartbeat.interval( 10 ) after the page loads, which replaces the main interval. The script applies minimalInterval inside that same function, so a floor survives where a plain interval does not.

<?php
/**
 * Slow Heartbeat everywhere to no faster than once a minute.
 * File: /wp-content/mu-plugins/heartbeat-floor.php
 */
defined( 'ABSPATH' ) || exit;

add_filter(
	'heartbeat_settings',
	static function ( array $settings ): array {
		$settings['interval']        = 60; // Default tick.
		$settings['minimalInterval'] = 60; // Floor, also binds the editor's 10-second request.
		return $settings;
	}
);

Do not pick a floor above about two minutes. Core checks a post lock against a window of 150 seconds (the wp_check_post_lock_window filter, default 150). Heartbeat refreshes the lock on each tick, so if ticks come further apart than the window, a lock can expire while someone is still typing, and a second editor is no longer warned. A 60-second floor leaves plenty of room. A floor of 120 is the largest we would use on a multi-author site.

The code above is valid PHP 8.1 (php -l, checked 16 November 2026). We confirmed the filter, the two option names and the clamping behaviour in the core source, and we have not measured the server-load effect on a live site, because it depends entirely on how many tabs you have open.

How do I turn Heartbeat off on screens that do not need it?

Do not deregister the script on admin pages. Deregistering heartbeat breaks the things that depend on it: the login check script depends on it, the Posts list enqueues it for lock checks, and the editor needs it. The cleaner method is to stop the login check from loading on screens where you do not want it, because on most admin screens that script is the only thing pulling Heartbeat in.

Core exposes a filter for this, wp_auth_check_load. It receives a boolean and the current screen object, and returning false stops the login check from loading. Because Heartbeat arrived only as its dependency, Heartbeat is not loaded either.

<?php
/**
 * Stop the login check (and so Heartbeat) on quiet admin screens.
 * File: /wp-content/mu-plugins/heartbeat-quiet-screens.php
 */
defined( 'ABSPATH' ) || exit;

add_filter(
	'wp_auth_check_load',
	static function ( $show, $screen ) {
		$quiet = array( 'upload', 'plugins', 'themes', 'options-general', 'tools' );

		if ( $screen instanceof WP_Screen && in_array( $screen->id, $quiet, true ) ) {
			return false;
		}

		return $show;
	},
	10,
	2
);

The cost is real, and you should read it before you ship the snippet. On those screens the “your session has expired, log in again” dialog no longer appears, so a user whose session ends is not prompted until they submit something. For an administrator who sits on the Plugins screen, that is a fair trade. For a client who edits settings for an hour, it may not be. Screen IDs for core pages are the page’s slug, for example upload for the Media Library and plugins for the Plugins page. Plugin screens have longer IDs, which you can print by dumping $screen->id on the page you care about.

If you want a rule for the dashboard too, add dashboard to the list, but first check that no plugin widget there relies on Heartbeat for live data. The Customizer also enqueues Heartbeat (for changeset locks), so leave it alone.

How do I stop Heartbeat on the front end?

First find out whether it is running at all. Core does not load Heartbeat on public pages, and the login check hook is registered for the admin only. If you see action=heartbeat requests while browsing the front end, a theme or plugin has enqueued the script, or enqueued another script that lists it as a dependency. Removing the right thing needs a name. This temporary snippet logs which scripts depend on Heartbeat on pages where it ran:

<?php
/**
 * Temporary: log which scripts pull in Heartbeat on the front end.
 * File: /wp-content/mu-plugins/heartbeat-who.php  (delete when done)
 */
defined( 'ABSPATH' ) || exit;

add_action(
	'wp_print_footer_scripts',
	static function (): void {
		if ( is_admin() || ! wp_script_is( 'heartbeat', 'done' ) ) {
			return;
		}

		$scripts = wp_scripts();
		$who     = array();

		foreach ( $scripts->done as $handle ) {
			if ( isset( $scripts->registered[ $handle ] ) && in_array( 'heartbeat', $scripts->registered[ $handle ]->deps, true ) ) {
				$who[] = $handle;
			}
		}

		error_log( 'Heartbeat loaded by: ' . ( $who ? implode( ', ', $who ) : 'direct enqueue' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
	},
	11
);

Priority 11 matters: core prints the footer scripts at priority 10, so the “done” list is complete by the time this runs. Once you know the owner, the correct fix is usually a setting in that plugin. If there is none, deregister Heartbeat on public pages only:

<?php
add_action(
	'wp_enqueue_scripts',
	static function (): void {
		wp_deregister_script( 'heartbeat' );
	},
	100
);

Test the feature that needed Heartbeat after you ship this. WordPress skips a script whose dependency is not registered, so a plugin script that declared Heartbeat as a dependency will silently stop loading, and whatever it did on that page stops with it. A chat widget or a live notification badge is the usual casualty. This is why we do the diagnostic step first, and why this snippet is the last resort rather than the first.

How do I change how often autosave runs?

Use the AUTOSAVE_INTERVAL constant. Core defines it as 60 seconds (MINUTE_IN_SECONDS) in default-constants.php unless you define it first, and both the editor settings and the autosave script read it. Put your own value in wp-config.php, above the “stop editing” line.

// wp-config.php: autosave every two minutes instead of one.
define( 'AUTOSAVE_INTERVAL', 120 );

In the classic editor, autosave rides on the Heartbeat tick, so its real rate cannot be faster than your Heartbeat interval. In the block editor, autosave runs through the REST API, which core exposes at the posts autosaves route, while Heartbeat there is mainly responsible for post locks. The two settings are related but separate, so lengthening one does not change the other.

Should I use a plugin or the mu-plugin code?

Code is the smaller footprint for a single site. A plugin is easier to hand to a client who will never edit PHP. The choice depends on who maintains the site, not on performance.

Option

Strength

Watch out for

mu-plugin with the filters above

No settings screen, lives in version control, loads before regular plugins

Someone has to edit PHP to change it

Heartbeat Control (WP Media)

Per-location settings in a screen: dashboard, editor, front end

See the listing facts below

Caching or optimization plugin that includes a Heartbeat setting

One less plugin if you already run it, for example Super Page Cache lists reduced and disabled modes

Read what its “disabled” mode does to the editor

Host-level control

Applied outside WordPress

Ask the host what it changes before you add your own

The WordPress.org listing for Heartbeat Control, published by WP Media, showed on 16 November 2026: version 2.0.1, last updated 31 August 2023, “tested up to” WordPress 6.3, more than 70,000 active installs, and a rating of 84 out of 100 from 68 ratings. Its description says requests fire every 15 seconds on post edit pages and every 60 on the dashboard, while the current core source sets the editor to 10 seconds, so treat the description as out of date. A plugin that has not been updated for three years of WordPress releases is not wrong by definition, but test it on staging before you rely on it.

Which setting fits which kind of site?

These are starting points based on how the features work, not benchmarks. Change one thing at a time and check the Network panel.

Site

Floor on interval

Quiet screens

Notes

Single author, no plugin uses Heartbeat

60 to 120 seconds

Media, plugins, themes, settings

Post locks matter little with one editor

Several editors on the same posts

60 seconds

Media, plugins, themes

Keep locks reliable, never above 120

Store with managers on the orders screen

60 seconds

Only screens you checked

Some order or stock widgets use Heartbeat; check the page first

Client-managed membership site

60 seconds

None at first

Non-technical users depend on the session-expired dialog

Site on a managed host

Leave default

None

Many hosts already tune it; ask before adding your own layer

For multisite, a mu-plugin in wp-content/mu-plugins/ loads for every sub-site without activation, which is the easiest way to apply one floor across the network. Each sub-site’s admin still polls independently, so the load is the sum of open tabs across the network. If you keep snippets in version control instead of the database, our write-up on where WordPress snippets should live explains why that matters for restores.

Common mistakes people report

These are the recurring problems from documentation, Trac and host guides. We checked every link on 16 November 2026.

  1. Disabling Heartbeat in the post editor. Super Page Cache’s own Heartbeat setting guide warns that this also turns off autosave and post locking, and that on multi-author sites it can cause lost work or overwritten edits. Reduce the rate instead.
  2. Expecting “disabled” to remove the content-locked dialog. A WordPress Trac ticket (#41903, “Unable to deactivate Heartbeat API”) was closed as invalid after a reply explained that disabling Heartbeat does not remove the “currently locked” dialogs, and that Heartbeat also supports autosave and authentication checks. The lock itself is stored in post meta, not in the browser.
  3. Setting only interval and expecting the editor to follow. The editor’s 10-second request replaces it. The floor option is the working lever, as the core editor file shows.
  4. Deregistering the script on admin pages. The login check and the post list depend on it. Use the screen filter shown above instead.
  5. Following guides that say the default is 15 seconds. The current Heartbeat script starts at 60. Numbers copied from older posts lead to tuning you did not need.
  6. A floor above the lock window. A floor longer than 150 seconds lets locks expire mid-edit, so keep it at 120 or below.

Frequently asked questions

Is it safe to disable the WordPress Heartbeat API completely?

You can, but you give up post locking, session-expired warnings, autosave in the classic editor and any plugin feature that rides on it. On a single-author site that may be acceptable. On a site with several editors it is not worth the saving. Throttle instead.

What is the default Heartbeat interval?

Sixty seconds in the core script. The post editor sets 10 seconds while someone is editing. Unfocused tabs slow to 120 seconds after five minutes of inactivity and suspend after ten, except on the editor.

Why is admin-ajax.php using so much CPU?

Heartbeat is one cause. Plugins that run their own AJAX calls are another. Open the Network panel, filter on admin-ajax.php, and check the action value of the busiest requests before you change anything.

Does Heartbeat run on the front end of my site?

Not from core. If it does, a theme or plugin enqueued it. Use the logging snippet above to find which.

Does lowering the Heartbeat rate affect the block editor’s autosave?

Only indirectly. Block editor autosave runs through the REST API on its own schedule from AUTOSAVE_INTERVAL. Heartbeat there mainly refreshes post locks.

Will this work with a page builder or a headless front end?

The filters act on the WordPress admin and on whatever scripts WordPress prints. A headless front end does not load Heartbeat at all. A builder that loads its own editor may enqueue Heartbeat itself, so test its editing screen after you change settings.

What to do next

Open the Network panel on your busiest admin screen and note how many Heartbeat requests arrive per minute. Add the floor snippet, reload, and compare. If a background job rather than Heartbeat is the real load, our guide to monitoring WP-Cron and Action Scheduler failures covers the next place to look.

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com