#40541 closed defect (bug) (duplicate)
ssh2 content folder issue - fix #34738 not working?
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Filesystem API | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Hi,
I have a setup with the ssh keys in the home folder and the actual WP installation under /var/www/[sitename].
So far I used the SSH SFTP Updater Support plugin but that broke so I tried to use the ssh2 FS_METHOD.
I now keep seeing the error: Unable to locate WordPress content directory (wp-content).
I read about issues #32345 and #33919 and verified that my installation comes with the fix: https://core.trac.wordpress.org/changeset/34738
Still, ssh2 is not working for me.
I found a remark there:
https://wordpress.org/support/topic/auto-update-ssh2-fails-unable-to-locate-wordpress-root-directory/
that says the function exists returns false when it should not, so maybe the fix is broken in certain cases?
I use WordPress 4.7.4, Ubuntu 16.04, PHP 7 with SSH 2 (according to phpinfo):
extension version: 1.0 libssh2 version: 1.5.0 banner: SSH-2.0-libssh2_1.5.0
Not sure what enabling verbose did in class-wp-filesystem-base.php, but maybe I see the following info as a result?:
Looking for /var/www/firsttechfirst.com/wp-content in /home/xyz/ Looking for /var/www/firsttechfirst.com/wp-content in / Unable to locate WordPress content directory (wp-content).
Wp FS Tester says the following:
Connection Method ssh2 ABSPATH /var/www/firsttechfirst.com/ PLUGINDIR wp-content/plugins FS Errors None FS CWD /home/xyz/ FS WordPress Locator Looking for /var/www/firsttechfirst.com in /home/xyz/ Looking for /var/www/firsttechfirst.com in / FS WordPress Location FS0 WordPress Locator (Old code) Changing to /home/xyz/ FS0 WordPress Location (Old code) Tests Stopped; Error: WordPress could not be located Files in folder
Just to check I also tried the suggested change that would take the FTP_CONTENT_DIR into account and I got a different error in that case (something like: "Error: undefined") even though base, content and plugin dir were defined.
I did check for similar tickets and obviously the support forums as well ...
hope it is okay to create this. Thanks!
Change History (4)
#2
in reply to:
↑ 1
;
follow-up:
↓ 4
@
8 years ago
- Resolution set to duplicate
- Status changed from new to closed
Replying to ocean90:
Hello @andythiel, welcome to WordPress Trac!
Thanks for your report. You setup (PHP 7 with SSH 2) sounds like it might be the same issue as mentioned in #35517. Can you confirm that?
It does sound suspicious. Have not seen that, sorry.
I tried the fixes from the diff and I get different (permission related?) error messages now.
It probably makes sense to close this as a duplicate right away. Thanks!
#4
in reply to:
↑ 2
@
7 years ago
This locate-wp-content-problem-via-ssh2 does not look like an exact duplicate of #35517 (php-ssh2 breakage). Thanks to a patch by Ralphm, I was able to reproduce and solve this problem without changing or fixing php-ssh2. The patch is published under #35517 (look for @ralphm).
I am replying here, because this ticket has keywords 'wordpress locate ssh2', #35517 is harder to find if there are wordpress update problems through ssh2
Thanks for your report. You setup (PHP 7 with SSH 2) sounds like it might be the same issue as mentioned in #35517. Can you confirm that?
Hello @andythiel, welcome to WordPress Trac!
Thanks for your report. You setup (PHP 7 with SSH 2) sounds like it might be the same issue as mentioned in #35517. Can you confirm that?