Successfully install WordPress on Synology NAS (part 3)

Install WordPress on Synology NAS part 3 focuses on the WordPress.org solution. Its use is unlimited, but it is more complex to install. First, we install all packages and files on your NAS. Next, we configure the components to work together and achieve your desired goal.

wordpress.org, home page

Install WordPress on Synology NAS (part 3)

This is part 3 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

Instead of using WordPress from Synology, you install WordPress from a download at WordPress.org. The advantage is that you have full control over the version of WordPress you use, both from the start and during the lifetime of your website.

Because you do not install the WordPress package from Synology, you manually install the dependencies that WordPress relies on. You install them by using the packages in Package Center.

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

For a quick overview, you install these packages (as of DSM 6.2.4 and 7.0.1):

  • PHP 7.4
  • Web Station
  • Apache HTTP Server 2.4
  • MariaDB 10
  • phpMyAdmin
  • Text Editor
  • WordPress (download from WordPress.org)
  • copy WordPress files from computer to NAS

Both the phpMyAdmin package and WordPress rely on PHP 7.4. If your phpMyAdmin package still insists on installing PHP 7.3, please update the phpMyAdmin package from either Package Center or Synology Download Center.
Note that these version numbers may change later as Synology constantly updates the software.

Configuration

After the initial installation of packages, the configuration is obviously more complex than the WordPress from Synology route. The following list briefly outlines the steps in the process:

  • configure Web Station
  • configure PHP extensions
  • change WordPress sample configuration
  • create WordPress database and user
  • redirect traffic for domain name
  • install SSL certificate
  • create virtual host
  • configure SSL certificate for virtual host
  • set web folder permissions
  • set WordPress folder permissions
  • WordPress 5-minutes installation

During the MariaDB 10 installation, you create a password for the database root account in MariaDB. You need the root account to create a WordPress database user later on.

Last, you run the WordPress installer. You provide the site name and create an administrative user account for the website during this process.

Okay, let’s get started.

Installing WordPress from WordPress.org

You will see all steps involved in a custom setup in this setup. It is similar to what Synology envisioned, with several extra steps. The result is a WordPress website with your own domain that you access externally from the internet.

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

Install PHP 7.4

WordPress is a PHP application, so you need to install a version of PHP. From Package Center, install the PHP 7.4 package. Note that WordPress from Synology uses PHP 7.3, but we will use the newer PHP 7.4, the required version for phpMyAdmin from Synology.

synology, package center, php 7.4, dsm6

After installation, you won’t find any traces of it in DSM, not an application in the main menu, a folder, or else.

We configure the PHP 7.4 extensions later in Web Station. 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. See the contents of this file for both DSM 6 and DSM 7 below.

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

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 one of the two screens above, depending on your version of DSM. This is the index.html file.

For reference, look up my Web Station datasheet.

Note

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

Now you have to add it yourself to get the DSM login screen. If you omit the port number, you get the index.html screen from Web Station.

Install Apache HTTP Server 2.4

WordPress needs an HTTP server, and for WordPress from WordPress.org, we use Apache HTTP Server 2.4.
Like with the PHP package, after installation, you won’t find any traces of it on the DSM desktop, not an application in the main menu, a folder, or else. It is a service that runs in the background.

synology, package center, apache http server 2.4, dsm6

We configure Apache HTTP Server 2.4. later for a virtual host in Web Station. 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.

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 WordPress creates a database and a user for itself.

Create a strong and unique password of at least ten characters, mixed case, numeric, and special characters. Store it in a safe location. Please copy and paste it into the screen. This avoids typos; you will need it again in a few minutes.

synology, mariadb 10, set up, password, dsm6

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

After installing, you 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 phpMyAdmin

In this scenario, installing phpMyAdmin is a mandatory step because you will use it to create the database user for WordPress. This PHP-based web tool lets you manage the database in MariaDB 10.

Open Package Center and install the phpMyAdmin package. This package depends on Web Station and PHP 7.4; both are already installed if you follow this guide. Otherwise, your NAS installs them along with the phpMyAdmin package.

synology, package center, phpmyadmin, dsm6

After installation, you find an application in the main menu and files in the /web/phpMyAdmin folder (DSM 6) or /web_packages/phpMyAdmin folder (DSM 7). Click on the phpMyAdmin application in the main menu to open it in a separate browser window. Log in with the root account and password of the database. You created this password during the MariaDB 10 installation.

Install Text Editor

This is an optional step but one I recommend. The Text Editor is a plain text editor that you can edit configuration files for WordPress. If you have another editor on your computer that you prefer, skip this step.

synology, text editor, dsm6

In Package Center, install the Text Editor package. After installation, you will find the Text Editor in the main menu.

