Update WordPress manually on a Synology NAS

By | February 22, 2020

Synology is often a little slow in updating their plugins, and WordPress is one of them.
Fortunately it’s very simple to manually update to the latest version WordPress on your Synology NAS.

  • Download the latest version of WordPress & unzip to a folder
  • Delete the wp-content folder from the new installation folder
  • Move all files and folders from your web server WordPress folder to a backup folder, EXCEPT these;
    • wp-content (Folder)
    • wp-config.php (File)
    • .htaccess (File)
    • syno-misc.php (File)
    • pingbackIsOpend (File)
  • Move all the files from the installation folder into your webserver directory.
    Ensure you’re not overwriting any of the above folders/files if there are duplicates.

Log back in to your web server. You will see a screen prompting you to update the WordPress database. Do this – not that you have a choice. Then click continue once it’s done, and you’re in.

I found that the WordPress had a problem updating plugins after I updated to the latest version.
The issue is a detection process for user names on the server that could compromise your site if there are several sites running on the same box. For most Synology users this won’t be an issue.
Alas, the detection process doesn’t always detect the proper access method so you get a prompt for an FTP login.
You can either create the FTP user on your NAS (Login to DSM, then Control Panel/File Services/FTP/Enable SFTP/Create User/Give read/write access to WEB folder/Allow FTP access/No Quota, then forward port 21 & 22 in your router to the NAS) and login with that.

Or you can add the following small line in your wp-config.php file to force it to use direct file access (same user as PHP).

//*The next line allows direct downloads – it fixes the FTP download prompt for updating plugins*/
define(‘FS_METHOD’, ‘direct’);

6 thoughts on “Update WordPress manually on a Synology NAS

  1. Thomas Adams

    Followed the instructions and it worked. Except for the problem with updating plugins so I added the line of text to wp-config.php. Now I’m getting a different error when trying to install plugins “ Installation failed: Could not create directory.” Is there a fix for this I really don’t want to go back to 5.3.2
    Thanks

    Reply
    1. reverend Post author

      I THINK that is related to permissions on the folder where it needs to save/install the plugins.
      You may be able to go to TOOLS > Site Health and then INFO, then scroll down to FILESYSTEM PERMISSIONS to see if it gives you a better hint as to what your specific issue is.

      The WordPress.org support forums are probably your best bet to narrow down your problem a little more. Oh, and probably the Synology forums too.

      Reply
  2. Robin

    When I changed define(‘FS_METHOD’, ‘direct’); to define(“FS_METHOD”, “direct”); everything works. Can someone explain why?

    Reply
    1. reverend Post author

      Don’t tempt me. I like Café Norden in Copenhagen! 😉

      I’m glad it helped.

      Reply
  3. Manu

    Hello and thank you for your valuable information.

    I just did an installation from wordpress.org in my synology, the website works perfect, but in the Health section of the site there are three critical errors. This is common? Do you know what could be due?

    regards

    Reply

Leave a Reply to Manu Cancel reply

Your email address will not be published. Required fields are marked *