General Topics

WordPress Heartbeat Oops Causing Site Errors

In this article, we will talk about WordPress heartbeat which is causing for different errors like internal server error etc. If you see the best blogging platforms. Then WordPress will show on the top of the list. Because this is an open source free software with a lot of features. Often beginners confuse while choosing the software and the website. They select .com instead of .org software and after that. They know that they choose the wrong platform.

So here we have published an article about it: difference between .com and org. This is a software which can easily install with one click and manually install in the CPanel. is a great invent of great developers. But some of the new inventions make site speed slower. In fact, it’s a background script. The script run every time with a specific period and cause of CPU resource usage CPanel.

What is WordPress Heartbeat?

Know more explanation about it. It takes from the heart beating word. Because heartbeat API generates pulses with different actions. In fact, WordPress heartbeat is a script and create communication between browser and server. However, WordPress heartbeat introduced in the version of 3.6. WordPress heartbeat features are as below:

  • Post auto drafting
  • Post revision track

WordPress Heartbeat Working

The script which used by WordPress heartbeat is “/wp-admin/admin-ajax.php” WordPress. This is a nice feature of this software which tracks every moment of the dashboard. But the issue of this script is that. It runs every time and makes causes of excessive resource usage CPanel. And due to resource usage you face internal server error.

In fact, the problem starts when an admin login and minimize the window. Then admin-ajax.php working repeatedly after a specific time.

When scripts execute then it leads to resource usage CPanel. And if you want to rid of excessive resource usage CPanel. Then disable this feature by using some simple codes.

How To Disable WordPress Heartbeat Completely?

Now see how to disable completely? For disabling this feature of WordPress you need to access function.php.

If you want to disable completely. Then just copy the below code and paste this in your function.php after opening tag <?php.

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {

WordPress Sitemap XML Declaration Allowed

After pasting, this code some functions of your website will not available. But it will work great against excessive resource usage CPanel. By the way, you can disable this while using your admin dashboard.

How To Disable WordPress Heartbeat From Admin Panel?

If you want to disable this feature only from your Admin Panel then use the below code in your function.php. Keep in mind don’t use more than one code at a time. Because it will make the cause of different difficulties.

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
global $pagenow;
if ( $pagenow == 'index.php' )

Disable from post.php and post_new.php pages

By using the below code we can alive for the post and post_new.php pages where the most need of this.

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
global $pagenow;
if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' )

By the addition of the above code in your site’s function.php. The Heartbeat will disable but keep alive on post.php and post_new.php pages. This is the best option which keeps away from enabling and disable option again and again. We will suggest you that don’t open your admin area every time. Just open your WordPress admin area when you need to work. Otherwise, log out or close the window. It also helps to use less resource usage CPanel.

If you have another idea about WordPress heartbeat. Then don’t forget to share in the comment section. If you are a beginner and don’t want to take the risk. Then read here: how to control with plugin?

Tagged With
Show More

Global Blurb Team

"Global Blurb since 2015" Global Blurb providing information about SEO, Beauty, Health & Fitness, Interior designing, Fashion and ways of earning online without investing a penny. The blog designed to share ideas about different topics.

Want to contribute

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button