For reference, look up my Text Editor datasheet.

Tip

The easiest way to use this editor is by right-clicking on a file to edit and choosing Open with Text Editor.

Download from WordPress.org

You download the software from the internet because you choose to go all-in with WordPress on your NAS with the WordPress.org setup.

wordpress.org, home page

Download a recent version from the WordPress.org website to your computer. Why do I say recent and not the latest version? I have two reasons for that.

First, the plugins or theme you plan to use might need an update to be compatible with the latest WordPress release. Second, I always update when I build a new WordPress site. This is a good test for whether the permissions are set correctly.

Note that the download is a ZIP file, for example, wordpress-5.8.zip. Expand the ZIP file on your computer. You get a wordpress folder with approximately 19 items, including three folders.

macOS, finder, downloads, wordpress

And by the way, WordPress.org has its counterpart WordPress.com. The latter is a hosting service based on WordPress and run by Automattic. WordPress.org, on the other hand, is an open-source sibling for self-hosted installations.

Copy WordPress files

You copy the WordPress files and folders from your computer to your NAS in this step. Note that uploading via File Station is quite slow. The transfer is much faster if you connect your computer to the shared folder. Connect with an administrative user account from your NAS.

But first, let us create a folder for the WordPress files. I will show you how to do this with File Station.

In File Station, select the folder /web. Click on the Create button > Create folder. In the pop-up dialog, enter the folder name.

synology, file station, create folder, dsm6

Give the folder a name that is unique to the website you create. Please do not call it /web/wordpress, as this is reserved for the Synology WordPress package and is non-descriptive.

Name your WordPress folder /web/wpaa for a website about All Animals or /web/wphc for a site about Home Cooking. Use your imagination as long it makes sense to you. In this example, I use /web/wpsd, which stands for WordPress Synology Demonstration, and I will use synodemo.com as my domain name.

Also, note to use lowercase characters in the folder name. Please don’t make it too fancy. Keep it basic, with alphanumerical characters only and without spaces. The folder name does not affect your website in any way.

Note: the reason for this unique folder name is that you can potentially create another (WordPress) website on your NAS in its own unique folder.

Configure WordPress from WordPress.org

After installation, follows configuration. You installed all applications and files on your NAS in the previous steps. Now, it is time to connect the dots and make it work.

In this part of the process, there are some differences between DSM 6 and DSM 7. I discuss each separately with the DSM version in the section’s header.

Configure Web Station (DSM 6)

I start with the configuration of Web Station in DSM 6. Next, I discuss Web Station in DSM 7. Please read the part that applies to your setup.

Open Web Station from the main menu of your DSM 6 desktop. In the sidebar, select Status and check the status:

synology, web station, status, dsm6

Your status should look like this:

  • Default server status: Normal
  • Personal website status: Disabled
  • Virtual Host status: — or Normal

Since there is probably no virtual host yet, there is no status information, and a double dash (–) is displayed for that item.

In the sidebar, select General Settings and check the settings:

  • HTTP back-end server (Apache HTTP Server 2.4)
  • PHP: Default Profile (PHP 7.4)

Note that the general settings do not apply since we will create a virtual host for each WordPress instance that we host on Web Station. However, it is good to know that Web Station sees the components we rely on.

synology, web station, php settings, dsm6

In the sidebar, select PHP Settings and check the settings:

  • Default Profile (PHP 7.3) [does no longer apply since PHP 7.3 is not installed for phpMyAdmin anymore]
  • Default Profile (PHP 7.4)

Before continuing the WordPress installation, we prepare the Default Profile (PHP 7.4) with some extensions.

Configure Web Station (DSM 7)

Open Web Station from the main menu of your DSM 7 desktop. In the sidebar, select Status and check the status:

synology, web station, status, dsm7

Your status should look like this:

  • Default server status: Normal
  • Personal website status: Disabled
  • Web service portal status: Normal

Notice the Back-end Packages and Service Packages sections with packages installed earlier.

synology, web station, script language settings, dsm7

In the sidebar, select Script Language Settings. Notice the Customized Profile section, which contains:

  • Default Profile – PHP 7.4
  • Default Profile – PHP 7.3 [does no longer apply since PHP 7.3 is not installed for phpMyAdmin anymore]

Before we continue with WordPress installation, we prepare the Default Profile – PHP 7.4 with some extensions.

Below the Customized Profile, you will find the Packaged-based Profile section. Notice that for phpMyAdmin, there is a dedicated PHP 7.4 profile (in the screen above, it is still a PHP 7.3 profile).

Configure PHP extensions (DSM 6)

On Web StationPHP Settings page, select the Default Profile (PHP 7.4) and click the Edit button. In the Advanced Settings dialog, look up the Extension at the bottom.
If you like, you could create a separate PHP 7.4 profile for WordPress, but I use the Default Profile here.

