Couldn’t belive it is so simple to install wordpress on the DS207+.
Assumption:
Mysql database for wordpress ‘wordpress‘
Mysql database user for wordpress database ‘user_wordpress‘
Mysql database user password ‘12345678‘
Web directory is here /volume1/web
I.P. address of diskstation is 192.168.1.100
The assumption above is for illustration only. You can always define your own value. Just make sure the web directory is correct.
Here are the simple steps to get wordpress running on diskstation.
- Telnet/SSH to diskstation as root
- Install unzip command in order to decompress the wordpress package.
# ipkg install unzip - download latest wordpress package to the diskstation. I usually ssh to the shell and use wget to download to the diskstation directly
# cd /volume1/web
# wget http://wordpress.org/latest.zip
# unzip latest.zip
A directory ‘wordpress’ should be created under the web directory.
- Login to diskstation admin console, activate the web station and mysql database.
Network Services > Web Services > Web Applications
Enable web station and mysql database
- Setup mysql as below
# cp /usr/syno/mysql/share/mysql/my-small.cnf /etc/my.cnf
# /usr/syno/etc/rc.d/S21mysql.sh restart
Once the mysql is restarted, launch the mysql linux client as below
# /usr/syno/mysql/bin/mysql --host=localhost --user=root
Execute following SQL statements with the mysql linux client in order to create mysql user ‘user_wordpress’, allow it to connect from the diskstation itself and from any host. In order to allow the windows mysql client gui to connect to the mysql database, it is required to allow the db user to connect from specific host or simply any host.
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';
(Replace user_wordpress to your preferred wordpress database user name. ‘12345678‘ is the password assigned to the wordpress database user ‘user_wordpress’. Strongly suggested to change it to a better password instead.)
Once the database user ‘user_wordpress’ is created, then assign the ‘CREATE’ right for ‘user_wordpress’ the ability to create database.
mysql> GRANT create ON *.* TO 'user_wordpress'@'%' WITH GRANT OPTION;
(Again, replace user_wordpress to your preferred wordpress database user name.)
- Create the database using mysql linux client
For non unicode database:
mysql> create database wordpress;For unicode database:
mysql> create database wordpress character set = utf8 collate = utf8_general_ci;
- Once the database is created, assign the correct privileges of the wordpress database user.
I assign super user right for user_wordpress when connect to the wordpress database locally so that wordpress can install and setup the database itself.
I also assign normal SQL rights (select, update, delete, insert) for user_wordpress when connect from remote host. This will allow me to manipulate the wordpress database using SQLyog windows client after the installation.
# /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'@'%';
(As always, replace ‘wordpress’ to your preferred database name. However, it must matching the database that you previously created by SQLyog. Also replace ‘user_wordpress’ to the actual database user that you created in previous step)
Now the database setup is completed!.
- Telnet/SSH to the diskstation as root. Setup the wordpress now.
# cd /volume1/web/wordpress
# mv wp-config-sample.php wp-config.php
- Edit wp-config.php
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: localhostFor unicode database:
DB_CHARSET: utf8
DB_COLLATE: utf8_general_ci - Open the browser, and continue the setup by browing the following URL
http://192.168.1.100/wordpress/wp-admin/install.php
If the database information specified in the wp-config.php is correct, the install page will be shown as below
WordPress Setup Screen #1
Input the title of your blog, the email address of the administrator, click the checkbox if you want search engine like Google crawl your blog. Click ‘Install’ to continue.
If installation is successful, wordpress will generate an admin account with random password.
WordPress Setup Screen #2
Click ‘Login’ button to login the admin console and configure your new blog in your diskstation
Nov 11 2011 – Blank page issue
** In most case, if you did follow every single steps above, you should not encountered any problem. If you still got a blank page instead of the install screen, please make sure
- Database username and password entered in wp-config.php is correct, case does matter.
- Make sure you have ALL wordpress files uploaded and not a partial upload.
- If above still not helping, try adding following line to /volume1/web/wordpress/.htaccess
DirectoryIndex index.php index.htm
- See if links below help
[resolved] wp-config/install.php yields blank page (9 posts)
WordPress installation does not strats
- Enable software/Plugin upgrade from admin console
By default, the apache is executed by the ‘nobody’ account. However, we are using root account to perform the setup above. This avoid the admin console to perform any software and plugin upgrade .
To fix this, simply change the ownership of whole wordpress directory to nobody as below.
# chown -R nobody:nobody /volume1/web/wordpress
Hello, thanks for the tutorial.
I am quite new to the Linux/SQL world and I have trouble finding out how to carry out the following section:
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′;
Do I have to run it through a mysql client command line interface and if so, which program will allow me to do that?
Hello. Yes you need to run it through the mysql client. The command below will launch the mysql client
Just happened to know that wordpress cannot display double ‘-’ correctly.
Thanks for pointing out and the display issues is fixed.
Thank u very much. I create a new database using the command line. It is only one difference. Your post has very much helped me with understanding of sequence and sense of actions. I`m lamer.
Hi, excellent, easy to understand instructions. Thank you.
Hi, thanks for a superb guide! Easy to follow, and it worked like a charm. Thanks!
Thanks! I was skeptical whether this would really be this easy, but it really is. Followed the steps one by one and everything works like a charm !
Nice tut, thanks!
However, how to go about this with an existing WordPress blog? Can I simply enable it on my DS210j and copy the wordpress directory from its current server to the NAS?
cheers!
Lau.
If you are talking about moving your existing wordpress blog from somewhere to NAS, yes, you can copy the wordpress dir to NAS, export the mysql database and import back to the NAS. At then run a few sql statements to change the domain name.
I’ve another article here which is doing something like this, you may refer to [modding series 28] for reference.
Good luck.
Hello, Are you sill available for some help?
I made it to the end of your tutorial but stuck on the last part # 10 logging into wordpress.
http://diskstation/wordpress/wp-admin/install.php
I keep getting:
SYNOLOGY
Sorry, the page you are looking for is not found.
Hi there,
I have the same problem as Twistedme
Hi, please make sure the mysql database user name and password is correct.
I keep getting a blank page on http://diskstation/wordpress/wp-admin/install.php
I double-checked USER and PW…
Any idea?
If you got blank page please see if this page help you
Hi!
I’ve managed to perform the install, and I can easily access the blogg localy and do everything I want (by just typing the IP adress of the NAS)
But when I try to access it from internet it only shows me blank page.
So ruled out the username/password, cos then it would work localy either.
Tried the .htaccess trick. Didn’t find a file name .htaccess, however I made on with the line that I was supposed to add with index.php etc.
I’ve been trying to fix this since I wanted to get my blogg up and working before my first trip to USA, however so far no luck. Any tips?
Under ‘General Setting’, did you set the ‘WordPress Address (URL)’ and ‘Site Address (URL)’ to your ddns domain name?
Trying ot change site adress to both “http://selbyggen.dlinkddns.com” and “http://norwegiantravelgeek.com” (which basicly just forward url frame to selbyggen.dlinddns.com)
It gives me “The Site address you entered did not appear to be a valid URL. Please enter a valid URL.”
When it comes to WordPress address (URL) it is grayed out and I’m unable to change it…
As a sidenote: Thank you for fast response O.o
And I like your blog/site!
Trying ot change site adress to both “http://selbyggen.dlinkddns.com” and “http://norwegiantravelgeek.com” (which basicly just forward url frame to selbyggen.dlinddns.com)
It gives me “The Site address you entered did not appear to be a valid URL. Please enter a valid URL.”
When it comes to WordPress address (URL) it is grayed out and I’m unable to change it…
As a sidenote: Thank you for fast response O.o
And I like your blog/site!