Successfully install WordPress on Synology NAS (part 2)

In part 2 on 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 the 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.

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 it in terms of 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. 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.

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 explain below, and evaluate each 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 decided 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. Here you find the PHP 7 datasheet.

Summary: nothing fancy here, not much to check.

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.

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 (without quotes) “ip_address_of_your_nas” or “server_name.local”. In both instances, you should see a blueish screen with a globe.

synology, web station, index.html, dsm6

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

Here you find the Web Station datasheet.

Note

Before you installed Web Station, entering the IP address or server_name.local resulted 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.

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. Here you find the 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 a 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.

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.

Here you find the 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 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. We create that 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. But the WordPress website does not yet exist.

You bring WordPress to life with the WordPress installer in the next step.

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

Thanks

Paul Steunebrink / Storage Alchemist

Leave a Comment

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