Could not remove the old plugin Could not remove the old plugin wordpress wordpress

Could not remove the old plugin


It's a permissions issue. Run this on SSH:

chmod -R 0755 /var/www/<yourpathtowordpress>/wp-content/pluginschown -R www-data /var/www/<yourpathtowordpress>/wp-content/plugins

The first grants writing permissions, while the second ensures the user who needs the permission is correctly set


WordPress does not display OS level errors by default but this is most definitely a permission issue on your plugins folders in your site's wp-content/plugins.

You could enable debugging in order to see the original error which triggered the more generic one you've seen if you want to work with a better view of the world.

Multiple debugging options are documented in WordPress' online manual. To enable debugging and log messages set the following variables in wp-config.php:

  1. Enable debugging via WP_DEBUG
    • define('WP_DEBUG', true);
  2. Enable logging debug messages to the /wp-content/debug.log file with WP_DEBUG_LOG
    • define('WP_DEBUG_LOG', true);

You should probably make sure to disable these options and delete the debug.log file after gathering enough information as they could contain server information you do not want to be accessible publicly through your WordPress installation.

Alternatively we can try to guess what the most plausible cause can be:

If you installed your plugins manually on the server and not via the WordPress administration console it is likely you did it as a different user then the one who is executing WordPress' PHP code and thus requires proper access to perform such OS operations.

Finally the solution may be to fix the permissions or upgrade the plugins manually.


Basically this is permission issue.and you will have to provided or make FTP user as owner of the plugins folder.

Most of the cases where you will be using same user for WordPress install and run as well as FTP access. If you are using different users for both above purpose then providing ownership to FTP user will fix this issues just like that.

Ex:

chown -R ftpadmin /var/www/wordpress/wp-content/plugins

Hope this would be helpful if any body at this stage.