Child Sites not staying connected

I really love this tool, and use it for managing a number of clients’ sites across many different servers/hosts. The community here helped me figure out why I wasn’t able to connect to some sites even after a successful test (check to see if www prefix is needed), but I haven’t been able to figure out this other issue for quite some time. And so, I’m asking now.

I have about 5 or 6 sites that can’t seem to stay connected. I run a sync in my Dashboard at least once per day, and the same few sites always show as disconnected.

Clicking the button to attempt a reconnect, I am always met with the Public Key Already Set message.

A pattern I have noticed is, if I open a new tab and login to the client site directly and take no other actions, when I come back to the MainWP Dashboard and try the Reconnect again, it works.

These sites then stay connected for approximately 12 - 24 hours, before showing as disconnected again in the Dashboard.

While this fix kinda works, it seems against the point of having a remote management dashboard if I need to re-login to each site manually every day before I can run updates remotely.

For reference, 3 of the client sites are on Windows hosting that I do not have access to manage (but I do have a knowledgeable contact to work with), and the other 3 are on different levels of GoDaddy hosting (which I can access if needed). I don’t know if the Windows-hosted sites have a firewall rule limiting connection time, but I can say the 3 GoDaddy hosted sites have the same server-level security and firewall rules as at least 12 of the other sites that always stay connected.

My Dashboard site is hosted on Nestify VPS.

Any guidance on [a] how to keep the sites connected without logging into them daily, or [b] what might be causing this repeated disconnect and the Public Key Already Set error, would be greatly appreciated.



Glad you enjoy our suite. Before I get into explaining some of the things you mention about above —

Can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Status → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:


Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

Sure thing:

### Server Info                    Required                                               Detected                                     Status   ###

MainWP Dashboard                   
MainWP Dashboard Version                                                                           Pass        
MainWP Upload Directory            Writable                                               Writable                                     Pass        
MainWP Extensions                  
MainWP UpdraftPlus Extension       4.0.2                                                  API License Active                           Pass        
Activity Log for MainWP            1.7.0                                                                                                           
MainWP Client Reports Extension    4.0.9                                                  API License Active                           Pass        
MainWP Maintenance Extension                                                API License Active                           Pass        
MainWP Rocket Extension            4.0.2                                                  API License Active                           Pass        
MainWP Vulnerability Checker Extension4.1                                                    API License Active                           Pass        
MainWP WooCommerce Status Extension4.0.2.1                                                API License Active                           Pass        
MainWP Wordfence Extension         4.0.4                                                  API License Active                           Pass        
WordPress Version                  >=3.6                                                  5.8.1                                        Pass        
WordPress Memory Limit             >=64M                                                  40M                                          Warning     
MultiSite Disabled                 =true                                                  true                                         Pass        
FileSystem Method                  = direct                                               direct                                       Pass        
PHP Version                        >=7.0                                                  7.3.30                                       Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Max Execution Time             >=30 seconds                                           30                                           Pass        
PHP Max Input Time                 >=30 seconds                                           60                                           Pass        
PHP Memory Limit                   >=128M                                                 256M                                         Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Upload Max Filesize            >=2M                                                   128M                                         Pass        
PHP Post Max Size                  >=2M                                                   128M                                         Pass        
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        
cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          60                                           Warning     
cURL Version                       >=7.18.1                                               7.79.1                                       Pass        
cURL SSL Version                   >=OpenSSL/1.1.0                                        OpenSSL/1.1.1l                               Pass        
PHP Allow URL fopen                YES                                                    
PHP Exif Support                   YES ( V7.3.)                                           
PHP IPTC Support                   YES                                                    
PHP XML Support                    YES                                                    
PHP Disabled Functions             exec,  passthru,  proc_open,  system, show_source,     
PHP Loaded Extensions              Core, OAuth, PDO, PDO_ODBC, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, ionCube Loader, json, ldap, libxml, litespeed, mbstring, mcrypt, memcached, mysqli, mysqlnd, odbc, openssl, pcre, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, session, shmop, snmp, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL Version                      >=5.0                                                  10.3.25-MariaDB-cll-lve                      Pass        
MySQL Client Encoding              utf8mb4                                                
Server Info                        
Server Software                    Apache                                                 
Operating System                   Linux                                                  
Architecture                       64		 bit                                               
Server Protocol                    HTTP/2.0                                               
HTTPS                              ON                                                     
Server self connect                Response Test O.K.                                     
User Agent                         Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Gateway Interface                                                                         
Memory Usage                       13.34 MB                                               
Request Time                       1635521182                                             
Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Charset Content             N/A                                                    
MainWP Settings                    
Number Of Child Sites              51                                                     
Use WP-Cron                        Yes                                                    
Optimize for Shared Hosting or Big NetworksYes                                                    
Automatic Daily Update             Install trusted updates                                
Abandoned Plugins/Themes Tolerance 365                                                    
Maximum number of posts to return  50                                                     
Maximum number of pages to return                                                         
Primary Backup System              Default MainWP Backups                                 
Maximum simultaneous requests      4                                                      
Minimum delay between requests     200                                                    
Maximum simultaneous requests per ip1                                                      
Minimum delay between requests to the same ip1000                                                   
Maximum simultaneous sync requests                                                        
Maximum simultaneous install and update requests                                                       
Active Plugins                     
Activity Log for MainWP            1.7.0                                                  Active                                       
Admin Color Schemer                1.1                                                    Active                                                                        
MainWP Dashboard                                                        Active                                       
UpdraftPlus - Backup/Restore       1.16.63                                                Active                                       
Wordfence Security                 7.5.6                                                  Active                                       
WP Force SSL                       1.57                                                   Active                                       

