DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober 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
VGSources
Blog

How to Limit the WordPress Heartbeat API to Reduce Server Load

A practical guide to reducing WordPress Heartbeat and admin-ajax.php load without breaking editor autosave or edit-lock features.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use WordPress’s heartbeat_settings filter to slow Heartbeat requests—60 seconds is a common starting point—then disable the script on the front end and on administrative screens that do not need live updates. Keep Heartbeat active in the post editor so autosave and edit-lock behavior continue to work.

Heartbeat requests are sent through wp-admin/admin-ajax.php. On a busy site, reducing unnecessary polling can lower request volume without the risks of switching the feature off everywhere.

As an Amazon Associate I earn from qualifying purchases.

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

The safest way to limit Heartbeat

Place a small PHP callback in a site-specific plugin or your active theme’s child-theme functions.php file:

<?php
add_filter( 'heartbeat_settings', function( $settings ) {
    $settings['interval'] = 60;
    return $settings;
} );

The heartbeat_settings hook is the supported control point. The developer.wordpress.org hook reference lists it as available since WordPress 3.6.0 and says the callback receives one argument: an array of Heartbeat settings. The callback must return that array after changing the interval.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

An interval of 60 seconds means a browser sends one Heartbeat request about once a minute while the script is active. It is a compromise: request frequency falls compared with a 15-second editor interval reported by a third-party guide, but the editor still receives periodic autosave and collaboration signals. User-contributed notes on the official hook reference describe 15 to 120 seconds as the practical interval range. Treat those values as guidance, not a promise that every WordPress version or plugin accepts exactly the same behavior.

Do not rely on an unverified wp-config.php constant for this setting. No official Heartbeat-interval constant is established here; the autosave interval is a separate setting and should not be confused with Heartbeat polling.

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

What the Heartbeat API does

Heartbeat is a browser-to-server polling mechanism used mainly by logged-in WordPress administration screens. JavaScript periodically posts data to admin-ajax.php, where WordPress and plugins can process it and return updates.

Editor functions that can depend on Heartbeat

  • Periodic autosave activity while an editor is open.
  • Edit-lock and “someone else is editing” signals.
  • Other plugin or core features that use the Heartbeat transport for live status updates.

The exact features vary by WordPress version, editor, and installed plugins. A plugin can attach its own data to Heartbeat requests, so a site that appears to use only the editor may still have additional consumers.

Why admin-ajax.php can become a bottleneck

Each polling cycle creates an HTTP request. The request may bootstrap WordPress, authenticate a user, run plugin callbacks, perform database queries, and send a response before the next cycle begins. Multiply that work by every open dashboard tab and every logged-in user. A single tab is rarely the whole problem; many editors, dashboards, or long-lived browser sessions can create a steady stream of PHP and database work.

Heartbeat is therefore a request-frequency problem, not a standalone CPU bug. Before changing it, check whether a plugin is performing unusually expensive work during the request. Slowing the schedule reduces the number of opportunities for that work, but it does not repair inefficient callbacks.

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

Choose the right control instead of disabling everything

Approach Server-load effect Editor and autosave behavior Effort Risk
Raise the interval, such as 60 seconds Moderate reduction across screens where Heartbeat remains enabled Editor remains live, but updates arrive less often A few lines of PHP Low when tested
Disable Heartbeat on the front end or selected admin screens Strong reduction on those screens No effect on screens that remain enabled, including the editor Screen-specific PHP conditions Low to moderate; depends on what a plugin needs
Disable Heartbeat everywhere Largest possible reduction from Heartbeat requests Autosave, edit-lock notices, and other dependent features can stop working Simple in code, difficult to validate safely High; generally not recommended
Rate-limit admin-ajax.php at the web-server layer Potentially high, depending on the rule Legitimate editor requests may be delayed or rejected Requires server configuration and testing High if the limit is too aggressive

For most sites, start by increasing the interval and removing Heartbeat from places that do not need it. Keep a full disable or a server-level rate limit as an exceptional measure for a documented, tested use case.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Prepare and measure before changing code

A baseline prevents you from confusing a Heartbeat improvement with an unrelated hosting or plugin change.

  1. Record the WordPress version, active theme, and plugins that run in the dashboard.
  2. Open the post editor, dashboard, Media Library, Settings, and plugin-management screens in separate tests.
  3. In your browser’s developer tools, filter the Network panel for admin-ajax.php. Note the request interval, response status, response size, and whether the request repeats while the tab is idle.
  4. Check hosting graphs or server logs for PHP worker use, CPU, database load, and request counts during the same period.
  5. Save a rollback copy of the plugin or theme file you will edit. Make changes in a staging site first when one is available.

