WordPress – Completely disable Heartbeat Control

Last updated on April 1st, 2023 at 06:38 pm

Read Time:1 Minute, 33 Second

If you are having speed issues with your WordPress website then you may find that this is because of the the heartbeat control that is within the WordPress software. Running speed checks on your website like PingDom may reveal that your admin-ajax.php is taking ages to load.

So, what do you do about it?

It really depends on your own situation – if you have multiple administrators on your site that you will not want to disable this feature but you can stop it checking every 15 seconds and change it to 60 seconds by using Heartbeat Control plugin.

But like most blogging websites you are the only person making any changes to your own website, then you may want to consider disabling the ajax completely. To do this, you need to make a change to your functions.php file – so, please be careful, one wrong move and you can completely disable your site so don’t come crying to us if you do screw it up!!

In your WordPress Administrator Console, browse your way to Themes > Editor then select the Theme Functions (functions.php) file. This will bring up the file edit and you should now add the following code straight after the <?php part at the top of the text:

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

Click the Update File button underneath the text box and this will completely disable the ajax function on your website.

NOTE: If you are currrently using Heartbeat Control or any other heartbeat plugin – disable it and delete it before making any of the above changes or your site will crash.


We would love to hear your feedback on this guide and whether it has helped you or if you have any further suggestions or questions – just leave us a comment below.

Avatar for Andrew Armstrong

About Post Author

Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 23 years. Sharing experience and knowledge whenever possible! Making IT Happen.
Click to rate this post!
[Total: 0 Average: 0]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 4,420 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.