The WordPress Heartbeat API is a great feature and opens up some great opportunities for plugin developers. However, in some cases, it can increase CPU usage and slow down your website. In this article, we'll show you how to limit or even turn off the Heartbeat API in WordPress.
WordPress HeartBeat API
Introduced in WordPress 3.6, the Heartbeat API allows your browser to communicate with the server via AJAX calls when you are logged into the WordPress admin area. This allows WordPress to indicate to other authors that a post is being edited by another user and allows plugin developers to show you notifications in real time.
This sounds great, but if you have too many requests, list of belize cell phone number your server will slow down. Let's look at how to limit or turn off the WordPress Heartbeat API completely.
First, you need to install and activate the Heartbeat Control plugin. After activation, you need to go to Settings » Heartbeat Control to configure the plugin.
Under the Heartbeat Control Locations option, you can choose where you want to control the heartbeat settings. You can disable it on the dashboard, allow it on post edit pages, or disable it completely everywhere.
Changing heartbeat api call intervals
The next option allows you to control the frequency of the heartbeat. By default, heartbeat calls a post every 15 seconds on post editing pages and every minute on the dashboard. You can choose a higher frequency.
How to restrict Heartbeat API in WordPress
-
- Posts: 647
- Joined: Sat Dec 21, 2024 5:46 am