Back to Guides
Backend 5 min Updated 2026

Controlling the Heartbeat API

Reduce server CPU usage by limiting or disabling the WordPress Heartbeat API.

Controlling the WordPress Heartbeat API

The WordPress Heartbeat API allows your browser to communicate with the server in real-time when you are logged in. It's responsible for:

  • Auto-saving posts.
  • Showing you when other authors are editing a post.
  • Real-time dashboard notifications.

The Problem

By default, the Heartbeat pulses every 15-60 seconds. If you have multiple tabs open or multiple authors editing, this can flood your server with POST requests, causing high CPU usage.


Step 1: Diagnosing the Issue

If your host complains about "high CPU usage" or "admin-ajax.php" abuse, the Heartbeat is usually the suspect.


Step 2: Controlling Heartbeat with WP Rocket

  1. Go to Settings > WP Rocket > Heartbeat.
  2. Control Heartbeat: Enable.
  3. Behavior in backend: Reduce activity.
  4. Behavior in post editor: Reduce activity (or leave as is if you rely heavily on auto-save).
  5. Behavior in frontend: Disable (usually not needed for visitors).

Step 3: Controlling Heartbeat with a Free Plugin

If you don't use WP Rocket, use Heartbeat Control by WP Rocket (free standalone plugin).

  1. Install Heartbeat Control.
  2. Go to Settings > Heartbeat Control.
  3. Set Frontend to Disable.
  4. Set Post Editor to Modify Frequency -> 60s (instead of 15s).
  5. Set Dashboard to Disable or 60s.

Conclusion

Taming the Heartbeat API is a quick fix that can drastically lower server load, especially for sites with multiple admins or editors.

Next, we will dive into Advanced Database Optimization, adding indexes to speed up queries.