Heartbeat Control
Take control of WordPress’s Heartbeat API—reduce how often it fires or disable it entirely to lower server load and improve performance, especially on shared hosting.
Use Cases
- Reduce server resource usage on shared hosting where frequent AJAX requests drain CPU
- Prevent admin slowdown on multi-user sites with 20+ simultaneous editors
- Lower hosting costs by reducing unnecessary background requests
- Fix “admin-ajax.php high CPU” issues reported by your hosting provider
How It Works
The WordPress Heartbeat API sends AJAX requests every 15-60 seconds to:
- Autosave your post content
- Check if another user is editing the same post
- Display real-time notifications
- Maintain login sessions
This module lets you:
- Control where the Heartbeat runs (everywhere, admin only, or nowhere)
- Adjust how frequently it fires (15s to 120s intervals)
Settings
| Setting | Options | Default | Description |
|---|---|---|---|
| Heartbeat Location | Allow Everywhere, Admin Only, Disable on Dashboard, Disable Everywhere | Allow Everywhere | Where the Heartbeat API is active |
| Heartbeat Frequency | 15s, 30s, 60s, 120s | 15 seconds | How often Heartbeat sends requests |
Location Options Explained
| Option | What It Does |
|---|---|
| Allow Everywhere | Heartbeat works normally on frontend and admin |
| Admin Only | Heartbeat disabled on frontend, active in admin |
| Disable on Dashboard | Heartbeat disabled on main dashboard, active elsewhere |
| Disable Everywhere | Heartbeat completely disabled site-wide |
Where to Find It
Location: Switchboard → Modules → Optimization → Heartbeat Control
After saving, verify by opening Browser DevTools (Network tab), filtering for “heartbeat”, and watching the request frequency.
Recommended Configurations
Shared Hosting (Budget Plans)
- Location: Admin Only
- Frequency: 60 seconds
Reduces server load significantly while keeping autosave functional when editing.
Multi-User Editorial Sites
- Location: Allow Everywhere
- Frequency: 30 seconds
Balances post locking features with reduced server requests.
Single-User Blogs
- Location: Disable on Dashboard
- Frequency: 60 seconds
Dashboard doesn’t need constant updates for a single user.
Maximum Performance
- Location: Disable Everywhere
- Frequency: N/A
Complete disable—but read the trade-offs below first.
Trade-offs of Disabling Heartbeat
| Feature | Impact When Disabled |
|---|---|
| Autosave | Won’t work—manual save only |
| Post Locking | Can’t detect if another user is editing |
| Real-time Notifications | Won’t appear |
| Session Timeout | May log out unexpectedly on long sessions |
Don’t disable Heartbeat entirely on multi-author sites. Without it, two editors can unknowingly edit the same post simultaneously, causing one person’s changes to be lost.
FAQ
What is admin-ajax.php and why is it using so much CPU?
admin-ajax.php handles all WordPress AJAX requests, including Heartbeat. On sites with many logged-in users or plugins that use AJAX heavily, this file can become a bottleneck. Reducing Heartbeat frequency directly reduces admin-ajax.php load.Will slowing Heartbeat affect my autosaves?
Yes. Autosaves happen on Heartbeat intervals. If you set 120-second frequency, autosaves occur every 2 minutes instead of every 15 seconds. You might lose more work if your browser crashes between saves.My hosting says I have too many AJAX requests. Will this help?
Likely yes. Heartbeat is often the biggest source of AJAX requests on WordPress sites. Slowing it from 15s to 60s reduces requests by 75%. Disabling it on the frontend (Admin Only mode) eliminates frontend AJAX entirely.Can I disable Heartbeat just for certain user roles?
This module applies settings site-wide. For per-role configuration, you’d need custom code or a dedicated Heartbeat plugin with more granular controls.How do I verify the changes are working?
- Open your WordPress admin
- Open Browser DevTools (F12)
- Go to Network tab
- Filter by “heartbeat” or “admin-ajax”
- Watch the requests—they should appear at your configured interval (or not at all if disabled)
Start with 60-second intervals instead of disabling entirely. You keep autosave and post locking while still reducing server load by 75%.
Server Impact Example
| Configuration | Requests/Hour (1 user) | Requests/Hour (10 users) |
|---|---|---|
| Default (15s) | 240 | 2,400 |
| 30 seconds | 120 | 1,200 |
| 60 seconds | 60 | 600 |
| 120 seconds | 30 | 300 |
| Disabled | 0 | 0 |
On a site with 10 active admin users, switching from default to 60-second intervals saves 1,800 AJAX requests per hour.
Get access to all 147 modules with a single license