[wp-trac] [WordPress Trac] #41831: "Unable to locate WordPress Content directory (wp-content)" with ssh2

WordPress Trac noreply at wordpress.org
Fri Sep 8 02:34:21 UTC 2017


#41831: "Unable to locate WordPress Content directory (wp-content)" with ssh2
--------------------------+-----------------------------
 Reporter:  mangoo        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.8.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I'm getting "Unable to locate WordPress content directory (wp-content)"
 when using ssh2 FS_METHOD and trying to update plugins.

 I've tried setting the following to wp-config.php:


 {{{
 define( 'FTP_USER', 'sftpuser' );
 define( 'FTP_HOST', 'localhost' );
 define( 'FS_METHOD', 'ssh2' );
 define( 'FTP_BASE', '/' );
 define( 'FTP_CONTENT_DIR', '/wp-content/' );
 define( 'FTP_PLUGIN_DIR ', '/wp-content/plugins/' );
 }}}

 or:

 {{{

 define( 'FTP_USER', 'sftpuser' );
 define( 'FTP_HOST', 'localhost' );
 define( 'FS_METHOD', 'ssh2' );
 define( 'FTP_BASE', '/server/path/to/wordpress/' );
 define( 'FTP_CONTENT_DIR', '/server/path/to/wordpress/wp-content/' );
 define( 'FTP_PLUGIN_DIR ', '/server/path/to/wordpress/wp-content/plugins/'
 );
 }}}


 However, in both cases, the result is "Unable to locate WordPress content
 directory (wp-content)".

 When I sftp to the server, I get:


 {{{
 # sftp sftpuser at localhost
 sftpuser at localhost's password:
 Connected to localhost.

 sftp> pwd
 Remote working directory: /server/path/to/wordpress/

 sftp> ls
 index.php             wp-activate.php       wp-admin              wp-blog-
 header.php    wp-comments-post.php  wp-config-sample.php  wp-config.php
 wp-content            wp-cron.php
 wp-includes           wp-links-opml.php     wp-load.php           wp-
 login.php          wp-mail.php           wp-settings.php       wp-
 signup.php         wp-trackback.php      xmlrpc.php
 }}}


 Tried debugging it with strace, but wordpress doesn't even seem to access
 "wp-content" dir in any way.

 Not sure what other information I should provide to debug this further.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41831>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list