So, you finally thought of a blog post to write and when you open WordPress, you see “Connection Lost: trying to reconnect” or similar error.
Pretty frustrating, right? We know. That’s why we are here with the complete solution to fix this problem.
WordPress Connection Lost Problem
You might face the same problem in many possible ways. In most cases, it occurs when you’re writing a post or creating a page, all of the sudden, you see a small warning/error message which says the connection is lost and auto-saving has been disabled.
The common error message is “Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.”
It’s nothing to worry about and it’s a common error that you might come across. Here is the complete solution for it.
At first, we will try to solve it using common methods. However, if it doesn’t solve the connection lost error in WordPress, we will surely move to the advanced method which works.
Things to Keep in Mind
There are a few things that you need to keep in mind. This will help many users.
The first thing is to keep the post tab open and do the procedure in the new tab. Sometimes, when you try to publish/update the post, it might not be saved and will give you an error saying “The page took too much time to load” or similar.
Therefore, don’t try to exit the page or move to the next page unless the error is solved. You can keep the tab open and do the changes in the new tab. Once the error is gone, you can try to save/update the post.
Even though it says “Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.” We suggest you not to trust the browser. In some cases, it might not be saved to the browser too.
You can also copy the post in word document just in case. This will help you in having a local backup. You can directly use this post if the post is gone.
Please note that none of this will happen in most cases. However, it is always better to take proper precautions. You surely don’t want to waste the precious hours that you spent in writing the post. Also, it is quite frustrating to write the same post again. So, always be careful.
Let’s love for the solutions, open a new tab, and try one of these things.
Check Your Internet Connection
One of the most common reasons is the internet connection. Even the error says the same thing, “Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.”
So the first thing is to check your Internet connection.
You can simply try opening Google or maybe our website on your computer to see the Internet connection. We know many of you might have already tried this. So, let’s move on to the next solution.
The Cache Plugin
If you’re using a cache plugin or recently activated one, that might be the reason for this. The plugins like W3 Total Cache or WP Super Cache might give some conflict here.
The problem will be solved by either enabling admin cache or disabling object cache.
You should first head over to Performance > Object Cache if you’re using W3 Total Cache. You will see the last option to enable caching for wp-admin requests. Just click it and hit the save button.
Try opening the page the error will be gone. If not, you can surely try disabling object cache.However, if nothing works, you can also try disabling the cache plugin for a while to see if the error is gone or not. This will give you a clear idea about what’s wrong. If something is wrong with the plugin, you can play around with the plugin to solve it.
Increase the Memory Limit
You can also try increasing the memory limit of your WordPress website.
For that, you will need to open your cPanel or web panel and head over to the file manager. You can also use FTP to make the changes. However, the file manager will be easier to follow.
Head over to your WordPress directory and download the wp-config.php file. That’s only for the backup. Now, you can edit the file. Right-click on it and hit the “code edit” button.
Add the following line in it.
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
This will increase the memory limit of your WordPress website.
You can also ask your server administrator to do so if it is not in your hand. Don’t forget to ask them to increase the execution limit too. If you’re using shared hosting, you don’t need to increase the execution limit. Just increasing the memory limit will do the work.
Try seeing the posting page now.
Server Side Issue
If the above two techniques don’t work and your Internet connection is also working fine then the error could be from the server-side and not from yours.
You can try opening other websites to see if it loads normally and at the same time. If it is taking more time to load or it is not opening at all, the issue might be from the server-side. It is recommended to check other websites too. This will confirm that your Internet connection is fine and there is some problem with the server-side.There might be two possible reasons why the server-side is down. One is because you exhausted all the resource limits and the other one is because there might be some actual problem from the server-side.
The first thing to do here is to check out the cPanel and see if the resource limit is hit or not (more about it in the next section).
If everything is fine in the resource limit, you have no other option but to contact the support. Most hosting providers allow live support. You can contact the team with live chat whenever you want. So, you can do this and they will guide you on what to do next. If the problem is from their side, they can also give you the estimated time on when the servers will be back.
If the problem isn’t from their side, you can also ask them for support. Most hosting providers can tell you what’s wrong. So, you might get the reason for the real problem.
Don’t worry, the guide to solve the WordPress connection lost is not yet completed. Let’s see the next solution.
Resource Limit Hit
If the resources limit is hit, here is how to find out.
The auto-saving feature uses a lot of resources as a request is sent after every few seconds. If you keep the page open for a long time, this might exhaust the limit.
So, you need to check this. You can simply head over to your cPanel and see on the right side. There will be a couple of resources stated. If one or more are in red colors, you need to take proper precautions. This simply means that your website resources are full.
You can also head over to the Ports option. This will tell you if one or more of your ports are blocked. If there are some viruses or malware in your files, the hosting provider might block the port. You will get all the information from port options. If not, you can contact the support.The solution here would be to upgrade the plan or to go with better hosting. That’s the reason why we suggest you go with highly reliable hosting providers such as HostGator, Bluehost, or A2Hosting.
If that’s not what you want to do then you can tweak the options. This might work for you but this might also give you problems. The problems are very rare but it depends on what’s your website is all about and how you use the admin panel. We will surely understand the solution as well as see the possible issues that you might face.
Don’t worry, it is not hard to do it and we will see the exact steps to do it. You can just follow them.
Heartbeat control is the way to control the resource limit. Sometimes, it takes time to write the post and the resource limit might be exhausted for this reason.
Let’s understand it before we make the changes. Heartbeat controls when the server sends the autosave request.
By default, WordPress has auto-save functionality enabled in all the places. It will save the posts, pages, themes, etc without you hitting the save button.
By default, the time is set in seconds. So, it will automatically send a request to the server after every couple of seconds.
If you’re usually in the post editor for a long time, there would be a lot of requests sent to the server. This might hit the resource limit and your server will be full.
So, you can increase the time internally. Heartbeat allows you to do it with ease.
To tweak the settings, you will first need the heartbeat control plugin. You can install it from the WordPress directory.
Now, we can tweak the changes.
You can first disable the extra auto-saving changes. Head over to settings and click on control heartbeat locations. You can select “only post and pages”. This will disable autosaving for all the other things (such as theme customization) except posts and pages.
The next thing you can do is set the “Heartbeat frequency” to 60 seconds.This means your post will be autosaved only after 1 minute. This will solve the problem and you won’t see the “Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.” message again.
It is not necessary to make both the above-given changes. You can also change the time interval as per your writing speed.
Disabling Themes and Plugins
Until now, most of you might have already got a solution to the problem. If you’ve not yet got the problem, we will see the common and last working solution.
With that being said, let’s move on to the last solution to this problem. This is the ultimate solution for all the WordPress problems including the connection lost problem. If nothing works, this might surely work.
The solution is to disable all the themes and plugins to see if any of these are causing the issue.
If you recently installed any theme or plugin, you can try deactivating only that plugin to see if the problem is solved or not.
Further, if you have any plugin for cache or optimization, that particular plugin might be the issue. So, you can either tweak the plugin or you can deactivate it for troubleshooting.
You can also run the virus scanner given in the cPanel to see if there are any viruses. Delete or fix those files to remove the error. We have a dedicated article on this cleaning procedure.
To conclude, this was all about the connection lost error and how to fix it. Don’t forget to try on some other device to see if the same problem happens. There might be some issue with your browser or device. You can try changing the browser or changing the device to see if it is working.
Lastly, we suggest you to first try all the other things and if it doesn’t work, you can come to the heartbeat section. You can tweak the Heartbeat section even if everything is fine. This will decrease the load on your server. Don’t increase the time internal to too many seconds. This will not save the post data and you might have to write things again. Lastly, if it happens too often, you can migrate to Bluehost or A2Hosting.
Do let us know in the comment section which of these methods solved your problem.