Scale your business with our modular plugins.
Home » Blog » How to Limit WordPress Heartbeat the Right Way

How to Limit WordPress Heartbeat the Right Way

How to Limit WordPress Heartbeat the Right Way
October 2, 2025||By Jane F

Do you want to limit WordPress heartbeat for maximum performance? If you are looking for a simple guide, keep reading this article.

The WordPress Heartbeat API, introduced in WordPress 3.6, powers background tasks like post autosaving, post locking, real-time updates, and session management.

While it improves the overall user experience for content creators, constant AJAX calls and HTTP POST requests can put pressure on your server. On shared hosting environments, this often leads to CPU usage spikes, performance degradation, and slower response in the WordPress dashboard or post editor.

Excessive Heartbeat activity inside the WordPress admin may also impact site performance, especially if multiple user sessions are active. That’s why learning how to limit and control the WordPress Heartbeat is an essential performance optimization step.

In this guide, we’ll explain practical methods to manage Heartbeat for a smoother WordPress site.

First, we will see what is WordPress heartbeat and why does it affect performance.

What Is WordPress Heartbeat

WordPress Heartbeat is a core API that enables real-time communication between the browser and the server.

It runs in the WordPress dashboard and post edit screens, sending regular AJAX calls to manage tasks such as post autosaving, session management, and displaying real-time notifications. This continuous communication helps keep user sessions updated and prevents data loss while editing content.

While essential for WordPress functionality, excessive Heartbeat activity can increase CPU usage and server load, especially on shared hosting, making it important to monitor and control its execution frequency.

Why Limit WordPress Heartbeat

Limiting WordPress Heartbeat is essential for maintaining optimal site performance and user experience.

Frequent API calls can increase CPU usage and server load, especially on shared hosting, slowing down the WordPress dashboard and post edit screens. By controlling Heartbeat execution frequency, you reduce unnecessary POST requests and real-time updates, minimizing performance degradation.

Limiting Heartbeat helps prevent excessive resource consumption, ensures smooth autosaving and revisions features, and improves overall site responsiveness.

With proper Heartbeat control, you can manage user sessions efficiently while maintaining a faster, more reliable WordPress admin dashboard and frontend experience.

Common Issues Caused by Excessive Heartbeat API Calls

  • Increased CPU usage on shared hosting environments, leading to slower site performance.
  • Higher server load due to frequent AJAX calls sent through the admin-ajax.php file.
  • Reduced WordPress dashboard responsiveness during post editing sessions.
  • Performance degradation when multiple users are working on content simultaneously.
  • Unnecessary POST requests that affect overall site performance.
  • Increased memory capacity usage, especially on resource-limited hosting providers.
  • Longer response times and slower WordPress admin panel navigation.
  • Negative impact on PageSpeed Insights and Core Web Vitals performance score.

How to Limit WordPress Heartbeat for Performance

There are two ways to limit WordPress heartbeat

  1. Using a code snippet
  2. With a dedicated plugin

We will show you both methods below.

1. Coding Method

If you are looking for a simple method, follow these steps. First, you need to have a site-specific plugin, such as Code Snippets. Or you can also use your child theme for this task.

What you need to do is paste the code we mentioned below into your functions.php.

// Add a new setting in wp-admin > Settings > General
add_action( 'admin_init', function() {
register_setting( 'general', 'custom_heartbeat_interval', 'intval' );
add_settings_field( 'custom_heartbeat_interval', 'Heartbeat Interval', function() {
$interval = get_option( 'custom_heartbeat_interval', 120 );
echo "<input type='number' name='custom_heartbeat_interval' value='".absint($interval)."' min='15' max='120' /> seconds";
}, 'general' );
});

add_filter( 'heartbeat_settings', function( $settings ) {
$settings['interval'] = get_option( 'custom_heartbeat_interval', 120 );
return $settings;
});

After pasting the code, save the snippet.

add heartbeat frequency settings

Now, you can visit the General Settings page and find an option to adjust the heartbeat frequency for your website.

heartbeat interval

If you need to use a plugin for the task, follow the method we mentioned below.

2. Plugin Method

For this part, we will use the Heartbeat Control plugin. First thing you need to do is install and activate the plugin on your website.

activate heartbeat control

After activation, you can see the plugin’s settings under the main WordPress settings page.

heartbeat control settings - limit wordpress heartbeat

If you open that, you can see the control for

  1. WordPress dashboard
  2. Front end
  3. Post editor

Depending on your preferences, you can tweak the values. Save the settings once you are done with the modification.

heartbeat control plugin settings - limit wordpress heartbeat

You also have the option to completely disable the WordPress heartbeat. If you do not need to use it, disabling it would be an ideal option.

That’s it!

This is how you can limit WordPress heartbeat with minimal effort.

Frequently Asked Questions

Now, we will check some of the frequently asked questions regarding this topic.

What Is The WordPress Heartbeat API?

The WordPress Heartbeat API is a feature introduced in WordPress 3.6 that uses AJAX calls to provide real-time updates in the WordPress dashboard.

It powers post autosaving, session management, and collaborative editing. While useful, frequent POST requests from the Heartbeat API can cause high CPU usage and performance degradation on shared hosting environments.

Why Should I Limit WordPress Heartbeat?

Limiting the WordPress Heartbeat helps reduce server load, CPU time, and unnecessary POST requests to the admin-ajax.php file. Without control, excessive Heartbeat execution frequency can slow down your WordPress site, especially in the post editor and admin dashboard.

How Do Heartbeat Control Plugins Work?

WordPress Heartbeat Control plugins allow you to adjust the execution frequency or disable Heartbeat in specific areas like the post editor, admin dashboard, or front end.

Plugins such as Heartbeat Control, WP Rocket, or LiteSpeed Cache make it easier to fine-tune API calls without editing WordPress core files.

Can I Completely Disable WordPress Heartbeat?

Yes, you can disable WordPress Heartbeat using a plugin or custom code. However, disabling it entirely removes features like post autosaving, revisions, and real-time notifications.

A better approach is reducing Heartbeat activity in non-essential areas while keeping it active for critical functions such as post locking and session management.

Does Limiting Heartbeat Improve WordPress Performance?

Yes, performance optimization improves significantly when you reduce unnecessary Heartbeat API activity. By controlling API calls, you lower server load, optimize CPU usage, and enhance site performance.

This is especially beneficial in hosting environments with limited memory capacity or shared hosting servers.

Which Plugins Help Manage WordPress Heartbeat API?

Popular options include Heartbeat Control, WP Rocket, and LiteSpeed Cache for WordPress configuration. These plugins allow you to manage Heartbeat execution frequency, control API calls, and optimize server resources.

You can find them in the WordPress Plugin Directory or explore developer tools for advanced configurations.

Is Limiting WordPress Heartbeat Safe For My Site?

Yes, limiting WordPress Heartbeat is safe when done carefully. You should avoid disabling it entirely, as that may impact user sessions, collaborative editing, and auto-saving posts.

Instead, use a caching plugin or Heartbeat Control plugin to balance site performance with essential WordPress features.

Conclusion

Controlling WordPress Heartbeat is essential for maintaining optimal site performance and user experience.

By managing its execution frequency, you can significantly reduce unnecessary CPU usage, server load, and potential performance degradation, especially on shared hosting environments.

Limiting the Heartbeat API helps prevent excessive AJAX calls, ensuring that autosaving posts, post edits, and real-time notifications operate smoothly without overloading your server. You can implement this either by adding custom code to your theme’s functions.php file or by using a dedicated WordPress plugin for Heartbeat control.

Taking these steps safeguards your WordPress dashboard, improves page load times, and enhances overall site stability, making your website more efficient and reliable for both administrators and visitors.

What else would you do to improve your website’s performance?

Let us know in the comments.

Log into your account
Forgot your password?