Defaults are not uniform. One third-party guide reports a 15-second default in the post editor, while other guides describe 60 seconds on many screens. WordPress core, the active screen, and plugins can all affect what you observe. Measure your own installation rather than assuming a global default.

Set a slower interval globally

The simplest change applies one interval wherever Heartbeat is active:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<?php
add_filter( 'heartbeat_settings', function( $settings ) {
    $settings['interval'] = 60;
    return $settings;
} );

Where to put the snippet

  • Site-specific plugin: the most durable option because it survives a theme change.
  • Child-theme functions.php: acceptable when the code belongs to the theme and the child theme is always active.
  • Code-management plugin: use one that safely stores PHP and lets you disable the snippet if a syntax error occurs.

Do not edit a parent theme that will be updated, and do not paste PHP into a field that expects plain text or CSS. A syntax error can take down the administration area, so keep an administrator recovery path and test the change before deploying it.

How to select the interval

Sixty seconds is a practical first test because it cuts request frequency while retaining periodic editor updates. You can try a longer interval when editors tolerate slower status updates, but stay within the interval behavior supported by your current WordPress version and verify the result in the browser. A shorter value preserves fresher signals at the cost of more requests.

Do not claim a fixed percentage of CPU savings from changing 15 seconds to 60 seconds. The arithmetic reduction in polling opportunities is predictable, but the real server effect depends on concurrent users, request cost, caching, PHP workers, and plugin callbacks. Measure the result on your site.

Use different intervals for different screens or roles

A single global value is not always appropriate. Editors may need more frequent autosave than a user who only checks settings. The filter can return different values after inspecting the current screen or the logged-in user.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Keep the editor at one interval and slow other admin pages

<?php
add_filter( 'heartbeat_settings', function( $settings ) {
    if ( ! is_admin() ) {
        return $settings;
    }

    $screen = get_current_screen();

    if ( $screen && 'post' === $screen->base ) {
        $settings['interval'] = 30;
    } else {
        $settings['interval'] = 60;
    }

    return $settings;
} );

This example deliberately treats post-editing screens differently from other administration pages. The exact base value can differ for custom post types or plugin screens, so inspect the screen in your own installation before relying on a condition. If a plugin needs a faster cycle on a custom page, identify that page and give it its own branch rather than shortening Heartbeat everywhere.

Give privileged editors a different value

<?php
add_filter( 'heartbeat_settings', function( $settings ) {
    if ( current_user_can( 'edit_posts' ) ) {
        $settings['interval'] = 30;
    } else {
        $settings['interval'] = 90;
    }

    return $settings;
} );

Role and capability checks should reflect the actual workflow. A person without edit_posts may still use a plugin screen that expects Heartbeat, so test each role that uses the dashboard. Capability-based conditions are preferable to hard-coding a username.

Guard against missing screen context

Some code can execute before a screen object is available, especially when another plugin triggers the filter during an unusual request. Check that get_current_screen() returned an object before reading its properties, as the example does. Always return the original settings array when your condition does not match.

Disable Heartbeat on the front end

Heartbeat is principally an administration feature, but themes and plugins can enqueue its script on public pages. If your front end has no feature that needs it, remove the script there while leaving the dashboard untouched:

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.
<?php
add_action( 'wp_enqueue_scripts', function() {
    wp_dequeue_script( 'heartbeat' );
    wp_deregister_script( 'heartbeat' );
}, 100 );

Use a late priority so the dequeue runs after most scripts have been enqueued. This is not a blanket guarantee: a plugin may enqueue another script that depends on Heartbeat or may implement its own polling. Test logged-out pages, logged-in front-end views, forms, previews, and any plugin feature that displays live status.

If a front-end feature breaks, remove the deregistration and target only pages where the dependency is absent. A page-specific condition such as a known post type, template, or URL can be safer than disabling the script site-wide.

Disable Heartbeat on non-essential admin screens

Guides commonly identify the Media Library, Settings pages, and the plugin list as screens that usually do not require continuous Heartbeat updates. The post editor should remain enabled unless you have verified that every autosave and locking feature you need works another way.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Target screens by admin hook suffix

<?php
add_action( 'admin_enqueue_scripts', function( $hook_suffix ) {
    $screens_without_heartbeat = array(
        'upload.php',
        'options-general.php',
        'plugins.php',
    );

    if ( in_array( $hook_suffix, $screens_without_heartbeat, true ) ) {
        wp_dequeue_script( 'heartbeat' );
        wp_deregister_script( 'heartbeat' );
    }
}, 100 );

Hook suffixes are WordPress screen identifiers, not universal URL fragments. A plugin’s settings page normally has its own suffix, so add it only after confirming the value in your environment. Custom dashboards and network administration pages may use different identifiers.

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

