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.
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.
- Part 1 – introduction to WordPress on your NAS
highlight the different scenarios and necessary preparations
- Part 2 – install WordPress from Synology (this post)
highlights the installation steps of this setup
- Part 3 – install WordPress from WordPress.org
highlights the installation steps of this setup
- Part 4 – WordPress maintenance
backup, second instance, suspend, reset and uninstall, internal DNS setup
- Install WordPress on Synology NAS (part 2)
- Installing WordPress from Synology
- Install PHP 7.3
- Run the WordPress installer
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.
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.
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)
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.
- 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.
- 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.
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.
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.
This is the index.html file. Now you know that Web Station works.
Here you find the Web Station datasheet.
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.
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.
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.
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.
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.
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.
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.
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.
in the first screen, select the language, and click Continue
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.
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.
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.
- Site Title
Now, click Install WordPress to make it happen. Hopefully, you get the Success! screen. Click on the Log In button.
You now get the login screen, that gives you access to the backend of your website.
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.
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).
Paul Steunebrink / Storage Alchemist