"Connection lost. Saving has been disabled..." WordPress Fix

Michael

BuSo Pro
Joined
Sep 4, 2016
Messages
312
Likes
205
Degree
1
At completely random times, my WP site will just stop working. During this time, you are unable to use the site until it is physically rebooted from my hosting panel.

The problem is associated with a new feature WP introduced in 3.6 - Heartbeat.

If you have a page open to edit, WP will try and talk to the server every minute or so that you can make use of features such as showing who's working on that same page as you are (typical WP adding bs features right?).

Anyway, here is the fix - completely disable this monstrosity. Add the following code to your functions.php file.

PHP:
//Disable Heartbeat
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}

Hope it helps anyone else having this problem.
 
Helpful post thanks, but have never had this problem across servers/VPS/etc. Maybe your hosting doesn't have enough resources?
 
Helpful post thanks, but have never had this problem across servers/VPS/etc. Maybe your hosting doesn't have enough resources?
Yeah I have plenty of resources. My server's CPU usage hasn't even gone past 4% yet. I've never had this issue on shared hosting, but I am now facing it on cloud hosting. Weird aye.
 
Back