Welcome to the world of enhanced web hosting and data management! If you want to leverage the power and flexibility of a Synology NAS (Network Attached Storage) for your website, you’ve come to the right place. This step-by-step guide is tailored for enthusiasts and professionals who wish to harness the robust features of Synology NAS for running WordPress, the world’s most popular content management system.


WordPress on Synology

With all the recent news about cloud storage services like Amazon’s S3 and Google Drive, it’s easy to think that a NAS isn’t necessary. However, there are still plenty of reasons to have your own NAS, and in this guide, I will show you how to install and run a WordPress site on your own NAS. Regardless of what you are using the Synology NAS for, installing WordPress on the Synology NAS is extremely easy.



How to host a website on Synology Nas: What are the requirements?

When you own a Synology NAS, which I assume you wouldn’t read this article, you are good to go to install WordPress on Synology.

However, there are a few things you need to pay some attention to.

  • Would you like to make the website accessible from the Internet? If yes, you need to purchase a domain name (example.com)
  • Port forwarding is necessary for ports 80 and 443.
  • You can use your Synology as a router or a separate router/firewall in two scenarios. In the first scenario, you would need a Synology with two ethernet ports, one connected to the internet modem and the other to the internal network. The second use case needs only one ethernet port, which is my preferred setup. I highly recommend a firewall if you plan to make your WordPress on Synology accessible from the Internet.
  • I recommend a Synology NAS with at least two hard drives in the setup of RAID1 (hard drive mirroring). Don’t plan to host WordPress on Synology with only one disk.
  • I recommend the DS723+. It has an AMD Ryzen R1600 CPU, 2GB of system memory, and a free slot to expand to 32GB (16GBx2). I have a separate article about which Synology NAS to buy.

How do you install WordPress on a Synology NAS?

There are a few different ways to install WordPress on Synology NAS. This guide will show you how to install it using the Package Center.

So, it is time to log in to your Synology and go to the package center. A good practice is to check beforehand if a new DSM update is available.

I log in with the username ‘Admin’ in this example for easier understanding. However, Synology recommends disabling the admin default user and using another username for security purposes.


WordPress on Synology: Package Center

Unfortunately, the WordPress package offered in the Synology distro is not the latest.


serpple

Step 1: Install the WordPress package

Click the ‘Install’ button

The installer will also install all the required packages it needs to run.

  • Apache HTTP server
  • Maria DB
  • PHP
  • Web Station
dependent packages

Now a few necessary steps will follow, and you must enter some login information.

Please note them down. It’s crucial in case later you need to access the database.

Click ‘YES’


Step 2: MariaDB

Set a password for MariaDB. I would leave the port as it is.

WordPress on Synology: Set up MariaDB

Step 3: Set up WordPress on Synology

Set up WordPress on Synology. Enter the credentials of MariaDB for the user ‘root’. You will later use these credentials for PHPmyadmin to access all your WordPress databases. In theory, you could use another username here. However, I don’t recommend it. Instead of changing the username ‘root,’ I recommend setting up another user for MariaDB later.

WordPress on Synology: Set up WordPress

Step 4: Set up WordPress Database

Enter the credentials for your database installation. The installer will set up a database on MariaDB for WordPress.

Set up WordPress Database

WordPress is now installed!

If you go to the package center you notice the WordPress is running and also on which volume it is installed. In my case, I installed WordPress on Volume 1.

WordPress on Synology

Step 5: Log in to WordPress on Synology (last step)

It’s time to fire up WordPress and login to the backend dashboard.

usually, it is the address http://name of your NAS/wordpress/wp-admin

Synology creates a web folder ‘wordpress’

Fill in the information, as for the username please do not use ‘admin’ or ‘administrator’ and also use a strong password. See my article Harden WordPress.

I recommend ticking ‘discourage search engines from indexing this site. I would untick it when you are ready to present your website to the world.


Welcome WordPress

WordPress is installed and ready. Enjoy!! 🙂

You can now manage your WordPress site directly from your Synology NAS. Install any plugin you want from the WordPress repository, or customize your site with themes and plugins from third-party sources.

I love the Kadence or Astra theme together with the Elementor page builder.

Install a Letsencrypt SSL certificate to your Synology

If you want to secure your WordPress with an SSL certificate, Synology makes obtaining a certificate from Letsencrypt easy. Follow my article Synology SSL certificate. Letsencrypt uses port 80 to verify the domain. Make sure the port is open at the firewall. I mentioned it above under requirements.