For reference, you find WordPress’s PHP extensions on this page.

synology, web station, php settings, advanced, dsm6

Enable the following extensions:

  • curl, exif, ftp, gd, gettext, iconv, imagick, intl, mysqli, openssl, posix, soap, sockets, xmlrpc, zip

Close the dialog with the OK button. You may leave Web Station open as we will return here shortly.

Configure PHP extensions (DSM 7)

On Web Station, Script Language Settings page, select the Default Profile – PHP 7.4 and click on the Edit button. In the Edit PHP Profile dialog, select the Extensions tab.
If you like, you could create a separate PHP 7.4 profile for WordPress, but I use the Default Profile here.

For reference, you find WordPress’s PHP extensions on this page.

synology, web station, script language settings, extensions, dsm7

Enable the following extensions:

  • curl, exif, ftp, gd, gettext, iconv, imagick, intl, mysqli, openssl, posix, soap, sockets, xmlrpc, zip

Close the dialog with the Save button. You may leave Web Station open as we will return here shortly.

Change wp-config-sample.php

The wp-config-sample.php will change into wp-config.php during the WordPress installation process. The sample file is a template. By adding some lines to the script before the WordPress installation starts, you ensure that your website will include this in the final wp-config.php file.

With the Text Editor application installed, go to /web/wpsd (or whatever your folder name is), and double-click on wp-config-sample.php. I should open in Text Editor. If not, right-click on the file and choose Open with Text Editor.

synology, text editor, wp-config-sample.php, dsm6

To allow direct downloads of updates from the internet instead of using FTP, add the following lines at the end of wp-config-sample.php:

//**The next line allows direct downloads*/
define('FS_METHOD', 'direct');

Save the file and close the Synology Text Editor.

Create WordPress database and user

From your DSM desktop, open the main menu and fire up phpMyAdmin. Note that it opens in a separate browser window or tab.

synology, phpmyadmin, login

Login to the MariaDB 10 database with account name root and the password you created during the MariaDB installation.

Note that phpMyAdmin is a web application, and you can always open it from http://ip_address_nas/phpMyAdmin/index.php. You do not have to log in to DSM first.

synology, phpmyadmin, add user

Select New in the column left, and click on the User accounts tab at the top of the right pane. This opens the User accounts overview page.

Click on the Add user account link under the New label. This opens the Add user account page.

synology, phpmyadmin, add user

Fill in under Login Information:

  • User name
    • Use text field (from drop-down list)
      • fill in a name for the database user; I use wpsd like the /web/wpsd sub folder I created earlier to keep it easy and consistent
  • Host name
    • Local (from drop-down list)
      • localhost
  • Password
    • Use text field (from drop-down list)
      • Generate a password with the Generate button. This fills in the password fields. Copy and paste the password in a safe place. If you already have a password, you like to use, paste it in the Password field and Re-type field.

Fill in under Database for user account:

  • Create database with same name and grant all privileges > enable

Now scroll to the bottom of the page and click on the Go button.

synology, phpmyadmin, add user

Notice the confirmation in the main screen at the top – you have added a new user – and the database in the left column.

You created the database and user account that WordPress uses to access the database. Note that you need to copy the user name and password into the WordPress installation in a minute.

Logout from phpMyAdmin from the column left, second icon, a door.

Redirect traffic for domain name

If you plan to create a website with your own domain name, you best set up DNS and port forwarding before starting the WordPress 5-minutes install. Once properly set up, WordPress will configure the domain name correctly internally.

  • At the provider of the domain name, direct the domain name to the external IP address of your internet router.
  • In your router, create port forwarding rules for ports TCP 80 and 443 to the same ports on your NAS. Use the manual of your router or search the web for instructions related to your brand and model router.

Suppose you like to use the registered domain name but use your website only internally, set up a DNS server on your local network. You can install a DNS server on your Synology NAS.

Install SSL certificate

If you plan to create a website accessible from the internet, I strongly advise installing an SSL certificate for the domain. To succeed, you must perform the actions from the previous steps where I discussed redirecting traffic for a domain name from your router to your NAS.

To request and install an SSL certificate from the internet, your NAS needs to be accessible from the internet during the enrollment process. Therefore, ports 80 and 443 must be forwarded in your internet router to your NAS.

Go to Control Panel > Security > Certificate tab. If you have not requested a certificate for your host, you can request it now.

synology, control panel, certificate, add

Click on the Add button. The Create certificate screen opens.

synology, control panel, certificate, add

In the first Create certificate screen, choose to Add a new certificate. Click Next.

synology, control panel, certificate, add

