#41831 closed defect (bug) (duplicate)
"Unable to locate WordPress Content directory (wp-content)" with ssh2
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8.1 |
Component: | Filesystem API | Keywords: | |
Focuses: | Cc: |
Description
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@localhost sftpuser@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.
Change History (5)
#2
@
7 years ago
- Keywords reporter-feedback added
Hey @mangoo,
This sounds like #35517 - PHP7 / the ssh2 extension not being compatible with each other, can you confirm that you're running an affected version?
Note: See
TracTickets for help on using
tickets.
Also tried without specifying FTP_BASE, FTP_CONTENT_DIR, FTP_PLUGIN_DIR with the same effect.