Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
admin-ajax.php

How to Limit the WordPress Heartbeat API Safely

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Limit WordPress Heartbeat in one of two ways: increase its client-side interval in code, or use a location-aware Heartbeat-control plugin. First confirm that admin-ajax.php requests with the heartbeat action are contributing to a problem. Then make a reversible change and test the Dashboard, editor and front-end workflows that rely on near-real-time updates.

What the WordPress Heartbeat API does

Heartbeat is WordPress’s built-in polling mechanism for near-real-time browser updates. A JavaScript timer (“tick”) sends data to WordPress through an AJAX request, and WordPress returns a response to the browser. The logged-in request is handled by wp_ajax_heartbeat().

The Plugin Handbook documents a client interval range of 15 to 120 seconds. That range describes the documented behavior of the API, not a promise that every screen uses one universal value. Core and plugins can choose context-specific behavior.

Why it can appear in CPU investigations

Each active browser session can periodically request /wp-admin/admin-ajax.php. Multiple editors, dashboard tabs or front-end sessions can therefore create a steady stream of requests. Heartbeat may be involved, but an admin-ajax.php spike can also come from other AJAX actions, so identify the action before changing the API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Diagnose Heartbeat requests before changing settings

  1. Open your browser’s developer tools and select the Network panel.
  2. Filter requests for admin-ajax.php while leaving the relevant Dashboard, Post Editor or front-end page open.
  3. Inspect the request payload or query data and confirm that the action is heartbeat.
  4. Record which screen, user state and workflow generated the requests, and note whether the traffic is continuous or limited to a particular task.
  5. Check server or application monitoring for the same period. Treat any reduction after a change as an observation from your installation, not as a guaranteed CPU percentage.

This baseline prevents you from disabling Heartbeat when another AJAX action is the real source of load.

Choose between code and a plugin

Approach Best fit Advantages Risks and checks
Change the client interval in code Sites with a developer who can maintain version-controlled custom code Small, explicit change; can be tailored to a particular screen or condition Requires correct enqueueing and execution timing; a theme or core change can remove an improperly added script
Heartbeat-control plugin Owners who need settings without writing JavaScript, especially by location Can expose separate Dashboard, Frontend and Post Editor controls Maintenance and WordPress-version compatibility vary; test updates and every affected workflow
Selective disable A location where Heartbeat is demonstrably unnecessary Stops polling in that context Can disrupt locking, autosave-related behavior or other near-real-time editor features

Option 1: increase the Heartbeat interval in code

WordPress core changeset 59016 documents the client method wp.heartbeat.interval() and records that it accepts values from one second to one hour. The same changeset discusses increasing inline-edit requests from every 15 seconds to every 10 seconds so a post is unlocked sooner when a user navigates away. That is an inline-edit decision, not a universal default for all screens.

A guarded client-side call can look like this:

(function () {
  if (window.wp && wp.heartbeat && typeof wp.heartbeat.interval === 'function') {
    wp.heartbeat.interval(60);
  }
}());

The value above requests a 60-second interval; choose a value based on the workflow you observed. This example is not a complete enqueue recipe: load it only after the WordPress Heartbeat client is available, and verify the appropriate script handle, dependencies and execution timing for the WordPress version and screen where you use it. Put the change in a maintainable custom plugin or other deployment-controlled code rather than editing WordPress core.

Make the code location-specific

If only one context needs less polling, conditionally load the code for that context instead of applying it everywhere. For example, a site might retain the normal behavior in the Post Editor while using a longer interval on a read-only front-end page. The condition must be implemented using the site’s normal enqueue logic and tested after every WordPress or editor update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 2: use a Heartbeat-control plugin

The WordPress.org plugin directory has a Heartbeat-control category. A commonly referenced project, WP Media Heartbeat Control, documents separate controls for the Dashboard, Frontend and Post Editor. Its repository information inspected for this article reports tested compatibility only through WordPress 6.3; do not assume that status is current. Check the plugin’s live directory page, its latest release notes and your own staging site before installing or updating it.

  1. Install a maintained plugin from the WordPress.org directory or your organization’s approved source.
  2. Open its settings and identify the separate Dashboard, Frontend and Post Editor controls.
  3. Increase the interval only where polling is unnecessary; leave a workflow at its normal setting when users depend on timely updates.
  4. Use a disable option only for a specific location after confirming that no required feature uses Heartbeat there.
  5. Save, reproduce the earlier request observation, and test the affected site functions.

When disabling Heartbeat is unsafe

Heartbeat exists to provide near-real-time behavior. In an editing context, disabling it can affect features associated with editor state and post locking. The presence of a separate Post Editor setting in Heartbeat-control tools is a reminder that editor behavior should be considered independently from the Dashboard or front end.

  • Post Editor: test concurrent editing, lock release and any autosave or status behavior your site uses.
  • Dashboard: check widgets, notifications and plugin screens that refresh data without a full page load.
  • Frontend: verify only pages that actually use Heartbeat; many public pages may not need it, but plugins can add dependencies.

If a publishing workflow fails after a change, restore the previous interval or re-enable Heartbeat for that location, then isolate the feature that required it.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify and roll back the change

  1. Repeat the Network-panel check and compare the timing and number of heartbeat requests with your baseline.
  2. Review server logs or monitoring for the same URLs and period, separating Heartbeat from unrelated admin-ajax.php actions.
  3. Have an editor create, edit, lock and publish a representative post; also test the Dashboard and any front-end interaction covered by the change.
  4. Watch for JavaScript errors, stale notices, failed saves or unexpected user-lock messages.
  5. Revert the code or restore the plugin’s prior settings if a required workflow changes, then retest before trying a smaller adjustment.

Practical decision rule

Use code when you can safely maintain a targeted, version-controlled change. Use a plugin when location-specific controls are more important than owning the JavaScript, but verify current maintenance and compatibility first. In either case, increase the interval before disabling Heartbeat, and judge the result from your own request and workflow data rather than assuming fewer polls will fix every CPU or speed problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
BAZIC Products Take Along Large Print Word Finds Puzzle Book, 2 Titles
  • Offer contains ONLY 2 titles regardless of the order quantity placed for this listing. Set of volumes may vary. Ordering in multiples will not change the volume received. Image is meant to display the type of book you will be receiving only.
  • BRAIN TEASING. Perfect Puzzle Book for all ages to learn. Enjoy puzzles, maze, word search, or crosswords! This puzzle book is ideal for people on the go and will provide hours of entertainment.
  • FUN & CHALLENGING. Exercise your brains long-term memory, working memory, executive functioning, attention to detail, multitasking, and processing speed. Perfect gifting item for those who love word search puzzles!
  • RELAX, RECHARGE, & REFOCUS. The word find puzzle book offers an enjoyable challenge for all, from beginners to experts. Ideal for learning, practicing, and having fun time for various users.
  • OFFICIALLY LICENSED. High-resolution printing. Perfect for family activities, classroom learning, or travel. Provide an engaging, educational experience with every page, making it both fun and meaningful.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.