Reasons for disabling heartbeats in WordPress

Disable heartbeats

Heartbeats in WordPress are a feature that allows the communication between the user’s browser and the server. They send a small AJAX request to the server to check for updates or to auto-save drafts, among other things.

There are a few reasons why someone might want to disable heartbeats in WordPress:

High server resource usage:

Heartbeats can consume server resources, especially if there are a large number of users on a site or if they are making frequent requests.

Plugin conflicts:

Some plugins may conflict with the heartbeat feature, causing errors or slowdowns on a site.

Security concerns:

Heartbeats can be used as a way to monitor user activity and track user behavior on a site. Disabling them can help protect user privacy.

Improved site speed:

Disabling heartbeats can help improve site speed by reducing the amount of data being transmitted between the user’s browser and the server.

Debugging

Heartbeats disturb debugging in IDEs such as PHPStorm. Here are the details:

https://woocommerce.com/document/admin-tools-for-woocommerce/disable-heartbeats/


It’s important to note that disabling heartbeats can have unintended consequences, such as preventing auto-saving of drafts or updates, so it should be done with caution and with a clear understanding of the potential impact on a site’s functionality.