Synology SSL certificate

Go then to Settings, and assign the SSL certificate to the system default


Synology SSL settings

Lastly, go to your WordPress Dashboard and ensure the WordPress Address URL and Site Address URL are set to https.

Synology WordPress Dashboard

You should see a padlock in the browser address bar if all goes well. Synology will automatically renew the Letsencrypt certificate.


My pick

Featured image Elementor Pro

Elementor Review

Full Comparison – Elementor Pro VS Free


Install the package phpMyAdmin

It’s not required to install phpMyAdmin, however, I recommend it in case you need to manage or modify the database. It’s a web GUI. You find the package in the packager center and it is easy to install, with no wizard to follow.

Accessing phpMyAdmin, http://name of the NAS/phpmyadmin

To log in enter the credentials you entered in step 3.

WordPress on Synology: phpMyAdmin

What are the benefits of running WordPress on Synology NAS?

There are several benefits to running WordPress on Synology NAS. Perhaps the most obvious is that it provides a fast and reliable way to host your website. Additionally, since WordPress is already pre-installed on many Synology NAS devices, it is quick and easy to set it up.

Another great benefit of using a Synology NAS to host your WordPress site is that you can take advantage of the many features and applications that Synology offers. For example, you can use tools like Synology Directory Server to run your domain or download packages like Photo Station to manage and share your photos online.

Finally, by running WordPress on a Synology NAS, you gain the peace of mind that comes with knowing your website is always accessible and backed up.


What are the drawbacks of running WordPress on a Synology NAS?

There are a few potential drawbacks of running WordPress on a Synology NAS:

  1. WordPress may be slower and more unstable on a Synology NAS than if WordPress was running locally.
  2. WordPress is installed in a subdirectory. (see my other article)
  3. It would be best if you secured WordPress yourself. (see my other article)
  4. It can be more difficult to troubleshoot problems. There is no support available. You are basically on your own
  5. You cannot use the WordPress upgrade feature. To upgrade WordPress, you must wait until a new version is available in the package center. Synology does not upgrade WordPress immediately when a new release is public.

I use this Synology for WordPress.



Please also read my separate article, “Optimize WordPress on Synology” I look at some aspects for a better WordPress experience (performance, security, access) on Synology. You can visit my Synology WordPress website here.

Technical Aspects / Questions and Answers

In the next part, we will dive into more technical aspects and how you can adjust WordPress on Synology for an even better experience and eliminate some of the mentioned drawbacks.


Why am I not able to upgrade WordPress from the Dashboard?

WordPress Updates

I have no idea why Synology decided to disable upgrade possibilities. So let us find out what the reason is. Let’s go to the File Station (on the Synology dashboard), web-packages, folder ‘WordPress’, and look for the file ‘wp-config.php. right-click and open it with the text editor – I use the text editor from the package center – We are looking for this in ‘wp-config-php’

define( ‘AUTOMATIC_UPDATER_DISABLED’, true );

It’s not there, so weird why we cannot upgrade WordPress from the dashboard. But wait, in ‘wp-config-php’, there is a reference to another file.

require_once DIR . ‘/syno-wp-config-custom.php’;

Right, a file ‘syno-wp-config-custom.php’ exists too. Open it with the text editor, and there you will see updates are disabled.

If we are trying to modify the line from ‘true’ to ‘false’ and save the file, we get the message

Sorry, the user account was not assigned the proper privileges to perform this action.


🚀 Elevate Your WordPress 🚀

Discover the best themes, page builders & plugins at edyrecommends.com! 🔥

Click HERE

What is the reason why I cannot modify WordPress files on Synology?

Well, in most cases, we are logged in to Synology NAS with an admin account. We need to investigate further what’s going on. Right-click the folder ‘WordPress’ in File Station and click on properties

WordPress Folder properties
WordPress Folder properties

We notice the owner is a new user called ‘WordPress’. Unfortunately, it is not so simple, and we could add our account and give us write permission. The permissions you see here are only for the application ‘File Station’. In addition, when you go to the Control Panel, Users & Group, you will not see a new user called ‘WordPress’

We have to ssh now to the Synology NAS and look under the hood. I use Putty for Windows or Termius for MacOS. (see my article on how to use ssh)

Type in the below command, and the Synology NAS will list all users. We noticed, indeed a user ‘WordPress’ was created.

cat /etc/passwd

We can do the same for groups

cat /etc/group