In the next screen, choose to Get a certificate from Let’s Encrypt. Click Next.

synology, control panel, certificate, add

Fill in a domain name and a valid email address on the next screen. Click Apply.

synology, control panel, certificate

You now return to the Control Panel > Security > Certificate screen. Notice that the new certificate is added to the list. You will configure this certificate for a virtual host after the next step.

You can, of course, use an SSL certificate from a different provider than Let’s Encrypt. You can do this later as well, and this only requires a change in the certificate configuration and does not affect your website configuration.

Create Virtual Host (DSM 6)

From your DSM 6 desktop, open Web Station. Select Virtual Host in the column left. In the pane at the right, click Create.

synology, web station, virtual host

In the Virtual Host screen, enter the following information.

  • Hostname
    • you hostname or domain that you registered and that you will use for your site; I use synodemo.com
  • Port
    • enable the 80/443 box (default)
  • Document root
    • browse to the folder you created earlier; I use /web/wpsd as I showed earlier in when creating those folders
  • HTTPS settings
    if you plan to use SSL and like to enforce HTTPS, enable HSTS (or HTTP Strict Transport Security); by enabling HTTP/2 you speed up HTTPS traffic
    • enable HSTS
    • enable HTTP/2
  • HTTP back-end server
    • Apache HTTP Server 2.4
  • PHP
    • Default Profile (PHP 7.4)

After filling in all the fields, you click OK. A message about permissions as below may appear.

synology, web station, virtual host

It asks to click OK, but there is no OK button. Click Yes.

synology, web station, virtual host

You now return to the Virtual Host tab in Web Station. Review the virtual host you just created on the right screen.

You can close Web Station as we are finished with its configurations.

Create Virtual Host (DSM 7)

From your DSM 7 desktop, open Web Station. Select Web Service Portal in the column left. In the pane at the right, click Create > Create service portal. This starts the Portal Creation Wizard. The Select a portal type dialog opens.

synology, web station, create virtual host, dsm7

Choose Virtual Host. The Set up a virtual host dialog opens.

synology, web station, create virtual host, dsm7

In the Set up a virtual host dialog, enter the following information.

  • Hostname
    • you hostname or domain that you registered and that you will use for your site; I use synodemo.com
  • Port
    • enable the 80/443 box (default)
  • Document root
    • browse to the folder you created earlier; I use /web/wpsd as I showed earlier in when creating those folders
  • HTTPS settings
    if you plan to use SSL and like to enforce HTTPS, enable HSTS (or HTTP Strict Transport Security)
    • enable HSTS
  • HTTP back-end server
    • Apache HTTP Server 2.4
  • PHP
    • Default Profile ( PHP 7.4 )
  • Access control profile
    • Not configured (default)
  • Error page profile
    • Default error page profile (default)

After filling in all the fields, you click Create. A message about permissions as below may appear.

synology, web station, create virtual host, permissions, dsm7

Click the OK button.

synology, web station, virtual host, dsm7

You now return to the Web Service Portal tab in Web Station. Review the virtual host you created on the right screen under Customized Portal.

You can close Web Station as we are finished with its configurations.

Configure SSL certificate for virtual host

If you installed an SSL certificate on your NAS for your domain, link it to the virtual host before starting the WordPress 5-minutes install.

Go to Control Panel > Security > Certificate tab. Click on the Configure button in DSM 6 or the Settings button in DSM 7. This will show you all services on your NAS, for which you can configure a certificate.

synology, control panel, certificate, configure

Select the service in the Services column at the left. This is the host or domain name for your site you just configured a virtual host for. Select the proper certificate from the drop-down list in the Certificate column at the right. Click OK to close the dialog.

You may close Control Panel.

Set web folder permissions

The default folder permissions of the /web folder are not correct for your WordPress and phpMyAdmin applications. You use File Station from your DSM desktop to correct this.

Before we dive into the details, please be aware that a subfolder can inherit permissions from a parent folder or have its own permissions set independently from the parent folder.

In our setup, the /web shared folder is the parent folder. Both the /web/phpMyAdmin (DSM 6) and /web/wpsd folders are subfolders to the /web folder. Only the /web/wpsd folder for WordPress inherits the permissions from its parent folder, the /web folder.

On DSM 7 the phpMyAdmin tool is installed in the /web_packages/phpMyAdmin folder. I discuss the permissions for phpMyAdmin below.

In my example, we first set the permissions for the WordPress folder, /web/wpsd. This is the same procedure for both DSM 6 and DSM 7.

  • web (parent folder)
    • phpMyAdmin (subfolder, explicit permissions, not here in DSM 7)
    • wpsd (subfolder for WordPress, inherited permissions)
synology, file station, shared folder, properties

