How to configure the WordPress heartbeat

This article describes what the WordPress heartbeat is, how it can affect site performance, and how you can configure it.

About the WordPress heartbeat

The “heartbeat” feature enables WordPress to monitor user actions and send periodic updates to the web server. The heartbeat is used to save drafts automatically, lock post edits, log out administrators after an idle period, and more.

However, in some scenarios the heartbeat may send an excessive amount of requests to the server. When this occurs, site performance can suffer. For example, CPU loads may increase, or you may receive “The Connection Has Been Reset” messages in your browser.

To see the WordPress heartbeat in action, examine the raw HTTP headers sent between the browser and web server. (To do this, use a browser plugin that displays the raw headers such as Live HTTP headers for Mozilla Firefox, or the Developer Tools feature in Google Chrome.) You will see periodic HTTP POST requests sent from the browser to the wp-admin/admin-ajax.php file.

By default, WordPress does not provide a way to disable or change the heartbeat settings. However, you can install a plugin to do this.

Configuring the WordPress heartbeat using a plugin

The easiest way to configure the WordPress heartbeat is to use a plugin. The LiteSpeed Cache for WordPress plugin enables you to quickly and easily do this.

If you have not already installed the LiteSpeed Cache for WordPress plugin on your WordPress site, please see this article for information about how to do so.

To configure the heartbeat using the LiteSpeed cache plugin, follow these steps:

  1. Log in to your WordPress site as the administrator.
  2. In the left-hand pane, click LiteSpeed Cache, and then click Toolbox:

    WordPress - LiteSpeed Cache - sidebar - Toolbox

  3. On the LiteSpeed Cache Toolbox page, click the Heartbeat tab:

    WordPress - LiteSpeed cache - Toolbox - Heartbeat tab

  4. A list of available settings appears. For detailed information about each of the options, please visit https://docs.litespeedtech.com/lscache/lscwp/toolbox/#heartbeat-tab.
  5. Click Save Changes. The new heartbeat settings take effect immediately.

 

Get WordPress Hosting

Article Details

Other Articles in This Category

Show More

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.