Successfully install WordPress on Synology NAS (part 2)

In part 2 of installing WordPress on Synology NAS, we focus on the WordPress solution provided by Synology. Its use is limited, but it is easy to install. In a step-by-step guide, I walk you through the entire process. When finished, you can continue in part 4 for tips on backup and other maintenance tasks.

synology, package center, wordpress, dsm6

Install WordPress on Synology NAS (part 2)

This is part 2 in a series of 4 about hosting WordPress on Synology NAS. The four parts each cover a different area of the topic.

Overview

The installation and configuration include several steps that I briefly highlight below. Further on in this post, I discuss them in more detail. This post was made with a Synology NAS running DSM 6.2.4 and later extended for DSM 7.0.1.

Installation

WordPress depends on some services that you need to install first. Fortunately, all dependencies are installed first and correctly when installing the WordPress from Synology package from Package Center.

synology, package center, installed packages, dsm6, install wordpress on synology

For a quick overview, these packages are – as of DSM 6.2.4 and 7.0.1 – installed with WordPress from Synology:

  • PHP 7.3
  • Web Station
  • Apache HTTP Server 2.2
  • MariaDB 10
  • WordPress (from Synology)

Configuration

During the WordPress from Synology installation, you create a password for the database root account in MariaDB and a database user for WordPress.

Right after the installation, you run the WordPress installer. During this process, you provide the site name and create an administrative user account for the website.

To summarize, you will create three accounts with passwords. Please give each account its unique and strong password and store them in a safe place.

Installing WordPress from Synology

In this setup, you see all steps involved in the standard setup, as Synology envisioned it, with a few extras. The result is a WordPress website that you access locally via your NAS’s IP address or server_name.local in your browser.

safari browser, address bar, ip address to wordpress site

Even if you plan to set up WordPress from WordPress.org in the future, it is a great experience to try the easy way first. This way, you can check how your NAS responds to the allocated resources. You also make yourself familiar with the different applications that WordPress depends on and with WordPress itself.

Migrating a WordPress website to another installation is a rather straightforward process as well. Therefore, you can use this setup for building new websites that you will host later on a different server when you go live with a site on the internet.

Two ways to install

There are two ways to do the WordPress from Synology setup. Both methods start in Package Center.

  1. In Package Center, list All Packages and search for the WordPress package. Click Install. Package Center will install all dependencies in the right order. This is the easiest way.
  2. Manually install the dependencies in the right order, as I will explain below, and evaluate each package before going to the next. This makes you more aware of the components involved and what they do.

I will discuss the second option here. You could evaluate each component even if you decide to go for option 1.

If you have reserved a specific volume for WordPress on your NAS, you can install the packages on that volume.

Install PHP 7.3

WordPress is a PHP application, and therefore you need to install a version of PHP. From Package Center, install the PHP 7.3 package. Note that there is a newer version – 7.4 – but WordPress from Synology uses PHP 7.3.

synology, package center, php 7.3, dsm6

After installation, you won’t find any traces of it in DSM, no application in the main menu, or a folder, or else. Also, after installation, there is nothing to configure.

Summary: nothing fancy here, just check under Installed in Package Center. For reference look up my PHP 7 datasheet.

Install Web Station

From Package Center, install the Web Station package. This package installs the Web Station application in the main menu. It also creates the shared folder /web with a subfolder /web/web_images and the index.html file.

On DSM 7 Web Station creates a second shared folder /web_packages. You will find the WordPress files below this shared folder at the end of the installation process.

synology, package center, web station, dsm6

The Web Station package turns your NAS into a web server. To check if Web Station works, open a separate window in your browser. Type in the address bar the IP address of your NAS like 192.168.10.100 or “server_name.local” like mynas.local.

In both instances, you should see a blueish screen with a globe if you run DSM 6 or an almost white screen with a person behind a computer from DSM 7.

synology, web station, index.html, dsm6
synology, web station, index.html, dsm7

This is the index.html file. Now you know that Web Station works.

For reference look up my Web Station datasheet.

Note

Before you installed Web Station, entering the IP address or server_name.local of your NAS in your browser gave the DSM login screen. The port number (default 5000 or 5001) was added automatically.

Now you have to add it yourself to get the login screen. If you omit the port number, you get the index.html screen from Web Station. As a result, enter IP address:5000 or server_name.local:5000 of your NAS in your browser. Note that your port number can be different if custom port numbers are configured.

