WP Filesystem SSH2

SFTP

Free

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);

where

$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.

Features

  • Provides SFTP functions

Requirements

  • PHP 5.6 minimum

Change log

1.0.6

Fixed: The class WP_Filesystem_SSH2 was not loaded when running the import through WP-CLI

1.0.5

Fixed: Fatal error: Uncaught Error: Class “WP_Filesystem_Base” not found

1.0.4

PHP 8.2 compatibility

1.0.3

Fixed: Notice: Trying to access array offset on value of type bool

1.0.2

Fixed: Parse error: syntax error, unexpected ‘new’ (T_NEW) in /usr/local/pear/share/pear/Crypt/RSA.php on line 232

1.0.1

Fixed: Notice: Trying to access array offset on value of type bool

1.0.0

Initial version

LinkedIn
Share
RSS