I just disabled Heartbeat with the plugin Heartbeat control and also adding this script in function.php of my child-theme

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

But i think it's still working and some plugin is overriding it. I still have large cpu spike while the site is in mantainance mode. Is there a function or action that i can use to check if this worked ?

  • Can I ask why you disabled heartbeat? I also see you tagged your question as wordpress.com, are you hosted on wordpress.com? WP.com support is offtopic here, if you're paying WP.com for your site you should speak with their support, otherwise, remove that tag
    – Tom J Nowell
    Dec 16, 2019 at 15:41
  • Sorry it was unintended, i removed that tag.
    – JoJo
    Dec 16, 2019 at 15:47
  • And the answers could be this
    – Charles
    Dec 16, 2019 at 16:51
  • @JoJo I assume you're disabling heartbeat to prevent CPU spikes? How did you identify that it was the Hearbeat script that was doing this? Or did you just google general cpu reduction articles and found heartbeat in a listicle? The best thing you can do to reduce CPU is to just do fewer things on each page, and deactivate plugin/replace them with faster plugins
    – Tom J Nowell
    Dec 16, 2019 at 19:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.