I suggest you update the favorite or bookmark in your browser to access the DSM login screen for your convenience.

Install Apache HTTP Server 2.2

WordPress needs an HTTP server, and WordPress from Synology uses Apache HTTP Server 2.2.
Note that there is a newer version – 2.4 – but WordPress from Synology uses Apache HTTP Server 2.2.

synology, package center, apache http server 2.2, dsm6

As with the PHP package, there are no configurations to make. Again, nothing fancy here, just check under Installed in Package Center.

For reference look up my Apache HTTP Server 2 datasheet.

Install MariaDB 10

WordPress needs an SQL-type database, and MariaDB is the tool for this purpose. In Package Center, look up MariaDB 10 and install it.

synology, package center, mariadb 10, dsm6

As soon as MariaDB 10 is installed, it asks you for a password. This is the password of the root account of the database. You will later use it when you let WordPress create a database and database user for itself.

Create a strong password and unique password and store it in a safe location. Please copy and paste it into the screen, twice. This avoids typos.

Note: you will need it again in a minute.

synology, mariadb 10, set up, password, dsm6

Leave the port number at 3307 (DSM 6) or 3306 (DSM 7).

After the installation, you can find the MariaDB 10 application in the main menu. It allows you to reset the root password and the database. Normally, you do not need to use this application.

For reference look up my MariaDB 10 datasheet.

Install WordPress

Finally, you install the WordPress package. You get two screens to fill in information that lets WordPress connect with the database from the MariaDB 10 application.

synology, package center, wordpress, dsm6

Set up WordPress

You are immediately asked for the administrator credentials of MariaDB 10. This is the account root and the password that you just created in the previous step. This allows WordPress to set up its database and database user in the next step. Once that is done, WordPress will not use the root account anymore.

synology, wordpress, set up, password, dsm6

Set up the WordPress database

You enter three items on this screen. The database name and database user account are already filled in. You can change them, but I see no need to do this. Fill in a password.

Again, create a strong and unique password, store it in a safe location and copy and paste it into the screen to avoid typos. Do not reuse the root password.

synology, wordpress, set up, password, dsm6

WordPress uses this account to connect to the database and read and write information. You will never use this account to log into WordPress. It is a database account.

We create your first WordPress account in a minute.

Ready but not done yet

Technically, you now installed WordPress with all dependencies and made a connection between WordPress and the database. You can find the WordPress files in the /web/wordpress folder (DSM 6) or the /web_packages/wordpress folder (DSM 7). But the WordPress website does not yet exist.

You bring WordPress to life with the WordPress installer in the next step. For DSM 7 users there is one optional step to take.

For reference look up my WordPress datasheet.

Configure WordPress alias (DSM 7)

This is a feature that applies to Web Station in DSM 7 only. You can configure the alias. This step is optional.

safari browser, address bar, ip address to wordpress site

In the example from the screenshot above the address to the WordPress website is http://ip_address_nas/wordpress. The part after the IP address is the alias.

The default alias is “wordpress” without quotes. This is configured in the alias portal in Web Station.

synology, web station, edit alias, dsm7

You can edit the alias portal and change it. Open Web Station > Web Service Portal and select the WordPress alias portal under Default Portal on the right pane. Double-click on it or click the Edit button above.

In the Edit alias portal dialog, see Alias and change “wordpress” to another value like “intranet” and click Save.

Important: use lowercase characters and no spaces or special characters in the alias.

synology, web station, edit alias, dsm7

Now, your WordPress website is accessible via http://ip_address_nas/intranet or http://server_name.local/intranet.

You can also configure an Access control profile for your site as well as an Error page profile for custom error pages. I do not cover these in this post.

Note

I suggest you configure the alias before you set up WordPress. I have not tested whether or not changing the alias after the fact works as well or breaks your WordPress website.

Run the WordPress installer

After installation follows configuration: run the WordPress installer. This is also known as the 5-minutes installation. The installer is actually a PHP script inside WordPress. There are two ways to start the installer. The result is the same.

You can open the WordPress application that is in the main menu of your NAS. This will open the installer in a new browser window or tab.

The address is http://ip_address_nas/wordpress/wp-admin/install.php. Typing in that address in your browser is the other way.