Open File Station and browse to the /web shared folder. Right-click the folder and choose Properties. In the Edit shared folder web dialog, open the Permissions tab. Here you see the default permissions:

synology, file station, shared folder, permissions

Notice that there is an http (user) and an http (group). You can tell the difference from the icons where a single head is a user. Please note that in DSM 7 the http (user) seems to have disappeared. Only the http (group) exists, which is fine.

Select the http (user) at the top, and click the Edit button. The Permission Editor opens. Open the User or group drop-down list, where the http (user) is selected. Scroll and select System (group). Click OK.

synology, file station, permission editor

Review the result. It should be like this:

  • SYSTEM (group) – read
  • administrators (group) – read & write
  • http (group) – read

Because you change only the permissions for this folder, you do not enable the checkbox at the bottom Apply to this folder, sub-folders and files, and click OK. You have now set the proper permissions for the /web shared folder.

Set phpMyAdmin folder permissions (DSM 6)

Next, select the /web/phpMyAdmin folder. Right-click the folder and choose Properties. In the Properties dialog, open the Permissions tab. Set the permissions as for the /web folder.

Start phpMyAdmin application and check whether all work properly.

Set phpMyAdmin folder permissions (DSM 7)

Next, select the /web_packages/phpMyAdmin folder. Right-click the folder and choose Properties. In the Properties dialog, open the Permissions tab. Set the permissions as for the /web folder.

Start phpMyAdmin application and check whether all work properly.

Set WordPress folder permissions

Next, browse the /web/wpsd (or whatever your WordPress folder is called) folder. Right-click the folder and choose Properties. In the Properties dialog, open the Permissions tab.

synology, file station, explicit permission

Notice that the permissions are grey because they are inherited from their parent, the /web share folder. First, we make the permissions explicit. Click Advanced options > Make inherited permissions explicit.

Next, you should change the permissions in:

  • SYSTEM (group) – Custom
  • administrators – Full Control
  • http (group) – Custom
  • users (group) – Custom
synology, file station, custom permissions, dsm7

The Custom permissions mentioned above are Read + Write but not Delete. Please note to keep Delete subfolders and files enabled.

When you are done, set a checkmark in the box for Apply to this folder, sub-folders, and files. Next, click OK. All subfolders and files inherit the permissions from the /web/wpsd folder.

WordPress pre-install

Go to your browser and enter the name of the Virtual Host you just created. In my case, I type in the browser the address synodemo.com, and you type in your domain name. Notice the padlock, meaning the certificate is correctly linked to the domain name.

wordpress, setup-config script

Because WordPress is in its uninstalled state, you are redirected to https://domain_name/wp-admin/setup-config.php. This starts the installation script. Click on the Let’s go! button.

wordpress, setup-config script

Start with connecting to the database.

  • Database Name
    the database name you created, like wpsd in my case
  • Username
    the user name you created, like wpsd in my case
  • Password
    the password for the database user that you created earlier with phpMyAdmin
  • Database Host
    this is important; localhost will not work; fill in:
    localhost:/run/mysqld/mysqld10.sock
  • Table Prefix
    for example same as database name, but with a underscore at the end, like: wpsd_ but every other combination of lower case characters will do; you also may leave it at wp_

Click on the Submit button.

wordpress, setup-config script

If the connection to the database was successful, you get the All right, sparky! message. Click on Run the installation to continue with the actual installation of WordPress, the famous 5-minutes install.

Note for those that are interested; you just created the file wp-config.php. This is the main configuration file of your WordPress site, and one of its main purposes is maintaining the connection to the database.

WordPress 5-minutes install

The actual WordPress installation asks you just a few things. Don’t worry, take your time, it is easy. After the pre-installation above, you are directed to https://domain_name/wp-admin/install.php.

In the Welcome screen, you are requested to fill in some information.

wordpress, installer, 5 minutes
  • Site Title
    WordPress uses this as the title of your site. It can be your 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 into WordPress. It will have administrator privileges and you will typically use it to set up your web site in WordPress. You are advised to create at least one regular 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 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.
    Note: the generated password is strong and a good option.
  • Your Email
    Enter a valid email address for the user. WordPress sends notifications to this address.
  • Search engine visibility
    If you are building your website, you may not need search engines crawling your site. If you use your site internally, this setting does not affect it anyway.

That’s all. Click the Install WordPress button. WordPress will be busy for a few minutes. When finished, 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://domain_name/.

You should see your WordPress website with the Site Title you just filled in. The layout is based on the default theme that WordPress installed.

With the address https://domain_name/wp-login.php you get the login screen again. 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.

Check for updates

You can log in to your WordPress dashboard and go to the Updates in the left column. Most likely, a pre-installed plugin needs an update. Performing the update is a good test before designing your site and filling it with content.

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

