Run Multiple WordPress Sites on Synology

Joe
December 16, 2017

Your Synology NAS comes with web hosting features. With Web Station you can easily host and publish your own website with Virtual Host support and additional HTTP/HTTPS settings for each single instance. You can also select the back-end server and PHP settings for each Virtual Host created. This allows you to create dynamic, database-driven websites for your personal use or business.

The problem users might run into with running WordPress on Synology, is folder permissions. By default, the Synology packaged version of WordPress will work just fine. But if you run multiple versions, you will get alerts to setup FTP settings in order to download, install, and update your WordPress plugins, themes, and core updates.

Never fear, I have a solution. Just follow the simple steps below.

1. Enable Terminal / SSH on Synology

Enable via Control Panel > Terminal & SNMP > Terminal. This allows your Synology NAS to support Telnet and SSH command-line interface services. You can also change the security level of the SSH encryption algorithm.

To enable Telnet/SSH service:

  1. Check the box next to the desired protocol (SSH or Telnet).
  2. Click Apply.

2. Log Into Synology via Terminal with Root Access

For system security reasons, Synology limted access to root. If you need to get the root permission, you will need to log in to your DSM in the command line interface , via PuTTY with any account credentials belonging to the Administrators group, and then run the sudo -i command to switch to root access.

Below is an example of the steps to get root access to a Synology NAS:

  1. Launch PuTTY to connect to the server of which the IP address is "192.168.xx.xx".
    ssh 00
  2. login as: admin: "admin" account belongs to the Administrators group on the server "192.168.xx.xx".
  3. admin@192.168.xx.xx's password: Enter the password of "admin".
    ssh 01
  4. admin@Jettlee:~$ sudo -i: Run the sudo -i command, and you may see a default message concerning user's privacy.
  5. Password: Enter the password of "admin" again.
    ssh 02
  6. root@Jettlee: You are now logged in with root permission.
    ssh 03

3. Update WordPress Folder Permissions

Synology Web Station uses a special HTTP user for it's default web folders, including it's WordPress package. If you create your own folders, like for multiple WordPress sites, the system will use your permissions instead. This is what causes the issues with installing/updating plugins, themes and WordPress. Now that you are logged into your Synology via Terminal/SSH, you can navigate to the systems WEB folder and update all of your WordPress folders and files.

Below is an example of the steps to update your WordPress folder Permissions:

  1. cd /volume1/web
  2. dir
  3. chown -R http:http [wordpress site folder name]
  4. chmod -R 775 [wordpress site folder name]

dsmFolderUpdate

Continue to use the above steps for all of your WordPress folders. This will effectively resolve the issues with WordPress prompting you to setup FTP in order to install/update plugins, themes, and WordPress.

Leave a Reply

2 comments on “Run Multiple WordPress Sites on Synology”

  1. Great article, one little question though, once you chown chmod that folder to user http, now how do I edit the wp-configsample to add those details needed to get an install up and running, do I have to edit that as root - as well?