synology, wordpress, installer, language, dsm6
  • Language
    in the first screen, select the language, and click Continue
synology, wordpress, installer, 5 minutes, dsm6
  • Welcome
    in the Welcome screen you are requested to fill in some information
    • Site Title
      WordPress uses this as the title of your site. It can be the business name, or the name of your sports club or hobby.
      Note that you can easily change this afterwards so no reason to sweat about it.
    • Username
      This is the first user that you create to log in to WordPress. It will have administrator privileges and you will typically use it to set up your web site in WordPress. Note: you are advised to create at least one additional non-administrator account later for creating content.
      Tip: choose a name that is not obviously recognizable as administrator. Avoid everything with ‘admin’ in it.
    • Password
      This is the password of the administrator user mentioned above. Again, create a strong and unique password, save it and paste it into the screen to avoid typos. Do not reuse passwords.
    • Your Email
      Enter an email address for the user. This email address is used for administrative purposes by the web site. Messages about a finished backup for example are send to this address.
    • Search engine visibility
      If you are building your website, you may not need search engines crawling your site just yet. If you use your site internally, this setting does not affect it anyway.

Now, click Install WordPress to make it happen. Hopefully, you get the Success! screen. Click on the Log In button.

synology, wordpress, installer, success, dsm6

You now get the login screen, that gives you access to the backend of your website.

synology, wordpress, login, dsm6

Instead of logging in, let’s have a look at the website! Click in the log-in screen on Back to <site name> or type in the browser http://ip_address_nas/wordpress/.

You should see your WordPress website with the Site Title you just filled in.

With the address http://ip_address_nas/wordpress/wp-login.php you get the login screen. Log in with the username and password you just made with the WordPress installer. You are now in the admin pages or Dashboard. Here you manage your website. You can log out from the top-right corner.

Note that you now technically have two websites—one at  http://ip_address_nas/ and one at  http://ip_address_nas/wordpress/. The first one is from Web Station’s index.html file, as mentioned earlier.

Remember to log in to DSM via http://ip_address_nas:port_number/. For example, http://192.168.10.100:5000 if 5000 is your DSM port number (which is the default for HTTP access).

Thanks for reading

This post is donation-ware, and I made it to help you. Please consider leaving a comment or even buying me a coffee if it did. I will be eternally grateful.

Paul Steunebrink / Storage Alchemist

4 thoughts on “Successfully install WordPress on Synology NAS (part 2)”

  1. Thanks for your time on this tutorial.
    I have tried to follow, but every time I get the same error:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Can you help me with that?
    Thanks in advance!!

    1. Hi Miguel,
      Sorry to hear that you are not successful with your setup. If you like, please send me details about your NAS, RAM in the NAS, version of DSM via email (link is on the home page, at the bottom), and a screenshot of the error(s).
      Best regards, Paul Steunebrink / Storage Alchemist

  2. Thanks for your efforts for making these tutorials. The contents are crystal clear and should be good for beginners like me.

    So, I have WordPress installed on my Synology NAS using the DSM 7 package centre following Part 2 of the Tutorial. Having enabled DDNS support to allow access to the NAS through a registered hostname provided by one of those free DDNS service providers, I have verified that the port forwarding operation of my router with a simple html webpage created in a sub-folder in the “web” shared folder, “e.g., …/web/sub-folder/index.html” after setting up of a virtual host.

    In an attempt to make my WordPress become extenally accessible in the same fashsion, I am eager to create a a second virtual host for it. However, unlike the personal website in “web” mentioned above, I found that the default file path of the WordPress (as a DSM 7 package), i.e., “…/web_packages/wordpress” was not available for selection as the “document root” of web service portal in Web Station (although ‘web_packages’, and any sub-folders therein, have been defined as shared folders). Could you please advise how I can complete Web Station customisation for creation of a virtual host for my WordPress website to make it publicaly accessible from URL like http://username.ddns-domain/wordpress-alias?

    Million thanks!

    1. Hi, the folder name ../wordpress is reserved for the Synology WordPress package. Please use a different name. See part 3 of this series for detailed instructions. I suggest using these instructions for both your WordPress websites, instead of the Synology package, if you like to make it externally available.
      Best, Paul Steunebrink / Storage Alchemist

Leave a Comment

Your email address will not be published.