Connection test failed. HTTP/2 stream 0 was not closed

I got this error when try to connect a website (

Already asking hosting provider about Apache server, nothing’s wrong.

Anyone can help?

Thank you


Hi @marzhall

Welcome to the MainWP Community.

Are you trying to add that site to your MainWP Dashboard, or is it already added but has now disconnected?

First it was disconnected, try to reconnect still failed. Try reinstall the wpchild plugin, clear the cache, disable all other plugin still got that error. The other websites on the same hosting working normal, only this website cannot connect.

Any idea?


It appears that your child site is refusing connection over HTTP 2.0 protocol.

Try using this custom code snippet on your Dashboard:

add_filter( 'mainwp_curl_http_version', 'myhook_mainwp_curl_http_version', 10, 3 );
function myhook_mainwp_curl_http_version( $input, $site_id, $url = '' ) {
if ( $site_id == SITE_ID_WITH_THE_ISSUE ) {
return $input;

Replace the SITE_ID_WITH_THE_ISSUE with the IDs of affected site. You can find the ID by opening an individual Child site overview, and looking at the end of the URL.

The hook can be inserted using our free extension Custom Dashboard, or by inserting it into the functions.php file of the active theme on your MainWP Dashboard.

It works, thank you for your support!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.