Ubuntu를 16.04로 업그레이드했는데 이제 Wordpress 업데이트가 작동하지 않습니다.

Ubuntu를 16.04로 업그레이드했는데 이제 Wordpress 업데이트가 작동하지 않습니다.

Ubuntu 15.10 시스템이 제대로 작동하고 있었고 SSH를 통해 Wordpress 업데이트가 이루어졌습니다. 하지만 Ubuntu를 16.04로 업그레이드했을 때 php7.0으로 전환하면 Wordpress 업데이트가 중단되었습니다. 처음에는 php-ssh2를 설치할 때까지 FTP 로그인 자격 증명을 묻는 메시지가 표시되었습니다(git 스냅샷을 기반으로 한다는 경고). 이제 플러그인을 업그레이드하려고 하면 다음과 같은 메시지가 나타납니다.

An error occurred while updating WP to Twitter: Unable to locate WordPress Content directory (wp-content).

그리고 /var/log/apache2/error.log에서:

[Sun Jun 12 11:01:10.969931 2016] [:error] [pid 5545] [client 192.168.1.11:65278] PHP Warning:  file_put_contents(): Unable to open ssh2.sftp://Resource id #81/.maintenance on remote host in /home/blog/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on line 252, referer: http://xxxx.com/wp-admin/update-core.php?action=do-plugin-upgrade
[Sun Jun 12 11:01:10.970772 2016] [:error] [pid 5545] [client 192.168.1.11:65278] PHP Warning:  file_put_contents(ssh2.sftp://Resource id #81/.maintenance): failed to open stream: operation failed in /home/blog/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php on line 252, referer: http://xxxx.com/wp-admin/update-core.php?action=do-plugin-upgrade

패키지나 구성 항목이 누락되었나요?

답변1

나는 같은 문제가 있었다. 이것은 php-ssh2 (Ubuntu repo의) 버그인 것 같습니다.

php-ssh2를 제거하고 pecl(pecl install ssh2-1.0)을 사용하여 최신 버전을 설치한 후 문제가 해결되었습니다.

버그 보고서를 제출했습니다. https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1617294

답변2

pecl 확장 설치가 나에게 효과적이지 않았지만(이유는 누가 알겠습니까?) 대안을 찾았습니다.

방금 scp를 통해 이 플러그인을 VPS에 업로드했는데 문제가 해결되었습니다.https://wordpress.org/plugins/ssh-sftp-updater-support/

답변3

내 경우에는 위의 어느 것도 작동하지 않았지만,ralphm의 패치PHP 코드에서 Ubuntu 14.04와 Ubuntu 16.04 모두에서 WordPress에 대한 update-via-ssh2 문제를 수정했습니다.

--- a/wp-admin/includes/class-wp-filesystem-ssh2.php
+++ b/wp-admin/includes/class-wp-filesystem-ssh2.php
@@ -185,7 +185,7 @@
        if ( '/' === $path ) {
            $path = '/./';
        }
-       return 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $path, '/' );
+       return 'ssh2.sftp://' . intval($this->sftp_link) . '/' . ltrim( $path, '/' );
    }

    /**

최종 수정 사항이 WordPress 릴리스에 적용될 때까지 업데이트 후 이 패치를 다시 적용하는 것을 잊지 마십시오.

답변4

내 경우에는 1.1.2 lib 버전 설치만 도움이 되었습니다...
pecl install ssh2-1.1.2

  • PHP 7.0.22-0ubuntu0.16.04.1
  • 아파치/2.4.18

관련 정보