softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

How To Set Frequency Of WordPress Heartbeat And Limit Executions?

HomeHow To Set Frequency Of WordPress Heartbeat And Limit Executions?

Offer Expire Soon..


Only New User..


The WordPress 3.6 version launched the WordPress Heartbeat API. WordPress Heartbeat API enables the communication of your browser and the server while you are logged into the WordPress admin panel. This feature enables WordPress to manage various aspects like letting the other author know that a particular post is being edited by some other user, the plugins can also use the script executions and thereby you can get notifications in real time etc.

Even though the WordPress Heartbeat API looks like a great feature, it might cause some issues in some situations. The Heartbeat makes checks at different time periods on different pages of your website – like for the post edits, it makes a check in every 15 minutes and on the Dashboard, the check is made every minute etc. Every ‘tick’ made by the Heartbeat creates a POST request that adds to the number of your executions and it also adds to the CPU time used.

The WordPress Heartbeat feature makes use of the wp-admin/admin-ajaz.php file in order to make the AJAX calls. If you notice that a large number of POST requests are generated by that file, it means that you have to limit the work of Heartbeat or you need to stop it completely.

Table of Contents

Toggle
  • How To Limit Heartbeat?
  • How To Disable Heartbeat?
  • How To Stop Heartbeat Completely?

How To Limit Heartbeat?

It is possible to limit the execution frequency of WordPress Heartbeat. This can be done by making use of a plugin known as ‘Heartbeat Control’.

  • Install the Heartbeat Control plugin and activate it
  • Now go to ‘Settings’ and click on ‘Heartbeat Control Settings’
  • From the ‘Heartbeat Behavior’ drop down menu, select ‘Modify Heartbeat’
  • Select all the ‘Locations’
  • From the ‘Frequency’ slider, select 60 or above
  • Save the settings

When the settings are saved, you will override the Heartbeat execution frequency that is set by default. The frequency will be set to the value that you set through the Frequency slider.

How To Disable Heartbeat?

You can disable WordPress Heartbeat by selecting the option ‘Disable Heartbeat’ from the ‘Heartbeat Behavior’ drop down menu and enable all the ‘Locations’. This will disable the use of Heartbeat feature on all the pages of your website.

How To Stop Heartbeat Completely?

If you no longer wish to work with the WordPress Heartbeat feature, you can stop it completely. For doing this, you have to edit the ‘functions.php’ file of your theme and paste the lines mentioned below right after opening the ‘<?php’ tag:

add_action( ‘init’, ‘stop_heartbeat’, 1 );

function stop_heartbeat() {

wp_deregister_script(‘heartbeat’);

}

This will completely stop Heartbeat from working on your website and it will no longer add to the number of executions and the CPU time utilized for your account.

Faizan Khan
9
Latest News
Prev PostHow To Fix A Responsive WordPress Theme To Look Good On Mobile Screen?May 14, 2024
Next PostHow To Protect Your WordPress Website From Spam?May 14, 2024

Related items

Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
146
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
130
Latest News

Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate xx bytes)

WordPress is a free open source blogging tool. When posting a article OR uploading a image

Faizan Khan
14/05/2024
142
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.