When it comes to optimizing WordPress, sometimes you need to attack an issue that doesn’t directly make your website faster. The Heartbeat API is a piece of JavaScript that allows WordPress to ping your browser to see if it is still active. This is used for monitoring for features like autosave.
However, if you are on a slower server or you’re simply trying to optimize the website to use fewer resources on your server, the Heartbeat API can be a major source of stress for the server. Therefore, it’s typically recommended to optimize the usage of this API and if you’re new to WordPress you will want to use a plugin.
How to Configure the Heartbeat Control Plugin
The first thing you will want to do is install the Heartbeat Control plugin from the WordPress.org repository.
After the plugin is installed, we recommend configuring the plugin with the following settings.
[Disable] Frontend Option: We recommend disabling this feature altogether. This is the ideal setting for most websites; unless you have a dynamic front-end feature that requires Ajax or auto-saving. Disabling this should not cause any problems.
For the post editor screen, you can keep on the allow OR select modify and increase the option to 60.
[Disable] WordPress Dashboard Option: Should be set to either disable (which is likely to cause issues on more complex websites) OR modify heartbeat and increase the time to 300.
Closing Thoughts
After decreasing the Heartbeat API tick speed and optimizing its usage on your homepage, your website should be faster. It should also use less resources, thus making the backend a little snappier.
If you have any questions regarding the video tutorial or Heartbeat Control in general, feel free to ask below.
SCOTT
Thanks—that was easy to follow.
NEAL
What is the best settings for woocommerce?
I would advise just reducing the frequency and leaving it active in the frontend.
You recommend disabling front-end heartbeat. But does that negatively impact Buddypress activity (the most common community tool on the Wordpress platform)?
BuddyPress needs heartbeat on the frontend primarily because activity feeds use it to update. In that case, I would just reduce the frequency.