Is there a way to auto-reconnect to disconnected sites?

I have a few sites that frequently disconnect from MainWP. It’s just a temporary situation, likely due to their hosting, so would like if MainWP could automatically try to reconnect to them via cron job, if possible, rather than leaving them disconnected until I log in and manually do it myself.


Hi Matt,

by default, MainWP has a built-in feature to attempt the site reconnection process once per hour.
If there are no problems with the connection, disconnected sites should be reconnected.

1 Like

Thanks, but this doesn’t appear to be happening. I often log in to find 3 or 4 sites disconnected. My hosting is relatively solid. Uptime monitoring shows no outages.

I didn’t know this and haven’t seen this work yet, so are you sure this is actually working?

1 Like

Yeah, I checked with the dev team. If you are not sure that this is working for you properly, can you try to set a test by disconnecting one site and if it doesn’t work, please shoot us a ticket so we can look into it.

The challenge is now how to disconnect a site, without disabling the Child plugin on the site, leaving it vulnerable for others to take over control.

Hi Jos, unfortunately, that is the only way I know.

Maybe the best and safest thing to do is to set one blank test child site that would be used only for this test.

I’ve just disabled the child plugin on a test site, did a sync from my dashboard to disconnect the child and activated the child plugin again. Now we’ll wait…

1 Like

After 4 hours, the site didn’t reconnect automatically. After that I synced my sites, installed many updates on other sites, so I was active on my MainWP dashboard. However the client site is still disconnected. So I wonder what should trigger the reconnect. It has been 7.5 hours now, but I’ll wait until tomorrow morning, before I reconnect manually.

Hi Jos,

thanks for running the test.

I got in touch with the dev team and got more information about this.

The auto-reconnect feature is part of the mainwp_cronstats_action corn job that is an hourly cron job, but the reconnect function runs only once per day. I apologize for the inaccurate information in my previous post.

In addition to this update, the dev team made some small improvements for this functionality in this version. If you want, please install the version and wait for 24-48 hours to see if it works properly.


After 21 hours it’s not reconnected yet, so I’ll wait for a few more to check the “once per day” schedule.

The next step will be the modified version, although waiting 24-48 hours doesn’t sound like an improvement.

Just a quick idea: most sites that are disconnected unintentionally should be able to reconnect in a few minutes or an hour. If not there’s something seriously wrong, and the admin should be notified. After that a reconnection attempt could be made after 4-6 hours and after that daily.
These notifications could be send by mail or even better via Slack, but that might be another topic.

Hi Jos,

thanks for getting back to me.

Their improvement is to make sure that the cron job runs properly, not more frequently. However, I do see that this feature has some space for additional improvements.

I will talk to the dev team and see what can we do.

I also agree that the Reconnect feature should run more frequently.

1 Like

Hi Bogdan,

It’s been 41 hours now and the child hasn’t reconnected yet. So I just installed the new version. I checked the code diff, but didn’t see anything related to reconnecting disconnected child sites. Only something regarding to stats where something changed from weekly to daily, but maybe that’s also used by a function that triggers the reconnection.

I’ll keep an eye on it for at least the next 24 hours.

1 Like

Thanks Jos, let me know how it goes

1 Like

It’s been 28 hours after installing the new version and the child site still hasn’t reconnected.

Hi Jos, thanks for letting me know.

I will have our dev team check this again.

1 Like

Hey Jos,

here is a new MainWP Dashboard version that I got from the dev team, let me know if this one solves the problem for you.

Thanks again for your help.

1 Like

I’ve installed the newest version and will keep an eye on the reconnect. This time the code diff makes more sense. :slight_smile:

1 Like

Thanks Jos, I will wait for your update.

Today the site was reconnected! I think it was about 6 hours ago. About 17.5 hours after updating to the latest version.