21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

Disable the Heartbeat API in WordPress

Quick answer

Disable the Heartbeat API on the WordPress front end, and raise the post editor from a 15-second tick to 60 seconds. Each tick is a POST to admin-ajax.php that PHP must run. Slowing the editor keeps classic autosave and the post lock. Turning Heartbeat off in the editor stops both.

A practical guide to slowing or disabling the WordPress Heartbeat API without losing autosave, written for site owners on Indian shared hosting.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
4 min
Sections
6
Updated
14 Nov 2026
Written by
WebJi® team

What the Heartbeat API does in WordPress

The Heartbeat API, added in WordPress 3.6, is a logged-in browser timer that POSTs to admin-ajax.php while you work. The heartbeat script sends one request with action=heartbeat, waits for the reply, then sends another. On the post editor the tick is 15 seconds; on the dashboard and the front end, where the script loads at all, core already uses 60 seconds. The script never runs faster than every 15 seconds, and it pulls an interval above 120 seconds back down to 120.

Default Heartbeat tick by screen, and what to change
ScreenDefault tickWhat to change
Post editor15 secondsRaise it to 60 seconds
Dashboard60 secondsLeave it, or turn Heartbeat off
Front end60 seconds, if the script loadsDeregister the script
  • Classic-editor autosave rides on 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 every active plugin, and a page cache cannot store a POST, so editor sessions consume PHP workers that visitors also need. One person editing is cheap. Several people with posts open multiply the 15-second tick.

On WordPress hosting those PHP processes also answer visitors, so a worker spent on Heartbeat is not building a page. The dashboard gets slow, a full account can return a 503, and 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 either — they help ordinary page views, which is a separate job from Heartbeat, and broader tuning belongs to a WordPress speed optimization pass.

How to confirm the admin-ajax.php call is Heartbeat

Open a post while logged in, filter the browser Network panel for admin-ajax.php, and read the action field without typing. 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 names a plugin, Heartbeat is not the caller. Cart updates, live search and security scans use the same file, and disabling Heartbeat leaves those rows in place.

Disable Heartbeat with the Heartbeat Control plugin

Heartbeat Control, from the WordPress.org plugin directory, sets a rule per screen without editing PHP. Configure it once and the intervals apply site-wide; deactivate it and WordPress returns to its own timings.

  1. Go to Plugins, Add New, search for Heartbeat Control, then install and activate it.
  2. Open Settings, then Heartbeat Control.
  3. Set the front end and the dashboard to Disable. Set the post editor to Modify with an interval of 60 seconds.
  4. Save, then repeat the Network check. Editor rows should land about a minute apart, and a logged-out page should not request heartbeat.

Do not add the functions.php snippet on the same site, or the two rules will override each other.

Slow Heartbeat with a functions.php snippet

Put the snippet in a child theme's functions.php or a small site-specific plugin — never in the parent theme, whose update would erase the edit. 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 which 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 — and the post lock still appears, 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 session-expiry notice 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 the Network panel shows action=heartbeat about 60 seconds apart, the change worked.

FAQ

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, and other plugins POST to the same file with a different action.

Will slowing Heartbeat break post autosave?

No. A 60-second interval still autosaves; it just 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.

Last editorial update: 15 November 2026.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.