@SunfireWeb Thanks for the update. Everything looks ok there except the WordPress Memory Limit & cURL Timeout. Not saying this could be the issue but since it’s easy to fix might as well do it. Simply add these two lines to your MainWP Installation wp-config.php file about the “/* That’s all, stop editing! Happy blogging. */”

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
ini_set(“default_socket_timeout”, 300);

Go over your Child Site Reports and look far any inconsistencies too if needed add these two lines to their wp-config.php as well.

It kind of sounds like the Child Sites are having a wp_cron issue since it tends to fix itself once you navigate to that site.

You could also try to uninstall & reinstall the Child Plugin completely too - see if that helps.

If non of this help we will go further.

Thanks Keith. I will adjust those settings on my MainWP installation and review the Child Sites reports.

I will add that for these that give the error, I have already attempted to completely remove and re-install the Child plugin on each - that seemed to keep them connected for about a week before reverting to this daily disconnect behavior again.

I did consider wp-cron, but thought it weird that simply visiting the site was not enough to trigger the successful reconnect - I need to actively log into the site before it can completely and properly reconnect in the MainWP dashboard…

I’ll report back soon.

Alright, so first glimpse at settings in one of the Offending Child sites, and I do see a similar Warning for both Memory Limit and cURL timeout, but I also noticed this warning as well:

	cURL SSL Version	>=OpenSSL/1.1.0

Could this be a factor?

Edited to add: Child sites that have no trouble staying connected are also displaying the above SSL error, as well as the same Memory Limits and cURL timeouts…

@SunfireWeb Yeah go ahead and add those lines just to rule that out.

Visiting a MainWP website either front-end or back-end will trigger the wp_cron to fire off which snowballs a bunch of other scripts to fire off. One of them is most likely the one that deals with the creation of the connection token. - visiting the site refreshes it. This is conjecture without looking into code.

What’s the second half of that line? That’s just stating you need to have greater or equal to OpenSSL version 1.1.0 installed. What’s the actual version running on the server? Also, does your child site’s plugin stack include any FireWalls such as iThemes Security?

I am just glad you can get them reconnected and it’s just intermittent.

All of the child sites have Wordfence firewall in place - same settings across the board. A large portion of my Child sites also have GoDaddy Firewall in place, but only 3 of those are in this group that keeps disconnecting. The other 3 which keep breaking off are not on GoDaddy at all.

A large majority of the Child sites show same as this screenshot:

although some are .1d and others are .1g

I’ll add those lines to the wp-config files and give it another day or two.

@SunfireWeb v1.1.1g is Greater or Equal to 1.1.0 … that’s odd… hmmm Is this a bug @bogdan

I thought it was weird to flag it as a warning if the reported value was in fact greater than expected…

As a side note, I just ran a fresh sync in my MainWP Dashboard and the same 5 sites are once again disconnected, even after adjusting the Memory Limit and cURL Timeout yesterday.

Probably time to explore firewalls and/or crons a bit deeper…

Yeah - I’m not sure if I asked you if you are using any WAF or CND such as Cloudflare…If you are you may want to Whitelist your IP.

It may be helpful to contact your Hosting company and see if your MainWP Dashboard I.P. address is being blocked by there CSF rules or some where else. If anything they will be able to help you perform a TRACERT to find out where things are breaking down in the line…

Thank you for your patience with the back and forth as well - I know it can be frustrating but this is the nature of the beast with intermittent issues like this.

I am totally fine with the back and forth - it means there’s an attempt happening. Better than some support forums that drop a copy/pasted reply and never check back.

These sites all have the Wordfence Firewall on, as do all of the other sites I’ve got running through MainWP (which stay connected). I will add my MainWP Dashboard site’s IP address to the Wordfence allow list just in case.

Three of the Offending sites are on unique hosting that may have additional firewalls I’m not aware of, so I will reach out to my contact with that company and see if there is anything on their end possibly blocking or simply disconnecting my access.

