Use code PERFMATTERS for an extra 10% off!
  1. Home
  2. Docs
  3. General
  4. How to change the Heartbeat frequency in WordPress

How to change the Heartbeat frequency in WordPress

The WordPress Heartbeat API uses /wp-admin/admin-ajax.php to run AJAX calls from the web browser. While this is great, it can 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 requests in logs
Admin-ajax requests in logs

Change the Heartbeat frequency

Follow the steps below to change the Heartbeat frequency.

Step 1

Click into the Perfmatters plugin settings.

Perfmatters plugin settings
Perfmatters plugin settings

Step 2

Make sure you’re on the “General” submenu.

Perfmatters General submenu
Perfmatters General submenu

Step 3

Scroll down and choose an option under “Heartbeat Frequency.”

There are four built-in options to change the frequency at which this can poll your dashboard:

  • 15 seconds (default)
  • 30 seconds
  • 45 seconds
  • 60 seconds

We recommend using the 60-second option. This is what we use across all of our sites.

Change Heartbeat frequency with Perfmatters plugin
Change Heartbeat frequency with Perfmatters plugin

Step 4

Scroll down and click “Save Changes.”

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

Was this article helpful?

Related Articles