Search

Is It Good To Deactivate Heartbeat In WordPress?

Last updated December 5th, 2023 23:55

On the internet, you’ll find numerous articles describing WordPress backend optimization and speeding up administration. Many of these sources suggest that disabling the Heartbeat function in WordPress is a great way to achieve faster administration and responsiveness. However, let’s ask a simple question: Is it good to deactivate Heartbeat in WordPress? Definitely not, or to be more precise, not always. Disabling Heartbeat can actually bring more issues than benefits in certain cases. Let’s see why below.

What is the purpose of the WordPress Heartbeat function?

The WordPress core maintains a connection between the browser and the server using the Heartbeat function. WordPress sends asynchronous HTTP requests between the browser and the server at regular intervals.

The Heartbeat function enhances user interactivity and provides some useful features for working with WordPress. Some of its important functions include:

  • Autosave: Heartbeat allows WordPress to save the editor’s content (e.g., posts and pages) as the user types. In case of an unexpected outage or internet connection loss, autosave ensures that the user doesn’t lose their work and can continue from where they left off.
  • State Synchronization: Through Heartbeat, the server and browser regularly update each other about the current state. This is useful when working with multiple tabs or windows, where different parts of WordPress might be open simultaneously. It ensures that you always have up-to-date information about the content status.
  • Editing Conflict Notification: Heartbeat detects when another user starts editing the same post or page. If such a conflict occurs, you receive a notification to be aware that someone else may be modifying the content, giving you the opportunity to save your work or update the content accordingly.

Why can disabling Heartbeat cause issues?

Heartbeat can sometimes be problematic for several reasons, which I will outline below.

  • High Server Load: If you have multiple tabs or windows open with the WordPress admin interface, Heartbeat will regularly send asynchronous HTTP requests to the server to maintain the connection. With a high number of these requests, the server may become overloaded, leading to slower response times or even short-term website unavailability.
  • Administration Slowdown: Some users may experience slowdowns in the WordPress admin interface, especially if they have resource-intensive plugins or themes on their site. Heartbeat can reduce browser performance as it regularly queries the server and processes responses, leading to slower page loading or freezing.
  • Hosting Limitations: On certain shared hosting platforms, there may be speed or HTTP request limitations. If your hosting has a limit on asynchronous requests, some Heartbeat requests may be denied. This can disrupt functions like autosave or state synchronization.
  • High Data Consumption: Regular Heartbeat requests require data communication between the browser and server. This can be problematic for users with limited mobile data or slow internet connections, as it can increase data usage and slow down page loading.

In some cases, deactivating Heartbeat might be a suitable solution, but it’s essential to consider the potential downsides and weigh them against the benefits based on your specific WordPress setup and hosting environment.

Is it good to deactivate Heartbeat in WordPress?

And now, we come to the question from the beginning. Unfortunately, there is no straightforward answer to it. The problem with disabling Heartbeat lies in the fact that many plugins use this API for their functionality. One example is Elementor. If you significantly limit or deactivate Heartbeat, you may encounter issues, especially if you use a plugin that relies on Heartbeat for proper functioning.

I myself experienced significant problems when using Elementor along with the multilingual website plugin, Polylang. With Heartbeat turned off, WordPress started forgetting permalinks for specific pages every time I created a new article. I had to regenerate the URL addresses each time, which was time-consuming and frustrating.

For instance, Elementor explicitly warns in its knowledge base against turning off Heartbeat.

How can you avoid problems?

First, find out if Heartbeat is crucial for any of your plugins. If it is, do not deactivate this function in WordPress. If you find that none of your plugins use it, you can try disabling Heartbeat. However, I strongly recommend thoroughly testing your website after making this change.

Also, test whether disabling Heartbeat has any positive impact on your website or hosting itself. Personally, I would only consider disabling this function if I had a report indicating that my shared hosting was being overloaded. I haven’t noticed any significant improvement in administration speed after disabling Heartbeat. This could be due to a relatively good caching system, possibly using object caching and Redis.

Is it good to deactivate Heartbeat in WordPress?

Conclusion

As you can see, I haven’t provided a definitive answer to the question from the beginning. However, you now know that limiting or deactivating Heartbeat may not always have a positive impact on your website. It may lead to strange behavior, and the biggest problem is that you may not always find the issue in the error log.

Always carefully consider whether it’s good to deactivate the Heartbeat function, and thoroughly test the entire website’s functionality, including both the backend and frontend. This will help you avoid many potential issues that such an action may bring.

More content about WordPress

Whole category is here

The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.

Byl pro Vás tento článek užitečný?

Klikni na počet hvězd pro hlasování.

Průměrné hodnocení. 0 / 5. Počet hlasování: 0

Zatím nehodnoceno! Buďte první

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

Je mi líto, že pro Vás nebyl článek užitečný.

Jak mohu vylepšit článek?

Řekněte mi, jak jej mohu zlepšit.

newsletter

Subscribe to the Newsletter

Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.

Odebírat
Upozornit na
guest
0 Komentáře/ů
Nejstarší
Nejnovější Nejvíce hlasováno
Vložené zpětné vazby.
Zobrazit všechny komentáře.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje