How to fix Wordpress update and plugins on your Synology box

This is the issue I was getting when trying to update plugins:

Using WP 4.9.6 I update an plugin resulting in:
Updating Plugin Akismet Anti-Spam (1/1)
Downloading update from…
Unpacking the update…
Installing the latest version…
Removing the old version of the plugin…
Plugin update failed: Could not remove the old plugin.

And this was the error I was getting when trying to update WordPress:

The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

First, you need to ssh in your Synology box

This login as your superadmin
sudo -i

Then you need to change your WordPress site folder group/user
chown -R http:http volume1/web/your-wp-site

Finally you need to add the below line to `wp-config.php`
/** Set up ‘direct’ method for wordpress, auto update without FTP */
define(‘FS_METHOD’, ‘direct’);

And that’s it! Good luck! If updates still fail check your site file/folder permissions.


Tips and tricks

Comments are closed