I have recently purchased a Synology 916+ and found out that amongst the many great things we can do with it, one supported feature is installing a WordPress site using the Web Station package. But this only lets us install one instance of WordPress. It is possible to manually install and run multiple WordPress sites on Synology NAS.
If you use multiple computers in your house running any OS (Windows or Mac or Linux) and would like to pick up WordPress development on your localhost that you have left off on another computer in your home network without dealing with Dropbox sync for files and a plugin like WP Migrate DB Pro for the database, read on.
After following these steps you should be able to create multiple websites on your localhost like this: local.dev, showcase-pro.dev which are accessible from any device on your network (that you can add a hosts entry in).
I am not going to cover what’s required to make these sites be accessible from outside your local WiFi/home network here (I haven’t tried that part yet)
1) Log into your NAS GUI. In my case, it is at http://10.0.0.49:5000/.
2) Go to Package Center, search for Web Station and install it. This will create a “web” folder in your NAS’s root.
3) Also, install WordPress package and go through its setup. While we are not going to use (you may, if you wish) the website created by this package, we do this step because the needed dependencies like PHP, MariaDB get installed.
4) Install phpMyAdmin and Apache HTTP Server 2.4 packages.
These are the relevant packages that I have running: Apache HTTP Server 2.2, Apache HTTP Server 2.4, MariaDB, PHP 5.6, PHP 7.0, phpMyAdmin, Web Station and WordPress. Some of these may not be needed. You might want to experiment with them.
5) From the Main Menu, launch File Station. Navigate to web folder and create a folder for your site, say, “wordpress-latest”. Go inside the folder.
Download WordPress on your computer, extract the zip, drag all the content and drop inside “wordpress-latest”.
Alternatively, if you have Download Station package installed you can simply enter https://wordpress.org/latest.zip for the URL and have the file downloaded to “wordpress-latest”, then extract using the option from context menu.
6) Create a folder for your website. Ex. showcase-pro.
7) Copy all the content from “wordpress-latest” into the site’s folder.
8) Right click on the folder and click Properties. Go to Permissions tab.
Create a new permission for “http” user granting all Write permissions.
9) Log into your phpMyAdmin (at http://10.0.0.49/phpMyAdmin/ for me) using “root” as the username (password is blank/empty).
After logging in, change the password if you wish. Create a new database for your site. Ex.: showcasepro.
In my testing, a database connection wasn’t working with a hyphen in the database name, so I had to change the database name from “showcase-pro” to “showcasepro”.
10) In Windows Explorer/Finder navigate to your Synology’s network drive into your website’s folder.
wp-config.php and edit it. Set your database name, enter
root as username and your password.
/* That's all, stop editing! Happy blogging. */
define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here');
with unique keys and salts generated at https://api.wordpress.org/secret-key/1.1/salt/.
Save and close the file.
11) Launch Web Station.
General Settings: Set HTTP back-end server to Apache HTTP Server 2.4 and PHP to 7.0.
PHP Settings: Set PHP version to 7.0. Leave PHP Cache enabled. Select these extensions: curl, exif, ftp, gd, gettext, iconv, mcrypt, mysqli, openssl, posix, soap, sockets, xmlrpc, zip. Press Apply.
Virtual Host: Click Create, enter “showcase-pro.dev” for the Hostname, browse to your site’s folder for Document root, select Apache HTTP Server 2.4 and PHP 7.0. Press OK.
12) In your hosts file enter
Do this for every computer from which you’d like to work on your local site.
13) Visit http://showcase-pro.dev in your browser and complete the WordPress installation.
14) Log into your WordPress site’s admin, go to Settings > Permalinks and press Save to generate the .htaccess or otherwise pretty permalinks will not work.
That’s it. Now you should be able to administer and access your newly created local WordPress site on any computer in your network.