This plugin provides the class WP_Filesystem_SSH2 to be able to make SFTP connections.
The class WP_Filesystem_SSH2 already exists in the WordPress core, but it is not loaded by default in the backend. Moreover, it requires to compile libssh2 in PHP.
This class does the same thing with the help of the phpseclib library. So there is no need to compile libssh2 in PHP.
This class has got no interface, it can just be used by other plugins to make SFTP connections like this:
$this->ftp = new WP_Filesystem_SSH2($options);
$options = array('hostname' => 'ftp.mydomain.com', 'port' => 22, 'username' => 'login', 'password' => '********' );
The class is documented on https://developer.wordpress.org/reference/classes/wp_filesystem_ssh2/
Note that if the core WP_Filesystem_SSH2 class is already loaded, this plugin will do nothing.
- Provides SFTP functions
- PHP 5.6 minimum
Fixed: Notice: Trying to access array offset on value of type bool