For months now, probably even years, my website (williamvanzweeden.nl) has been running as a WordPress application, hosted on my NAS. In order to get it up and running, I installed the pretty-much-one-click-install-package that is available in Package Center. Works like a charm! For sure, the response rates of my webserver weren’t always super fast but hey, since this was mostly a hobby-project, nobody cared about it. I was happy too until I decided to make some improvements, including the installation of several plugins.
- All the sudden, my WordPress install told me two things:
The version of WordPress I was running was the latest one available.
- I could not install the plugin because it required a newer version of WordPress.
After a few Google queries, I found out that the first statement was not true. There was a newer version of WordPress, not for me though. The WordPress instance that you can install through Package Center is dependent on an older version of phpMyAdmin but more importantly: it relies on an older version of PHP. That is, just for your information, a version of PHP that has been declared end of life and is therefore not receiving (security) updates anymore. Time to update you’d say but apparently, the folks at Synology are busy doing other things.
Going the hard way
Frustratingly enough, there is not a simple way, if there is a working way at all, to change the PHP version that WordPress and phpMyAdmin refer to in your Synology. So you’re stuck waiting for them to update their package.
Or… you can do it yourself, which is what I did. It isn’t very difficult, but you have to take care of a few things, which I overlooked initially.
The WordPress installation as it comes by Synology uses MariaDB. MariaDB had been working perfectly so far so there was no need to replace that. In my first attempt, I wanted to start from a clean sheet so I uninstalled both WordPress and phpMyAdmin from Package Center. Later on in the process though, I learned that the configuration files in those two packages were useful. So, instead of uninstalling them at the start, I recommend to change their names, complete the manual installs, leverage the existing config files and only delete them after you have confirmed the newer versions to be working.
Let’s get moving
Here’s what you do next:
- If not yet installed, use Package Center to install Apache 2.4 and PHP 7.3.
- In your Web Server settings, create a PHP 7.3 profile and use it as the default profile in your PHP settings.
- Rename the existing phpMyAdmin and WordPress folders to phpMyAdmin_old and wordpress_old. Be aware that if you look for them in Package Center now, it will turn up an error since it is apparently can’t find the folder names.
- Download phpMyAdmin from here
- Download WordPress from here
- Upload both zip files to the webserver folder of your Synology NAS. Most likely the /web/ folder on one of your volumes.
- Extract both files and rename the folders to be phpMyAdmin_new and wordpress_new. The names don’t matter as long as you can distinguish the newer version from the old version.
- Feel free to rename the _old versions back to their original name, so Package Center picks them up properly again when you want to uninstall them.
Config files here we come
Next, you need to work on the config files. Let’s start with phpMyAdmin. When phpMyAdmin is installed via Package Center, it creates a workaround with regards to the configuration. So, instead of using config.php, it will instead refer to Synology_server.json. So, if you want to use the Package Center configuration in your manual install without having to change anything, you need both files.
- Copy config.php and synology_server.json from the pypMyAdmin_old folder to the phpMyAdmin_new folder.
- Copy config.php from wordpress_old to wordpress_new.
Next, you will need to work on your permissions. It might be my Synology setup but whenever I upload files to my Synology, even to the web folder, they cannot be accessed from the web (williamvanzweeden.nl/something) and will turn up 403 errors instead. To solve that, you need to add permissions for the HTTP user.
- In the Synology File Explorer, right-click on the phpMyAdmin_new folder, click Properties and select the permission tab.
- Select Create, select the HTTP user and select the read permissions.
- Click OK and Apply.
- Do the same for the wordpress_new folder.
Okay, you’re almost there. Time for the final steps.
- If you haven’t done so already, rename the _old folders, removing the _old tag.
- Use Package Center to remove the old WordPress and PHPMyAdmin installs.
- Rename the _new folders, removing the _new part.
- Test both phpMyAdmin and WordPress by going to the respective URL’s, using the credentials you have created earlier on in the process, or by creating brand new ones for your WordPress install.
That’s it. It’s a bit of a workaround process and you gotta think for yourself when you’re about to do this but this is how I got things working on my end.