I have a server (Ubuntu 16.04) where different users can put up their own Wordpress site. Some info:

  • Apache runs as each user with mpm-itk.
  • Users are chrooted to their home dir.
  • Users can't use PHP outside their home dir.
  • Permissions is apacheuser:apacheuser recursively with 755 and 644 (also tried 777)
  • public_html lies within their home dir.

sshd-config used:

Subsystem       sftp    internal-sftp
    Match Group sftpusers
    ChrootDirectory /home/%u
    ForceCommand internal-sftp
    AllowTCPForwarding no
    X11Forwarding no

The users can SFTP in, upload the WP files and be on their way.

The problem comes with updating or removing plugins (adding, activate and deactivate works fine). I get the error Could not fully remove the plugin(s) akismet/akismet.php

Nothing in error logs.

Everywhere I search I get a few options:

  1. Install the SFTP Updater Plugin and define FS_METHOD as 'ftpsockets'. This works but I want to avoid this to keep the installation clean and the users happy. I only really admin the server, not the WP-sites themselves and forcing all users to install a plugin isn't looking good.
  2. Libssl/php-ssl. I get the loginprompt but it fails when trying.
  3. SSH keys. Think I've tried every single guide out there. The SSH session disconnects instantly. Having the same problems as this guy Wordpress SFTP auto update issues This would also confuse the users. It also gotta work for multiple PHP versions (FPM).
  4. define FS_METHOD as 'direct' in wp-config.php. Not working for me, same as the original error.

Anyone know what I can do to solve this? Please let me know if there's any info you need.


  • Is the error "Could not fully remove the plugin(s) akismet/akismet.php" produced by Wordpress? On which page? – hayalci Apr 9 '17 at 0:11
  • Yes it is, on the /wp-admin/plugins.php when trying to remove a plugin. – user5747873 Apr 10 '17 at 5:51

This is solved.

Turned out it was PHPs unlink() function that was disabled with disable_functions in php.ini. Removed it from there and now everything is working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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