"Unable to connect to the filesystem" in MainWP child using ssh2

Hello,

after enabling MainWP Child on one site and trying to connect it in the MainWP Dashboard :

  • There’s the following error during connection on the dashboard side : “MainWP Child plugin not detected or could not be reached!”

  • And this error in the PHP error log file on the child site :

php-fpm8.3[3637475]: PHP message: PHP Fatal error: Uncaught MainWP\Child\MainWP_Exception: Unable to connect to the filesystem. in REDACTED/wp-content/plugins/mainwp-child/class/class-mainwp-helper.php:134"
php-fpm8.3[3637475]: Stack trace:"
php-fpm8.3[3637475]: #0 REDACTED/wp-content/plugins/mainwp-child/class/class-mainwp-utility.php(612): MainWP\Child\MainWP_Helper::get_mainwp_dir()"
php-fpm8.3[3637475]: #1 REDACTED/wp-content/plugins/mainwp-child/class/class-mainwp-child-stats.php(320): MainWP\Child\MainWP_Utility::validate_mainwp_dir()"
php-fpm8.3[3637475]: #2 REDACTED/wp-content/plugins/mainwp-child/class/class-mainwp-connect.php(161): MainWP\Child\MainWP_Child_Stats->get_site_stats(Array)"
php-fpm8.3[3637475]: #3 REDACTED/wp-content/plugins/mainwp-child/class/class-mainwp-child.php(325): MainWP\Child\MainWP_Connect->register_site()"
php-fpm8.3[3637475]: #4 REDACTED/wp-includes/class-wp-hook.php(324): MainWP\Child\MainWP_Child->parse_init(‘’)…"

The child website is configured to use the ssh2 FS_METHOD : configuration regarding base directory, hostname, port and credentials are OK as we are able to install, update or delete plugins via the WP administration for example.

The MainWP configuration is using a unique security ID, administrator login and no password verification.

Both plugins are using the latest versions :

  • MainWP Dashboard : 5.4.0.11
  • MainWP Child : 5.4.0.10

What can be done to diagnose this problem ? and moreover, how to solve it ?

Thanks in advance for your help

Hey @nobilito

Welcome to the MainWP community.

I will check with the development team and I’ll get back to you as soon as I can.

Hey @nobilito

The team has prepared a pre-release version of MainWP Child plugin for you: https://www.dropbox.com/scl/fi/o5mmdi94y27ntu77st87i/mainwp-child.zip?rlkey=ue5ql69q4ssw6aoj1gww3drji&st=6r02lrr5&dl=0

This should help with the error you’re experiencing.

However, please keep in mind that the MainWP Child plugin does not have full support for non-direct fs-methods so we cannot guarantee that you won’t experience any other issues.