Use code PERFMATTERS for an additional 10% off!

How to Disable the WordPress Heartbeat API

The WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web-browser. While this is great and all it can also cause high CPU usage and crazy amounts of PHP calls. For example, if you leave your dashboard open it will keep sending POST requests to this file on a regular interval, every 15 seconds. Here is an example below of it happening.

admin-ajax php requests access log
Admin-ajax requests in logs

We have three options built into the plugin to help minimize this:

  1. Leave as default
  2. Disable completely
  3. Only Allow When Editing Posts/Pages

We recommend the last one and that is the setting we use on our sites. This is will drastically decrease the number of requests.

disable heartbeat api with perfmatters plugin
Disable Heartbeat API with perfmatters plugin

Make sure to also check out our other option to change the Heartbeat API frequency.

Was this article helpful?

Related Articles