Is there any way to fire heartbeat API from for website visitors?

As Mark Kaplun says in the comments, you shouldn’t do it. But here’s how to enqueue the heartbeat script for all users on the public side… if you really, really want to overload your server. add_action( ‘wp_enqueue_scripts’, ‘enqueue_heartbeat’ ); function enqueue_heartbeat() { wp_enqueue_script( ‘heartbeat’, includes_url( js/heartbeat.js ) ); }

Heartbeat API NOT disabling

Am I correct in my thinking that this file is only ever fired if someone is actually logged into the control panel and not under any other circumstances such as someone just visiting the site? No, Ajax API is used for arbitrary requests, including those for the front–end and non–authenticated users. Am I correct in … Read more

Why is the Ajax heartbeat included in my cached frontend pages? Is it OK to get rid of it?

No, it’s not okay to lock down or block access to wp-admin and/or it’s sub-directories. Not only you already mentioned this is a crude method, it could and most likely will break the site, depending on its theme/plugins. The reason is that some plugin or themes depend on either admin-ajax.php or admin-post.php to accomplish some … Read more