One of the beautiful things of our Diskstation is that Synology provided it with a plug-and-play feature to give your NAS even more functionality. It’s called Package Center. Synology offers a lot of packages out of the box. These packages have to be maintained by Synology. That is not a big issue if these packages are kept up-to-date within an acceptable period of time. However Synology (and probably other NAS-providers who are using these kinds of mechanisms to offer more functionality to their products) can’t always keep up the update pace of the software in their packages.
If you are using packages that has a large install base then you are more vulnerable to attacks of hackers. Especial when you use the software as a public internet service. It’s is critical you can update these packages as soon as the producer makes the (security) updates available. When you are using the Synology package, you have to wait until they update the package. Unfortunately this seems not to have any priority at Synology’s. I noticed this when using the WordPress package. WordPress kept updating but my installation stay’s on the version that was delivered by the Synology package.
I tried to find a solution for this without compromising my content. The following steps describes how I did it.
- Make sure you have a fallback in case anything goes wrong. Don’t underestimate this. It’s like an insurance: You invest in something you hope never have to use. I use Duplicator to make a backup of my complete WordPress site. It’s a plugin for WordPress and makes it possible to rebuild the complete site even if the only thing left is an empty web server. I wrote a complete post how this work previously and can be found here.
Another measure to minimize the risk of losing anything, is the possibility to test the modifications on a place where it can’t do any harm and comes as close as possible to the real world situation. Most of the time you have no spare Diskstation available to do your experiments. Modifications must be done in a ‘production’ environment without being sure the outcome doesn’t compromise your NAS. Scary Huh?. Fortunately there is a reasonable alternative: a virtual Diskstation.
In a previous post here you can read how to get your own virtual Diskstation. These two measures gives you the opportunity to try anything you like without compromising your NAS. If you build your own virtual NAS and made a backup of your site, I encourage you to test your backup before you go further. (Having a backup is good, knowing the restoration of this backup works is better!)
Now you have all the equipment to practice the upgrade procedure before you do this on your physical NAS. USE THIS! When anything goes wrong, you’ll be more than happy you did.
- Your WordPress installation is located in the web share of your Diskstation. In that share you’ll find a folder with the obvious name wordpress. There is the location your WordPress files are stored. However the best way is to use FTP or SSH to manage your WordPress files. In that case you have to look into /volume1/web/wordpress/ (or another volume where your website is stored.) Make sure you have write access here and you might have to set the owner of this folder to nobody:nobody. (DSM 5.x users have to use http:http)
- To update this you have to follow the exact description of a manually update of a WordPress installation described on the WordPress site: http://codex.wordpress.org/Updating_WordPress. Read the whole page and follow the manual update instructions carefully. (It isn’t hard)
- After visiting the wp-admin page as stated in the update instructions, the job is done. The next available update will come from WordPress and you have not to wait until Synology brings it’s update.
- You CAN NOT remove the WordPress Package form the package center. This will uninstall your WordPress and leaves you with an empty site. The only thing you can probably do is to delete the package information on your NAS. You need SSH access to the filesystem of your Diskstation for this. Go to the /var/packages/ folder. There is a wordpress folder. When you delete this folder, the WordPress package disappears from your Package Center. Doing this is at your own risk. I don’t know what the consequences are for the stability of your Diskstation.
It is not complex to do. Just take your time and act carefully. With a good strategy and enough testing of your backup scenario’s, there is not much that can go wrong.