The WordPress Heartbeat API keeps your site in constant conversation with the server. That’s handy for autosave, post-locking and real-time stock updates, but on busy, shared hosting those admin-ajax.php pings can chew through CPU minutes, trigger over-usage warnings and bloat your carbon footprint. Follow this quick Toolkit to silence Heartbeat in places you never use, while keeping the essentials intact.
Why the WordPress Heartbeat API can slow you down
Heartbeat triggers a background request every 15 seconds in the editor and every 60 seconds elsewhere. On limited plans that traffic stacks up, causing sluggish dashboards and even account suspensions for exceeding CPU quotas.
- admin-ajax.php floods the server on every open browser tab.
- Shared-hosting providers may throttle or suspend sites that overrun resource limits.
- Autosave and revisions depend on Heartbeat, don’t yank the cord blindly.
Trace WordPress Heartbeat activity in real time
Measure before you tweak. Real numbers prove the win later.
1. Install the Query Monitor plugin and browse to your WordPress dashboard.
- Open the HTTP API Calls tab.
- You’ll see recurring
/wp-admin/admin-ajax.php
requests—these are Heartbeat pings, typically every 15–60 seconds.
2. Look for plugin-level Heartbeat settings.
- Tools like WP Rocket, Perfmatters, or Heartbeat Control may list Heartbeat usage or overrides in their settings panels.
- While WordPress’s built-in Site Health tool (under Tools → Site Health) doesn’t show Heartbeat activity by default, some plugins may inject related diagnostics there.
3. Identify plugins that rely on Heartbeat, such as:
- WooCommerce (for live stock updates)
- Live chat tools
- Multiauthor editors (using post-locking features)
Ready for Faster, Greener Hosting?
We recommend Krystal - fast, reliable, powered by 100% renewable energy. It's a host we trust and a smart move for a cleaner web.
Decide which Heartbeat features you truly need
Keep what protects content; ditch the rest.
Feature | Keep / Kill? | Notes |
---|---|---|
Autosave & revisions | Keep | Protects drafts from browser crashes. |
Post-locking | Keep if multi-author | Avoids “who overwrote my work?” woes. |
WooCommerce stock sync | Keep for live inventory | Essential during high-traffic sales. |
Dashboard widgets & idle front-end | Kill | Rarely mission-critical. |
Tip: If you disable critical endpoints, schedule a fallback to WordPress cron (wp-cron.php
) to run inventory or email tasks every 5 minutes.
Pick your fix: plugin or one-line code?
Choose a method that matches your comfort level.
1. Heartbeat Control plugin
A free plugin offering dropdown menus for Disable, Reduce or Allow. Perfect for quick tests.
2. Performance suites with built-in controls
- WP Rocket → Heartbeat
- Perfmatters → General → Heartbeat
- LiteSpeed Cache → Toolbox → Heartbeat
Each lets you throttle in the editor while disabling everywhere else.
3. Dynamic Front-End Heartbeat Control plugin
Niche tool that disables only for non-logged-in visitors, handy if you run real-time admin widgets but want a quiet front-end.
4. DIY snippet (functions.php or WPCode plugin)
If you’re comfortable editing code, you can paste this into your theme’s functions.php
file.
Want a safer method? Use the WPCode plugin to insert and manage custom snippets without touching theme files.
Paste once, revert anytime.
// Disable Heartbeat on front-end and dashboard, keep editor alive.
add_action( 'init', function() {
if ( ! is_admin() ) {
wp_deregister_script( 'heartbeat' );
}
}, 1 );
add_filter( 'heartbeat_settings', function( $settings ) {
// Throttle editor pings to every 120 seconds.
$settings['interval'] = 120;
return $settings;
} );
Advanced? Hook heartbeat_settings
per URL or user role for granular control.
Flip the switch and smoke-test your site
Apply the change, then prove nothing broke.
- Back up the site.
- Apply your chosen method and clear all caches.
- Open a post, type a word and wait two minutes, autosave should still fire.
- Publish a scheduled post set for five minutes ahead to ensure cron or Heartbeat still triggers.
- If you run WooCommerce, place a test order and verify stock reduction.
Prove the gains: performance & carbon metrics
Show hard evidence to stakeholders (or yourself).
- Re-open Query Monitor: the admin-ajax.php line should be silent or down to one ping every two minutes.
- Check your host’s CPU chart for a drop. Some dashboards even estimate energy-usage benchmarking, watch the green line fall.
- For carbon bragging rights, run your home page through the website carbon calculator before and after.
The Quick Fix for a Slow, Heavy Site
We optimise your site for speed, efficiency and sustainability. No rebuild. No delays. Just better performance and a lighter footprint.
Next steps
With Heartbeat trimmed to only the tasks you value, you’ve earned a leaner, faster, lower-carbon workspace. Keep monitoring for a week. If numbers stay green, repeat the tweak across all client sites.