Interesting a group ‘WordPress’ was set up too.

Next, we navigate to the WordPress folder and have a look at which user and group is the owner of the folder ‘WordPress’

cd /volume1/web_packages

Please note: WordPress is installed in my case on volume1. This might be different in your case.

WordPress permissions under hood

The owner of the main folder ‘WordPress’ and each subfolder and file is the user ‘WordPress,” and the group is ‘HTTP’. Looking at the permission, we noticed that all others have only ‘read’ permissions.

This is the answer to why we cannot edit the WordPress files.

I refer you to my articles about Users & Groups, and file permissions.


Please make sure to obtain sudo rights. sudo – s with your admin account

How can I edit files in WordPress on Synology NAS?

The easiest way is to

  • make your login username a member of the group ‘http’

The command below adds the user ‘Admin’ to the http group

synogroup –add http Admin

The next step is to edit the file ‘syno-wp-config-custom.php’ with the vi editor

vi syno-wp-config-custom.php

We need to amend ‘false’ to ‘true’ and also delete the line highlighted in yellow.

WordPress on Synology vi editor

Press the letter i to change to insert mode to make the changes. When you are finished, press the ESC key followed by:wq. That’s the command to save the changes and exit the vi editor.

Go back to your WordPress dashboard, and now it should change. Automatic updates are enabled and scheduled.

WordPress Updates

WordPress on Synology will update to the latest version automatically.


A word of caution, don’t update the WordPress package in Synology later in case there is a new one. If you do, it will overwrite the settings you just changed and revert it!

Bottom line

In this article, I have walked you through installing WordPress on Synology. I also showed you how to install phpmyadmin as an additional package. Finally, I weighed the pros and cons of doing so. Following my instructions, you should now be able to install WordPress on Synology and modify it to get the latest WordPress version automatically.

Thanks for reading! Questions or comments? Let me know in the comments below or email me at info@edywerder.ch

Before you go …

After delving into setting up WordPress on Synology, you might find it helpful to explore advanced customization options. Check out Elementor Pro, where you’ll discover how to elevate your WordPress site’s design and functionality. It’s a significant next step for tech enthusiasts eager to enhance their website’s aesthetics and user experience.

Full Disclosure

Any purchases made from clicks on links to products on this page may result in an affiliate commission for me. 

Please keep in mind that the quantity or price of items can change at any time.

As an Amazon  Associate, I earn from qualifying purchases.

Als Amazon-Partner verdiene ich an qualifizierten Verkäufen

Tech Expert & Blogger


4 Comments

  1. Guys, there is a much, much easier way to edit the php file.

    Go to your DSM, open File Station and navigate to the folder (usually it’s in “web_packages\wordpress\syno-wp-config-custom.php”)

    Click ‘Action’ -> ‘Download’
    * on Windows: open Notepad –> open the downloaded php-file
    * on Mac: open TextEdit –> open the downloaded php-file

    Make the necessary changes in the file, follow the guide from Edy on what you need to change.
    Save the file.

    Back to DSM-environment: rename “syno-wp-config-custom.php” to, for example, “syno-wp-config-custom backup.php”
    Click on ‘Upload’ –> ‘Upload – Skip’
    Select the file, and upload.

    DONE!

  2. How do I get a redirect to happen automatically so that when someone goes to my domain (of course after I get this all working), say http://www.xyz.com that they don’t get the Synology generic default text:
    “Your website is not set up yet. Web Station has been enabled. To learn more about hosting a website, refer to the “Web Station” section of DSM Help.”
    and instead have the WordPress site load up. I don’t want users to be redirected to a subdirectory, ie http://www.xyz.com/wordpress (though I can’t quite figure that out either!)

    I’m trying to self host this site now that I was hosting remotely but they’re wanting to quadruple my rate per year! I would also love some insight if you have any on how to import a backup from a cPanel/WordPress site (bluehost). I have the full backup file, just not sure what to do with it! Thanks for the instructive tutorial though, I’m way farther than I would have been on my own!! 🙂

  3. Tried to add user Admin to synogroup as described. This results in -sh: /usr/syno/sbin/synogroup: Permission denied.

    1. Sorry even if you are logged in as an administrator you need to obtain sudo rights first with sudo -s. You should get a prompt to enter the password. After that you should be able to add the admin user to the group. Linux is case-sensitive admin or Admin is not the same. 🙂 – I have amended the article. Thanks for letting me know!

Leave a Reply

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

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.