Wordpress install

Now to the actual install on the Synology box.  Mine is a DS216play.
  1. Install Synology packages
  2. Prepare Wordpress software
  3. Create user and folder
  4. Setup external http and ftp access
  5. Create Database
  6. Setup Wordpress using Web Station
  7. Initialise and test!

Install Synology packages

Install Web Station (this creates a ‘web’ folder ready for your web sites, but for reasons below I can’t use this folder for my Wordpress sites), Apache 2.2 and 2.4 (why?), MariaDB 10, PHP 5.6 and 7.0, phpMyAdmin (and Wordpress?).  Actually Wordpress installs some of these dependencies anyway, so perhaps install that first to see which it does.  We’re not going to use the Wordpress package anyway but set things up manually.

Prepare Wordpress software

  1. Using File Station create a folder on your site for the latest Wordpress package, call it something like ‘Wordpress Software’.  Keep this software ‘unused’ so it is available to start building any other new sites you want.
  2. Download the latest Wordpress version, unpack it, and copy the contents into this new folder (there should be three folders, ‘wp-admin, wp-content, wp-includes, and several files mostly php files).  There are two methods of doing this:
    1. Install the Download Station on your Synology, set its destination folder as your new folder for the software, and download from http://wordpress.org/latest.zip, then unpack on the Synology using the context menu for the zip file, or
    2. Download to your PC, unpack, and upload the contents up to the folder using File Station or an ftp client such as WinSCP.  (I found problems uploading folder using Filestation, and didn’t want to use ftp, so used option 1 above.)
  3. Use File Station to copy all this software (3 folders and files) into the folder ‘test’ you created above.

Create User and Folder

I discovered that to install new themes, plugins, and updates etc., Wordpress needs external ftp access to your Wordpress folder which gives us a Synology problem!

You need to give Wordpress a unique user/pw for each of your Wordpress sites, which will then have direct access to the folder where your Wordpress files are.  On the Synology that means that your folder needs to be a direct shared folder (you can’t share a subfolder, at least without some coding trickery!).  It can’t be a user Home folder, as Web Station cannot use those as the root of a web site.

My solution was to create a new user for each web site I wanted, and a new shared folder (at the top level, it’s the only way you can create a shared folder!!) and point the new user ftp root to this new share.  In my case:
  1. New user ‘test’
  2. New shared folder ‘test’
  3. Give ‘test’ and ‘http’ read/write permissions to test folder
  4. Using Control Panel – File Services – ftp
    1. Enable FTP, and
    2. under advanced – direct user ‘test’ ftp root to shared folder ‘test’.

Setup external http and ftp access through your router

See my more detailed post on setting up External Access, or if you're confident here's a summary.
I’m not sure why Synology will only allow one DDNS setting for each DDSN provider, but it does mean that if you want to run four sites, you need four DDNS providers.
  1. Setup DDNS on Synology.
    1. Register with one of the (free) DDNS services (‘No-ip’ in my case)
    2. eadietest.ddns.net = 89.1235.110.79
  2. On your Synology Control Panel – External Access – DDNS
    1. Add your new DDNS service provider, hostname, login details, and external (router) IP
  3. Setup ‘Port Forwarding’ on your router
    1. Usually ports 80 and 443 incoming, route to the INTERNAL Ip address of your Synology box

Create Database

Log into your phpMyAdmin (at http://<yoursynologyIPAddress>/phpMyAdmin, and on my box I HAVE to use the capital ‘M’ and ‘A’ – phpmyadmin does not work!) , using ‘root’ as the username and a blank password.  CHANGE THE ‘root’ PASSWORD NOW for security!
  1. Create a new database for your site, eg ‘test’
  2. If you don’t want to use ‘root’ for Wordpress to connect to this new database, with your new database select ‘privileges’ and add your new user (in my case ‘test’) and give it all privileges on your new database.
    1. I couldn’t get this working correctly, so lazily just use ‘root’ for Wordpress to connect to my database.

Setup your new site using Web Station

Launch Web Station
  1. General Settings: Set HTTP back-end server to Apache 2.4 and PHP 7.0
  2. PHP Settings: Set PHP version to 7.0, leave cache enabled
    1. select at least these extensions: curl, exif, ftp, gd, gettext, iconv, mcrypt, mysqli, openssl, posix, soap, sockets, xmlrpc, zip. (I was lazy and enabled ALL extensions!)
    2. Press Apply.
  3. Virtual Host: Click Create
    1. enter your new external website name (eg ‘eadietest.ddns.net’) for hostname
    2. browse to your site’s folder for Document root
    3. select Apach HTTP 2.4 and PHP 7.0
    4. press OK.

Initialise and test

I personally don’t like messing with wp-config files, and prefer to let Wordpress set itself up so
  1. Use a browser to go to your new site using the external address (assuming that your PC uses your router as DNS server) eg eadietest.ddns.net - Wordpress should prompt that it is going to ask you database settings and initialise.
    1. Database name: your new database
    2. Username: either root, or your new ‘test’ user (if you can get this to work)
    3. Password: either for root or test
    4. Hostname: localhost:/run/mysqld/mysqld10.sock
      1. This is critical, as far as I can tell, and was the only way I could get rid of the pesky ‘server error 500’ if I just used ‘localhost’ or 127.0.0.1’.
    5. Table prefix: I left it as wp_ as I am going to use a separate database for each site.
If things have gone well, you should get a congratulatory message (echoed by me for working through all these instructions!!) and be able to use Wordpress itself to do the configuration, choose theme, etc.

Good luck, and do let me know how you get on.
Robert

1 comment:


  1. Hello,

    we provide affordable and result-oriented SEO services, please give a chance to serve you.


    Thanks
    Admin: E07.net

    ReplyDelete