What the Heartbeat API does
The Heartbeat API, added in WordPress 3.6, is a logged-in browser timer. The heartbeat script sends a POST to admin-ajax.php with the action set to heartbeat, waits, then sends another.
On the post editor the tick is 15 seconds. On the dashboard, and on the front end when the script is loaded, core already uses 60 seconds. The script will not run faster than every 15 seconds, and it pulls an interval above 120 seconds back down to 120.
| Screen | Default tick | What to change |
|---|---|---|
| Post editor | 15 seconds | Raise it to 60 seconds |
| Dashboard | 60 seconds | Leave it, or turn Heartbeat off |
| Front end | 60 seconds, if the script loads | Deregister the script |
- Classic Editor autosave uses that tick.
- The notice that someone else has the post open uses it, in both editors.
- The wp-admin warning that your login is about to expire uses it.
- Some plugin notices that refresh without a reload use it too.
The block editor also saves through the REST API on AUTOSAVE_INTERVAL, which defaults to 60 seconds. Slowing Heartbeat does not remove that REST autosave.
When Heartbeat hurts CPU on shared hosting
Each tick loads WordPress and the active plugins. admin-ajax.php is a POST, so a page cache does not store it. One person editing is cheap. Several people with posts open multiply the 15-second tick.
On WordPress hosting those PHP processes also answer visitors. A worker spent on Heartbeat is not building a page. The dashboard gets slow, and a full account can return a 503, while the public site still looks quiet.
Heartbeat is not WP-Cron. Cron runs scheduled jobs when a page loads, or when a server cron calls wp-cron.php. Heartbeat runs only while a logged-in tab stays open. Stopping one leaves the other in place.

A page cache or a Redis object cache does not absorb this POST. They help ordinary page views, which is a separate job from Heartbeat.
How to confirm the admin-ajax.php call is Heartbeat
Open a post while you are logged in. In the browser Network panel, filter for admin-ajax.php and do not type. A Heartbeat row is a POST whose body contains action=heartbeat. Before any change, the editor adds a row about every 15 seconds.
If the action is a plugin name, Heartbeat is not the caller. Cart updates, live search and security scans use the same file. Disabling Heartbeat leaves those rows in place.
Disable Heartbeat with the Heartbeat Control plugin
Use the plugin when you would rather not edit PHP. Heartbeat Control, from the WordPress.org directory, sets a rule for each screen.
- Go to Plugins, Add New, search for Heartbeat Control, then install and activate it.
- Open Settings, then Heartbeat Control.
- Set the front end and the dashboard to Disable. Set the post editor to Modify, with an interval of 60 seconds.
- Save. Repeat the Network check. Editor rows should land about a minute apart, and a logged-out page should not request heartbeat.
Deactivate the plugin and WordPress returns to its own intervals. Do not add the snippet on the same site, or the two rules will override each other.
Slow Heartbeat with a functions.php snippet
Put this in a child theme functions.php, or in a small plugin that only this site uses. A parent-theme update replaces functions.php and deletes the change. Do not edit core files under wp-includes or wp-admin.
add_filter( 'heartbeat_settings', function ( $settings ) {
$settings['interval'] = 60;
return $settings;
} );
add_action( 'wp_enqueue_scripts', function () {
wp_deregister_script( 'heartbeat' );
}, 100 );
The filter moves every screen that still loads Heartbeat to 60 seconds. The action removes the script on the public site after WordPress has registered it, so logged-out pages do not tick.
To stop Heartbeat on the dashboard and leave the editor running, skip post.php and post-new.php. A deregister with no screen check also removes the editor tick, and that is the change that drops classic autosave and the post lock.
add_action( 'admin_enqueue_scripts', function ( $hook ) {
if ( 'post.php' === $hook || 'post-new.php' === $hook ) {
return;
}
wp_deregister_script( 'heartbeat' );
}, 100 );
If the site shows a white screen, the snippet has a PHP error. Restore the old functions.php in the file manager, or rename that plugin's folder. Email support@webji.services the error line, and do not keep reloading the broken site.
What autosave and post locking still do after you slow Heartbeat
At 60 seconds, classic autosave still runs: four saves a minute drop to one. The post lock still shows, only later. The block editor's REST autosave keeps its own interval.
Turn Heartbeat off inside the editor and classic autosave stops. Two people can open the same post and see no lock. The wp-admin notice that your session is about to expire can stop as well. The public site loses nothing, because visitors never needed the script.
Save once by hand the first time you test, then leave the editor idle. If your paragraph is still there after a minute, and Network shows action=heartbeat about 60 seconds apart, the change worked.
Frequently Asked Questions
What is the WordPress Heartbeat API?
The Heartbeat API is WordPress's logged-in browser timer. It POSTs to admin-ajax.php on a schedule so the editor can autosave, lock a post, and warn you before your session expires.
Why does admin-ajax.php use so much CPU?
Heartbeat is one caller, not the only one. Each of its ticks runs PHP because a page cache cannot store the POST. Several open editor tabs at 15 seconds stack those ticks. Other plugins POST to the same file with a different action.
How do I disable or slow down the Heartbeat?
Slow the editor to 60 seconds and deregister the script on the front end. Use Heartbeat Control, or the heartbeat_settings filter plus wp_deregister_script on wp_enqueue_scripts. Leave the editor enabled if you still want classic autosave and the post lock.
Will slowing Heartbeat break post autosave?
No. A 60-second interval still autosaves. It waits longer between saves. Disabling Heartbeat in the editor stops classic autosave and the post lock. The block editor can still autosave through the REST API.
How do I fix high CPU from admin-ajax.php?
Filter the Network panel for admin-ajax.php and read the action field. If it says heartbeat, slow the editor to 60 seconds and turn the script off on the front end. If it names a plugin, deal with that plugin. Turning Heartbeat off will not stop a different action.
Is the Heartbeat API the same as WP-Cron?
No. Heartbeat is a browser poll while a logged-in tab is open. WP-Cron is the scheduler for jobs such as update checks and scheduled posts. They are different requests and need different fixes.