As for the others that keep disconnecting, they are on GoDaddy shared hosting, one with additional GoDaddy Security, one without, so I will see if I can get any help from them on what might be hindering my sustained connection. What’s really interesting here though is that the one on GD Security is hosted with another site in my Dashboard that has no trouble staying connected… Why, when hosted on the same server, would one drop but not the other? I’ll see if GoDaddy can help figure that out…

Thank you again for your efforts in helping me work through this. Once I get this issue worked out, I’ll have another to explore, though. Are there any known issues with WP Engine hosting I should be aware of?

Just what’s listed here: Hosting Compatibility - MainWP Documentation

MainWP Connects via PHP cURL on ports 80 for HTTP & ports 433 for HTTPS

You can find your MainWP Server I.P. within your MainWP > Status > Server menu

Hoping to hear good new back.

Thanks and thanks. I will hopefully have something to report next week. Have a good weekend.

1 Like

Here it is Monday, and we’re still having issues. On Friday, I made sure my MainWP Dashboard IP was added as “safe” in any/all firewalls that I know of and have access to.

My contact at the unique hosting explained that their firewall only blocks addresses if they set it (so I take this to mean they have an explicit-deny rather than explicit-allow firewall, which I find interesting). He said I shouldn’t be blocked unless they added my IP address to a list, and the address I gave him was not on that list.

As for the GoDaddy hosted sites, I added my IP address to the one using GoDaddy Security in the Allow list.

For all of these sites, I also added my IP as safe within Wordfence.

This morning, when I ran a “Sync” from the dashboard, it showed me the number of updates needed, but when I tried to click “update” for anything, it showed the red X. So I tried syncing the site singly (instead of in the whole group) and it came back as “disconnected”. Clicking “attempt reconnect” once again gives the “Public key already set” warning. But as before, if I visit the site and log in, it reconnects without issue.

So far, no progress. What other ideas can we explore?

Hi Connie,

I have seen similar behavior a few times, and it was caused by a plugin or theme conflict.

Can you tell me have you tried to temporarily disable all plugins (except for the MainWP Child) on one of the sites in the issue and see if that helps? If not, I would recommend checking if there is a plugin that you use on all sites that get disconnected. Also, do you use the same theme on these sites?

Let me know how it goes.

I have not yet tested for plugin conflicts, as these are all client sites and I don’t want to disrupt their site for an entire day (since the issue only crops up after 12+ hours from when I log in). I will check and see if one of them would mind the site being down for a day while I test this theory, though. Does having the site in “Maintenance Mode” affect the connection to MainWP at all?

As for themes, we are unfortunately using old, custom themes that are not supported nor well-coded to begin with. Again, switching to a default theme to test this out would take the site ‘down’ for a day. There is potential these sites may get new themes in the new year though, so I’ll keep that in mind and suggest these particular sites get updated sooner than later if possible. Any known theme conflicts I should avoid?

Hi Connie,

If you manually trigger the Sync process for one of the sites in the issue, does the site get disconnected or it syncs fine?

If you cross-reference sites, can you see if there is a plugin that is used on all of them? If there is one, you could temporarily disable it one one site without getting the site offline for a day.

However, to be honest, old and “not well-coded” themes is where I would start. I know that these kind of tests are tricky, but if a site gets disconnected on manual sync, the whole troubleshooting process can be much faster.

For example,

  1. Sync site
  2. Once disconnected, reset MainWP Child and reconnect the site
  3. Switch to default WP theme
  4. Sync site again
    if it syncs fine we will know it’s the theme causing the issue. you can do the same for plugins or keep looking. This kind of test should not take longer than 10 minutes.

Generally, the sites show as Disconnected on the group sync, and when I try to manually reconnect the individual site (without having logged into the site recently), it shows the “public key already set” message. If I log into the site (as I would need to do to reset the MainWP Child), the manual reconnect will always work. So I’m not sure your test process would confirm anything in this case…

I have not been able to pinpoint a single plugin that is in use across all offending sites, but I will take a closer look (probably not until tomorrow, tho).

For clarification, by “reset MainWP Child” do you mean that I should deactivate then reactivate the plugin on the child site?

I’ve got a similar issue, and had been following a previous thread on the issue, but back in early to mid-October, the sites that were not seeing the child plugin would either reconnect randomly on their own, or eventually reconnect manually when I tried them. However, we’ve been at 15 connected and 71 disconnected since October 26th.

Several of the connected sites are on the same servers as sites that are disconnected.
None are using the same theme.
I’ve removed a site and tried re-adding after doing a connection test on that particular site, which came back successful, so it is not blocked by a firewall. Re-adding it did not work, as it was unable to confirm the child plugin. (In general, connection tests all seem to pass, when checking random sites from the list.)
However, literally every disconnected/unsyncing site last synced on the same day, within a span of 4 hours, and has not been able to communicate since.
As for plugins in common, the sites that are connected have similar plugin makeup as the sites that are not connected.