How to install WordPress in Synology NAS (Network Access Storage)

Having subscribed to a high speed internet access (Fibre Optic Broadband) with transfer speeds as high as 100Mbps|50mbps with a enterprise grade Synology 1511+ NAS linked in a high performance networking, it is a waste not to setup a self-hosted blog site.

And thats precisely what I did – secured my 2nd domain name, configured my DNS services and enabled the web services in my NAS. It takes a little courage and persistance to get through all the geeky setup which I will attempt to run through the instructions summarised below:

Illustrations of config parameters:

Mysql database for wordpress ‘wordpress‘
Mysql database user for wordpress database ‘user_wordpress‘
Mysql database user password ‘12345678‘
Web directory is here /volume1/web/myblog
I.P. address of diskstation is 192.168.1.100

Please change these values accordingly.
1) Allow SSH/Terminal access in Diskstation control panel
2) SSH into the Diskstation
> SSH root@192.168.1.100

3) Download & unpack latest version of WordPress in Telnet environment
> cd /volume1/web/myblog
> wget http://wordpress.org/latest.zip
> unzip <filename of the downloaded zip>
A new wordpress folder will be created with the files unpacked in it.

4) Enable Webstation & MySQL under Diskstation Admin control panel

5) Setup mySQL in Telnet environment
> cp /usr/syno/mysql/share/mysql/my-small.cnf /etc/my.cnf
> /usr/syno/etc/rc.d/S21mysql.sh restart

6) To create WordPress DB user:

mysql> use mysql;
mysql> create user ‘user_wordpress’@’localhost’ identified by ‘12345678’;
mysql> create user ‘user_wordpress’@’127.0.0.1’ identified by ‘12345678’;
mysql> create user ‘user_wordpress’@’%’ identified by ‘12345678’;

Pls change the sample user name & password according

7) Grant rights to the user created:
mysql> GRANT create ON *.* TO ‘user_wordpress’@’%’ WITH GRANT OPTION;

8) Create a new database for WordPress

For non unicode database:
mysql> create database wordpress:

For unicode database:
mysql> create database wordpress character set = utf8 collate = utf8_general_ci; 

9) Grant correct rights for the user in the new database:

# /usr/syno/mysql/bin/mysql –host=localhost –user=root
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO ‘user_wordpress’@’127.0.0.1’ WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO ‘user_wordpress’@’localhost’ WITH GRANT OPTION;
mysql> GRANT insert, select, delete, update ON wordpress.* TO ‘user_wordpress’@’%’;

10) Prepare WordPress config:
# cd /volume1/web/myblog/wordpress
# mv wp-config-sample.php wp-config.php

11) Edit WP config file:

DB_NAME: wordpress (input the name of your wordpress database)
DB_USER: user_wordpress (input the username of the wordpress database)
DB_PASSWORD: 12345678 (input the password of the db username)
DB_HOST: localhost

For unicode database:
DB_CHARSET: utf8
DB_COLLATE: utf8_general_ci 

12) Final WordPress web installation:
Follow the instructions via http://192.168.1.100/wordpress/wp-admin/install.php

13) Change ownership of WordPress web folder:
#  chown -R nobody:nobody /volume1/web/myblog/wordpress

14)  Setup subdomain to WordPress web folder
Option 1:
At DNS level, set CNAME ‘myblog.yourdomain.com’ to yourdomain.com/web/myblog/wordpress

Option 2:
At Synology Diskstation level, set new Virtual Host ‘myblog’ under ‘yourdomain.com’ to ‘/web/myblog/wordpress’

That’s it! You will readily setup your first blog via myblog.yourdomain.com/wp-admin

Good luck!

Follow us on:
Facebooktwitterinstagram

Share this article on:
Facebooktwitterredditpinterestlinkedinmail

Facebook comments:

  1 comment for “How to install WordPress in Synology NAS (Network Access Storage)

Leave a Reply

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