Cannot add child site on a non standard port

Hi there, I am trying out running my MainWP dashboard on my local machine. It seems to work mostly, but I wanted to connect a new child site as a test, and I created that child site listening on port 8080. When I tried to connect the child site, I immediately got an error: "Connection test failed. Error message: Invalid URL.”

I tried a few different variations and noticed that no matter what the URL, it won’t accept it if it has a port specified. e.g. works but fails. To be clear, it’s not failing to connect (it doesn’t even get that far). Rather it fails to accept the URL at all.

Hi @kgourlay

The development team added a filter for other ports.

I will send you a pre-release version of the Dashboard via a private message.

After you install it, add this code snippet to the MainWP Dashboard (the easiest way is using our Custom Dashboard extension):

add_filter( 'mainwp_connect_sites_allow_ports', 'myhook_mainwp_connect_sites_allow_ports', 10, 1 );
function myhook_mainwp_connect_sites_allow_ports( $allows ) {    
    $allows[] = 8080;
    return $allows;

Wonderful, thank you!

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