2

I updated my server from Ubuntu 15.10 to Ubuntu 16.04, and one of the things that updated was PHP. After the upgrade, doing plugin updates over ssh don't work any more.

At first it was prompting for FTP login credentials until I installed php-ssh2 (which cautions that it's based on a git snapshot). Now when I try to upgrade a plugin, it says

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

And in /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

Am I missing a package, or a configuration item, or what?

1 Answer 1

1

I was having a similar problem with getting ssh to work after the php 7.0 upgrade. I went through the steps of this tutorial and got it working.

I also had to chmod 775 the wp-content directory. However, the wp-content/plugins direcotry at chmod 755 works.

Not the answer you're looking for? Browse other questions tagged or ask your own question.