My Visitor

Like this site!

Wanna help other found this site? +1 us now!

Google +1 Button Privacy Policy

Synology Tags

My WebHost

I recommend hostgator, here is why.

Synology DS207+ usage series 16: Install WordPress on Diskstation

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.

  1. Telnet/SSH to diskstation as root
  2. Install unzip command in order to decompress the wordpress package.

    # ipkg install unzip

  3. 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.

  4. Login to diskstation admin console, activate the web station and mysql database.

    Network Services > Web Services > Web Applications

    Enable web station and mysql database

    Enable web station and mysql database

  5. 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.)

  6. 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;

  7. 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!.

  8. Telnet/SSH to the diskstation as root. Setup the wordpress now.


    # cd /volume1/web/wordpress
    # mv wp-config-sample.php wp-config.php

  9. 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: localhost

    For unicode database:

    DB_CHARSET: utf8
    DB_COLLATE: utf8_general_ci

  10. 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

    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

    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

  11. 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

Pages: 1 2

17 comments to Synology usage series 16: Install WordPress on Diskstation

  • Jacob Schou

    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?

  • Ray

    Hello. Yes you need to run it through the mysql client. The command below will launch the mysql client

    # /usr/syno/mysql/bin/mysql –-host=localhost –-user=root
    

    Just happened to know that wordpress cannot display double ‘-’ correctly.

    Thanks for pointing out and the display issues is fixed.

  • yaa13

    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. :)

  • Paul

    Hi, excellent, easy to understand instructions. Thank you.

  • Jonas

    Hi, thanks for a superb guide! Easy to follow, and it worked like a charm. Thanks!

  • Casper

    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 !

  • Lau

    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.

    • ray

      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.

  • Twistedme

    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.

  • Claudia

    Hi there,

    I have the same problem as Twistedme :(

  • Jens

    I keep getting a blank page on http://diskstation/wordpress/wp-admin/install.php
    I double-checked USER and PW…
    Any idea?

  • 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?

    • ray

      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! :-)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Before you submit form:
Human test by Not Captcha