Prefer slowing a screen when another plugin may depend on it

Removing the script is stronger than changing its interval. If you are unsure whether a screen hosts a live status widget, use the interval filter for that screen first. Disable only after testing the page with every relevant plugin active.

Why full Heartbeat disablement is usually the wrong fix

Removing Heartbeat everywhere can stop autosave and edit-lock communication. Editors may lose recent recovery data after a browser crash, and two users can receive stale information about who is editing a post. Other plugins may also stop updating because their callbacks expect the Heartbeat transport.

Full disablement can be justified on a deliberately locked-down installation that never uses the block or classic editor and has no Heartbeat-dependent extension. Document that decision, test every role and workflow, and monitor after WordPress or plugin updates. For a normal content site, retaining a slower editor cycle is safer.

Be cautious with web-server rate limiting

One guide mentions applying an nginx limit_req rule to admin-ajax.php. A server rule can reduce bursts, but it cannot distinguish an unnecessary Heartbeat request from a legitimate editor action that uses the same endpoint. An aggressive limit can return errors, delay autosaves, or interrupt plugin workflows.

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

If you consider this approach, apply it in staging first, choose a rate that accommodates simultaneous editors, inspect HTTP status codes and response times, and test autosave, publishing, media uploads, revisions, and plugin screens. Keep an exemption or a rollback procedure for administrators. A server-level limit should complement application-level tuning, not hide an expensive callback or replace measurement.

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

Verify that the change worked

Check request timing in the browser

  1. Open an affected page while logged in.
  2. Open developer tools and select the Network panel.
  3. Filter for admin-ajax.php and preserve the log.
  4. Wait through several cycles, then compare the timestamps before and after your change.
  5. Repeat on the post editor, because it may use a different default or screen-specific rule.

A successful interval change produces fewer requests over the same observation window. A disabled screen should produce no Heartbeat requests after its scripts finish loading, although another plugin may still send unrelated AJAX requests to the same endpoint.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Check functionality, not just request counts

  • Type in a post and wait long enough to observe autosave behavior.
  • Open the same post in two test accounts and confirm edit-lock notices still behave as expected.
  • Reload the dashboard, Media Library, Settings, and plugin screens targeted by your conditions.
  • Test custom post types and any plugin that displays live notifications or progress.
  • Check PHP, database, and web-server metrics after enough traffic has passed to make the comparison meaningful.

If request volume falls but CPU remains high, inspect the remaining admin-ajax.php actions and other expensive requests. Heartbeat tuning cannot resolve unrelated queries, cron jobs, image processing, or a plugin that performs heavy work on every request.

Troubleshoot common failures

The code causes a blank page or “critical error”

Restore the previous file using your host’s file manager, SFTP, or version control, then check PHP syntax and the location of the snippet. A missing semicolon, an unmatched brace, or a PHP version mismatch can prevent WordPress from loading. A site-specific plugin is easier to disable than a theme file when the dashboard is inaccessible.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Requests continue at the old interval

Clear any page or object cache that affects logged-in users, reload the browser tab, and confirm the snippet is active in the site that is generating the requests. Check for a second callback that changes heartbeat_settings later in the load sequence. Inspect the actual timestamps rather than relying on a hosting dashboard’s rounded graph.

Autosave or edit locking stops working

Re-enable Heartbeat on the editor, lower the editor interval, and remove any broad dequeue or deregister call. Then test with the active theme and plugins. If a plugin requires a faster cycle, give the editor or that screen its own interval rather than disabling the transport globally.

Only one plugin screen breaks

Remove that screen from the disabled list or switch it to a slower interval. Identify its admin hook suffix and check the plugin’s documentation for a Heartbeat dependency. Keep the exception narrow so unrelated screens still receive the load reduction.

CPU usage does not improve

Confirm that Heartbeat was a significant part of the baseline. Count requests before and after the change, inspect their response times, and look for other callers of admin-ajax.php. A slow callback, uncached database query, or high number of concurrent PHP workers may be the dominant issue.

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

Maintenance checklist

  • Keep the interval filter in a site-specific plugin or tracked child-theme file.
  • Comment why each screen is excluded and which workflow was tested.
  • Retest after WordPress core, editor, theme, or plugin updates.
  • Review browser requests whenever a new dashboard feature is installed.
  • Monitor autosave and edit-lock behavior for every role that edits content.
  • Remove obsolete screen conditions instead of accumulating broad exceptions.

The practical goal is not zero Heartbeat traffic. It is to preserve the editor functions your team needs while eliminating unnecessary polling everywhere else. Applying the supported filter, targeting nonessential screens, and verifying real request behavior gives you a reversible way to reduce load without sacrificing content safety.

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 *

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

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.