53 thoughts on “Successfully install WordPress on Synology NAS (part 3)”

  1. Thanks, Paul, so much for the detailed explanation of setting up WordPress for Synology NAS. I was able to replicate your explanation and created my first Blog. As I faced a lot of troubles setting up WordPress using Synology NAS in-app store.

  2. Dear Paul,

    I have tears of joy in my eyes writing this. After weeks struggling to set up the NAS as webserver for our small company this tutorial was the final step to get it running. I have not realized that all of my troubles were related to the Synology-built wordpress installation. The other headache was that our internet provider gives “real” IP4 connections only by request. Thank you very very much.

    Martin

    1. Dear Martin,
      Great to hear that this post helped you to achieve your goal. And thank you for ‘Buy me a coffee’ rewards!
      Best regards, Paul Steunebrink / Storage Alchemist

  3. Hello Paul,

    Great tutorial! I had trouble using the standard WordPress package from Synology in combination with my ‘virtual host’ under DSM7 (you can’t choose from web_packages and tricks with symbolic links etc didn’t work). Your description and using the standard WP-stuff did the trick. Now I can start creating my (WP) blog/ website.

    Thanks a lot!

    Regards,
    Aad.

  4. This is very detailed, thank you for taking the time to write this!

    I am getting a little hung up configuring DSM 7 without a domain name though. I essentially just want to create an internally hosted WordPress site and don’t need or want it exposed to the internet. Is it possible to configure WordPress for http://*nas-ip-address*/wordpress/?

    1. Hi Brandon,
      This is a good question. To be honest, I did not investigate this scenario with the WordPress.org setup. Of course, you can do this with the Synology WordPress package, as discussed in part 2 of this series. Alternatively, if you prefer the custom setup with WordPress.org (part 3), and do not like to register a domain name externally, you can set up DNS on your Synology NAS. You still have a domain name (which you might not want) but no need to register a domain. Choose a domain name that does not exist on the internet, like mydomain.local
      Best regards, Paul Steunebrink / Storage Alchemist

      1. Hi Alchemist,
        I have the same question as Brandon encountered: I just need to create an intranet WordPress (only computers which are in the same LAN can access it) and don’t need or want it exposed to the internet. From your answer above, I’d like to make sure some steps:
        1) Install SSL certificate (which needs Domain Name)
        2) Create Virtual Host (which needs Hostname)
        Do you mean that even if I didn’t register a domain name formally, I still can fill a fake domain name in those two places and it’ll work too?

        1. Hi Thelma,
          Regarding the SSL certificate: do you need one for internal use? I do not see the benefit. But if you like, you could use a self-signed certificate. There is already one on your NAS. Note that browsers always issue a warning with self-signed certificates, which you can disable. Certificates from external sources like Let’s Encrypt perform a domain validation during issuance. In other words, you need a registered domain name for that.
          Regarding the virtual host, you could fake a hostname with the help of a DNS server on your internal network. Your NAS can be a DNS server. I have not explored this option, so this is theory only. It is on my to-do list.
          Best regards, Paul Steunebrink / Storage Alchemist

          1. Hi Alchemist,

            Thank you for your response.
            Because I just need to create an “intranet” WordPress, from your response, I can just skip these 2 steps (“Install SSL certificate” and “Create Virtual Host”), right?

            Still thanks a lot~!!

          2. Hi Thelma,
            Is there a reason you did not go for the WordPress package from Synology? In part 1 I explain the differences and which one is best when. In part 2, I explained the installation in full detail. You can prevent all those questions if you would go that route. I am curious why you preferred to go the WordPress.org download installation and deviate from that scenario?
            Best regards, Paul Steunebrink / Storage Alchemist

          3. Hi Alchemist,
            I’d try downloading from WordPress.org because the package is up-to-date. But I’d try your part II if I can’t solve the problems I encountered now. Thank you~!!!

      2. Storage Alchemist and others for localhost only:

        First off, Storage Alchemist, thank you for the very detailed instructions. I too had this same issue, trying to do only a localhost. After trying .local, etc., I found that if you just drop the ending all together, it works. If you just have hostname set as your domain, instead of domain.com, put “domain” only. In your browser, just type in the “domain” and it works like a charm.

        Again, thank you for all your help, I’ve tried this several times and spent many hours without success until now thanks to your help. Hope this helps others out as well!

        Jon

        1. Hi Jon,
          Thank you for your comment and for sharing your experience with the local domain. Very helpful.
          Best regards,
          Paul Steunebrink / Storage Alchemist

  5. Thankyou for this superb tutorial on getting this set up. I did my website the manual way by downloading WordPress myself onto my DS1821+ and it worked superbly.

    1. Thank you Stephen for sharing your experience. I am very happy it worked for you.

      Best regards, Paul Steunebrink / Storage Alchemist

  6. Hello Alchemist,

    I have a question here:
    “Set phpMyAdmin folder permissions (DSM 7)
    Next, select the /web_packages/phpMyAdmin folder. Right-click the folder and choose Properties. In the Properties dialog, open the Permissions tab. Set the permissions as for the /web folder.”
    1) Does it mean that “right click on the folder of phpmyadmin >> choose Properties >> open the Permission tab >> select http(user) >> click Edit button >> scroll and select System(group) >> and click OK” ?

    2) I set wrongly on the permission at first on “web_packages” and I don’t remember the original setting(what it has now is SYSTEM: read, administrator: read&write, http-group: read). I’ve changed something into “SYSTEM: read”. Is it ok? Or may you tell me the default setting?

    I’m a little confused now… Thank you so much for the information

  7. It is important to mention in the permissions section, that the instructions refer to restricting the explicit delete permission. I had also unchecked “Delete subfolders and files” and that caused some issues with the system being able to add things, but not remove the .maintenance file or removing old plugins. 😅

    1. Hi Erik,
      Thank you for your feedback. Much appreciated. I updated the section on custom permissions of the WordPress folder accordingly, both with text and an additional screenshot.
      Best regards, Paul Steunebrink / Storage Alchemist

  8. Hello! First of all, the install worked perfectly. Sparky is happy. One observation: On Installing “loginizer” the plugin warns about wp-config and htaccass as well as suggests other filer permissions than the ones created e.g. for /wp-admin ect (0755 suggested rather than 0775). What do you think is to do here?
    Thanks! Mac

    1. Hi Mac/Sparky,
      Good to hear it helped. With regards to the permissions, you have a point. I will look into it and update the post.
      Best regards, Paul Steunebrink / Storage Alchemist

  9. Very good tutorial. One thing I am missing is the proper permissions settings for WP.org as well as reasonable Firewall-Tweaks on the Synology NAS to minimize security issues. Also, are there any procedural changes when using the latest OS 7.1 v3?
    Thanks again!
    Jon

    1. Hey, just saw the person before asking a similar question, so pls omit the permissions question but how about the firewall optimization? Do you recommend filtering everything going through ports 80/443 except say ones own country? Cheers! Jon

      1. Hi Jon,
        For the website, ports 80/443 are sufficient but depending on other services you run on your NAS, you might open more ports in the firewall.
        Best regards, Paul Steunebrink / Storage Alchemist

    2. Hi Jon,
      Thanks. I am not sure I follow you on the missing permission settings. What are you missing from what is described?
      About DSM 7.1 Update 3, I do not expect any procedural changes, but if you run into any issues, please let me know.
      Best regards, Paul Steunebrink / Storage Alchemist

      1. I followed your guide to set up WordPress 6 on DSM 7.0.1-42218 Update 3 and it worked great (thank you).

        However, I recently updated to DSM 7.1.1-42951 and WordPress is no longer working, I just get “Unable to connect” when I navigate to my website. I ran through this whole guide again and although everything still looks to be configured correctly, I just can’t get it to work 🙁

        I’d be interested to know if anyone else is running DSM 7.1.1-42951 yet, and if so is WordPress still working?

        1. Hi Andrew,
          Sorry to hear that the 7.1.1-42951 (Release Candidate) broke your WordPress setup. Hopefully this improves once the final 7.1.1 release is available. Feel free to comment here once you have updated to that release.
          Best regards, Paul Steunebrink / Storage Alchemist

          1. Thanks for replying, Paul.

            I updated to 7.1.1-42962 today, which I believe is the final release, but I am still getting the “unable to connect” error it seems 🙁

            When I get some time I’ll try backing up my wordpress database, uninstalling everything and starting from scratch again. Not sure what to do other than that.

            Just strange that the DSM update broke it for me, as it was working perfectly before the update.

          2. Sorry to hear that, Andrew. I have not heard any similar report. I hope reinstallation will work for you.
            Paul

  10. I was almost there in my initial attempt without seeking internet help but i struggled with numerous issues through my process. Your tutorial was a hit first time. I forgot to add ‘…mysql.sock’ file reference, this was my main issue. Though I still cannot get the any website to work via a ‘port-based’ at least using ‘name-based’ works. For now I am happy with that until i get bored and want to figure out why ‘port-based’ does not work.

    Excellent and thorough enough to work at first attempt.

  11. Thanks for the great tutorial for installing the updated wordpress.org instead of the outdated synology package.

    With the syno package, it is possible to navigate to domain.com/files for filestation, but that doesn’t appear to work when using the wordpress.org install. Is there a way to get this working?

    1. Hi Kerry,
      Good question. The alias (../file for File Station suffix) will not work with the domain for your WordPress domain and site.
      Maybe you can link a different domain for this purpose via a reverse proxy. I have never tried to combine this with a website on the same NAS.
      Best regards, Paul Steunebrink / Storage Alchemist

    2. Darren Jackson

      Take a look in Control Panel | Login Portal where you can enter a custom domain name for accessing DSM and the Synology Packages like File, Drive, etc.

  12. Bart van der Mark

    Truly an amazing and accurate guide… Highly appreciated. Worked like a charm on the latest DSM7.

  13. Great guide, helped me a ton! Juts an FYI – I must have set the permissions up for the web shared folder in a different way… Basically I didn’t have the option to configure Windows permissions. In order to fix it I had to goto ControlPanel->SharedFolder select the “web” folder, right-click and select Action->”Convert to Windows ACL”. I was the able to set the permissions as you had shown.

    1. Thank you for the feedback. The Windows ACL conversion is new to me but something to consider.
      Best regards, Paul Steunebrink / Storage Alchemist

  14. Excellent article! Best one on the topic I have read so far. Easy to understand and follow, even for a layman. Have you ever contemplated to implement a cloudflare tunnel so no ports would have to be forwarded? And if, at what stage of this guide would you implement it? Curious to know your thoughts on this.

    1. Hi Oliver,
      Thank you for your friendly comment. I have not considered a Cloudflare tunnel and, therefore, would not know where to include this in the manual. I guess, I would set the tunnel up before I start with the installation and configuration on the NAS.
      Best regards, Paul Steunebrink / Storage Alchemist

  15. Thank you so much for this insightful post. I’m excited to host a personal website on my Synology to learn about webdev. However, after following all your instructions, I get all the way to WordPress install screen (asking for database name, username, password, database host, and table prefix), and when I input everything you have advised I am greeted with “There has been a critical error on this website Learn more about troubleshooting WordPress.” very discouraging. Are there any specific troubleshooting items to check first? Quite lost at such a vague message. Thanks again, Tim

    1. Hi Tim,
      Sorry to hear about the error. I would go through all settings as described in the post, in particular, the permissions. Also, can you connect to the database with the user you created? You can check that with phpMyAdmin. Last, you can search for this particular error on the web. I hope this helps.
      Best regards, Paul Steunebrink / Storage Alchemist

      1. Thank you Paul. I was eventually able to sort it out. I hadn’t granted extensions to the proper php profile. When I granted them via the default like you directed then it worked perfectly. Thank you tons for this guide. Even an absolute beginner like myself was able to follow. Cheers

  16. Hi there,
    Thank you for a pretty well written guide. However, I have difficulties to find the “http (user)” to set up permissions for web-folder. I can only see “http (group)”. What might be the issue here please? Thank you in advance.

    Kind regards, Hamid

    1. Hi Hamid,
      In DSM7 the http (user) seems to have disappeared. It does not matter. The intention is to give Read permissions to the http (group), which is still there. I will update the text.
      Best regards, Paul Steunebrink / Storage Alchemist

      1. Hello Paul,
        Thank you so much for amazingly quick clarification. I will go ahead give it a try.

        Best, Hamid Aminrezai

        1. Hi again Paul,
          My apologies for bothering again.
          I have reached pretty far in the configuration. Actually I have installed ssl-cert. and about to connect to the DB, I have created. I can sign-in to the database with my creds on phpMyAdmin. However, when I try to install WP, I cannot connect to DB. I use the same creds for phpMyAdmin, and as you suggest in the guide, I use Database Host “localhost:/run/mysqld/mysqld10.sock”.

          Is there anything I should conf. on my NAS or should I enter different Databas Host?

          Thank you

          1. Hi Hamid,
            As you might know, the user for logging in to phpMyAdmin is in general, ‘root’, whereas the user that accesses the DB for WordPress is a different user. If you are not sure about the user credentials, you can delete the DB and user and create it again. See part 4 of this series to delete the DB and user.
            Best regards,
            Paul Steunebrink / Storage Alchemist

  17. Thanks for this post! I was struggling to get this to work. Two questions: 1) for security settings, with DSM 7 there is no http user. Your instructions now say that is ‘fine’ but instructions are unclear what to do (i.e. is there *nothing* to do? there are no changes requested here for the http group? Nothing to do per phpmyadmin instructions? )
    2) I’m using DDNS via synology.me for external access, and a CNAME record in DNS to redirect www for http://www.conant.com hosted on my synology. But I can’t do this for the apex domain. This keeps me from setting up the certificate on conant.com as well. What are my options? Thanks!

Leave a Comment

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