I am trying to configure the sftp automatic update on Wordpress. It does not work: I always got "wp-content can not be found".
The configuration I have is as follow:
- each site has its owned user
- the site is located under user home directory : /home/{user}/www
- the user is chrooted to its home directory : /home/{user}
sftp is working ok for my user (using command line or software like filezilla).
In wordpress config, I got the below parameter:
define('FS_METHOD', 'ssh2');
define('FTP_HOST', '127.0.0.1:22');
define('FTP_USER', 'test');
define('FTP_PASSWD', '');
define('FTP_PUBKEY','/home/test/wp-rsa.pub');
define('FTP_PRIKEY','/home/test/wp-rsa');
This unfortunately does not work. During update, wordpress can not found the wp-content directory.
Issue is that the ABSPATH is equal to /home/{user}/www but through sftp it should only be /www (due to chrooted). I trie to use the FTP_BASE configuration variable but after looking the Wordpress code, it looks like that in case of sftp connection, it does not care about the value of FTP_BASE :(
I read many articles on the web about the sftp settings but none seems to use the chrooted mechanism.
So is there a way to make wordpress automatic update works with my settings?
Thx in advance!!