If you’ve ever watched your WordPress hosting dashboard and wondered why your server CPU spikes every few seconds even when nobody’s actively editing a post, you’re looking at the Heartbeat API in action.
The Heartbeat API is a core WordPress feature that creates a persistent connection between your browser and the server. It’s what lets you see “User X is currently editing this post” warnings, autosaves your draft every 15 seconds, and keeps your session alive when you leave a tab open for hours.
It’s useful. It’s also chatty. And for solo operators running lean hosting setups, that chattiness has a real cost.
What the Heartbeat API actually does
Every 15 seconds by default, the Heartbeat API sends a request from your browser to your WordPress server. The server responds with any updates: post lock status, comment counts, plugin notifications, whatever’s changed since the last ping.
That 15-second interval runs constantly while you have the WordPress admin open. If you’re editing a post, it’s checking for conflicts. If you’re on the dashboard, it’s refreshing widget data. If you have three tabs open and forgot about two of them, all three are pinging your server every 15 seconds.
On a VPS with 2GB of RAM and a handful of plugins, this usually isn’t catastrophic. But it’s not free, either. Each heartbeat request consumes a PHP worker thread. If you’re running a lean hosting setup—shared hosting, a small cloud instance, or a server that’s already near capacity during traffic spikes—those threads add up.
I’ve seen operators blame their cache plugin or their theme when the real culprit was eight browser tabs hammering the Heartbeat API while they edited a landing page.
When to throttle it
You don’t need to kill the Heartbeat API entirely. You just need to decide where the tradeoff between real-time updates and server load makes sense for your workflow.
Throttle on the front end. The Heartbeat API can run on public-facing pages if a plugin or theme calls it. Most solo operators don’t need this at all. Disable it entirely for logged-out visitors.
Slow it down in the admin. If you’re not collaborating in real time with another editor, you don’t need 15-second intervals. Stretching it to 60 seconds in the WordPress admin still gives you autosave protection and session continuity without the constant polling.
Keep it active in the post editor. If you write long-form content or frequently step away mid-draft, autosave is worth the overhead. A 30-second interval here is a reasonable compromise.
How to control it without a plugin
The cleanest way to manage Heartbeat is with a small snippet in your theme’s functions.php or a custom plugin. Here’s what I use:
add_action('init', 'custom_heartbeat_settings');
function custom_heartbeat_settings() {
// Disable on front end
if (!is_admin()) {
wp_deregister_script('heartbeat');
}
}
add_filter('heartbeat_settings', 'adjust_heartbeat_interval');
function adjust_heartbeat_interval($settings) {
// Slow to 60 seconds in admin, 30 in post editor
$settings['interval'] = is_admin() ? 60 : 30;
return $settings;
}
This disables Heartbeat for all logged-out users, slows the admin dashboard polling to once per minute, and keeps the post editor at 30 seconds. Adjust the numbers based on your workflow.
If you’d rather use a plugin, Heartbeat Control (free, in the WordPress repo) gives you a settings panel with the same options. It’s lightweight and doesn’t add cruft.
What you’ll actually notice
Throttling Heartbeat won’t magically make your site twice as fast. It’s a marginal win, not a transformation. But marginal wins compound, especially on shared hosting or small VPS plans where every bit of overhead matters.
What you will notice: fewer unexplained PHP worker exhaustion errors during traffic spikes, slightly lower baseline CPU usage, and fewer “server busy” messages when you’re editing posts while a newsletter sends.
If you’re running WordPress on a tight resource budget—single-core VPS, entry-level managed hosting, or a shared plan you haven’t outgrown yet—Heartbeat throttling is one of the first optimizations worth making. It costs you almost nothing in workflow convenience and buys back real server capacity when you need it.
Got a hosting or performance question? Reply to this email or share what’s slowing your site down. We’ll cover it in a future issue.
