WordPress Performance Optimization: Managing WordPress Heartbeat Request Frequency with Plugins

WordPress The Heartbeat API (Application Programming Interface) is used for features such as autosave, real-time notifications, and session maintenance, but frequent background requests can put a heavy burden on the server, especially in environments with high volumes of traffic or shared hosting. By controlling the frequency of requests, it is possible to reduce the stress on the server while retaining core functionality.

This article will explain the limitations WordPress Heartbeat The reason for the frequency of requests, recommend practical control plug-ins, and provide specific setup methods.

Image [1]-Optimizing WordPress Performance: Ways to Control the Frequency of Heartbeat Requests

Why you need to control the frequency of Heartbeat requests

By default, WordPress Heartbeat will run every 15-60 seconds to the backend of the admin-ajax.php Sent once AJAX request. As the number of users in the backend increases, such requests pose the following problems:

  • Occupy PHP processesThe server is under pressure.
  • Causes high CPU usageThe following is a list of the most popular servers in the world, especially on low-profile servers.
  • Impact on cache performanceThe overall loading efficiency is lowered.
  • Slow or laggy background operations

Reducing the frequency of Heartbeat requests can improve the stability of the background operation.

Second, the recommended plug-ins:Heartbeat Control

Heartbeat Control Plugin is a lightweight optimization plugin developed by the WP Rocket team and designed to control Heartbeat API requests.

Plugin Main Features:

  • Fine control of Heartbeat request frequency (e.g., 15 seconds, 60 seconds, 120 seconds)
  • Reduces load on server resources and improves performance
  • Manage Heartbeat activity by site area zones

Installation Steps:

  1. Backstage Access Plugins > Install Plugins
  2. look for sth. Heartbeat Control
  3. Click on "Install" and enable it
Image [2] - Optimizing WordPress Performance: Ways to Control the Frequency of Heartbeat Requests

Third, set the frequency of Heartbeat requests (recommended configuration)

After enabling the plugin, go to the backend:

Settings > Heartbeat Control

You will see the following configuration items:

1. Dashboard (back-office console)

  • Recommended setting: Disable
  • Reason: Console pages are used infrequently and HeartBeat is not very useful.

2. Post Editor

  • Recommended setting: Modify
  • Setting frequency: 60 seconds or 120 seconds
  • Reason: Retain autosave feature but reduce frequency to save resources

3. Frontend

  • Recommended setting: Disable
  • Reason: Most sites don't have Heartbeat calls in the foreground, it's safer to just disable it.
Image [3] - Optimizing WordPress Performance: Ways to Control the Frequency of Heartbeat Requests

Fourth, the plug-in use of recommendations and additional instructions

  • For large content sites or WooCommerce Store.It is not recommended to completely disable Heartbeat in the editor.Otherwise, the autosave and order notification functions may not work.
  • Can also be used in conjunction with Query Monitor Plugin Check if Heartbeat requests are currently frequent.
  • If the site uses the WP Rocket,LiteSpeed Cache performance plug-ins, you can prioritize checking if Heartbeat controls are already in place to avoid duplicating settings.

V. Summary

The Heartbeat API feature of WordPress brings convenience to background operations, but in some server environments, its default request frequency may take up too many resources. Using the Heartbeat Control plugin to adjust the call frequency can reduce server pressure without affecting core functions such as autosave and session hold, which is suitable for all kinds of site management scenarios.


Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
Customer Service
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Toast
THE END
If you like it, support it.
kudos50 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments