Control WordPress Heartbeat API

The WordPress Heartbeat API provides a connection for real-time data transfer and syncing between the server and the browser. Examples of where the Heartbeat API is involved include:

  • Autosave and revisions in the post editor
  • Notifications on WordPress admin dashboard
  • Post-locking information when another editor is working on a post
  • Real-time data displayed on the dashboard by plugins (e-commerce)
  • Scheduled post publication

The API runs a set of tasks on an interval or "tick" at every 15-60 seconds and utilizes the file admin-ajax.php on the (dashboard) backend, post editor, or the frontend to perform this activity.

While helpful, numerous admin-ajax.php request on some servers can cause an overload or high CPU usage and, depending on the provider and hosting type, could lead to performance issues and possibly account suspensions.

Heads up! 3rd party plugins may also use the admin-ajax.php file. We recommend following these instructions to investigate their performance impact.

To prevent such issues, WP Rocket provides a way to control this activity in our settings:

By first enabling the Control Heartbeat checkbox, you can choose to either Reduce activity, Disable or Do not limit the Heartbeat API. When you choose to Reduce activity, intervals will be reduced from one hit per one minute to one hit per 2 minutes.

Note that disabling the Heartbeat API completely could affect the functionality of plugins and themes that rely on it.

The WordPress Site Health tools relies on Heartbeat. If you disable activity in the backend, the tool will not be able to load any results.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.