Dark Light

Rather than installing WordPress using the Synology Package Center, this post will show you how to install WordPress from the installation file downloaded from WordPress.org. The advantage of doing so is that individuals have total control over the version of WordPress utilized, both at the start and during the life of the website.

The Violins by MusicAura

Preparation

  1. Go to https://wordpress.org/download/ to get the latest version of the WordPress.
  2. Sign in to DSM using an administrator user account, then navigate to Package Center.
  3. Install PHP 7.4.
  4. install Web Station.
  5. Install Apache HTTP Server 2.4.
  6. Install MariaDB 10 and configure it with a complex password.
  7. Install phpMyAdmin.
  8. Install Text Editor.
  9. Install an SSL certificate on the NAS.
  10. Create a new A or CNAME record on DNS server and point it to the IP address of the NAS.

Despite the fact that WordPress may operate on NGINX, Apache HTTP Server 2.4 can resolve the WordPress permalink issue.


Upload the WordPress Installation File to the NAS

  1. Go to File Station > web and erase all existing files in the /web directory.
  2. Make a new folder under /web and call it something other than “wordpress,” such as “wpfox.” The term “wordpress” refers to the Synology WordPress package.
  3. Transfer the WordPress installation file to /web/wpfox.
  4. With Text Editor, add the following lines at the end of the wp-config-sample.php file:
//** The next line allows direct downloads. */
define('FS_METHOD', 'direct');

Setup Web Station

  1. To create a new profile, navigate to Web Station > Script Language Settings > PHP and click the Create button.
  2. Fill in the blanks with “wordpress” for both the Profile name and the Description. Then choose the “Enable PHP cache” option.
  3. Navigate to Extensions and enable the following options:
    • curl
    • exif
    • ftp
    • gd
    • iconv
    • imagick
    • intl
    • mysqli
    • openssl
    • zip
  4. Modify the following values in Core:
    • max_execution_time=120
    • max_input_vars=3000
    • post_max_size=64M
    • upload_max_filesize=64M

Create a WordPress Database

  1. Open phpMyAdmin and connect in to the MariaDB 10 database using the username root and the password you created during the MariaDB 10 installation.
  2. Select New from the left-hand menu, and then select the User Accounts tab.
  3. Click Add User Account, then enter the following information:
    • User name: wpfox
    • Host name: select Local from the drop down list
    • Password: (fill with a complex password)
    • Check the box next to “Create database with same name and grant all privileges.”
  4. Click Go to build the database for WordPress.

Create Virtual Hosts for none-www and www Domains

  1. Open Web Station > Web Service Portal, then click Create. Select Virtual Host and fill in the values:
    • Portal type: Name-based
    • Hostname: pikabay.com
    • Port: 80/443
    • HTTPS Settings: HSTS
  2. Next, pick the following options:
    • Document root: web/wpfox
    • HTTP back-end server: Apache HTTP Server 2.4
    • Script Language Settings: PHP > wordpress (PHP 7.4)
  3. To finish, click Next.
  4. Repeat the preceding steps to set up another Virtual Host for www.pikabay.com.

Set the Proper Web Folder Permissions

  1. Navigate to File Station, right-click on web folder, and then select Properties > Permission.
  2. Click Edit after selecting the http user account. The symbol for a http user account differs from that of a http group account.
  3. Select SYSTEM from the User or Group drop down menu, then click Done.
SYSTEM > Read
administrators > Read & Write
http > Read

Do not check the “Apply to this folder, sub-folders, and files” box.

Set the Proper WordPress Folder Permissions

  1. Right-click on /web/wpfox and choose Properties > Permission.
  2. Select Make inherited permissions explicit from the Advanced options menu.
  3. Select the SYSTEM user and then Edit. Allow the SYSTEM user to write but not delete.
SYSTEM > Custom
administrators > Read & Write
http > Read

The “Apply to this folder, sub-folders, and files” box must be checked.

Set Up WordPress

  1. Navigate to www.pikabay.com and choose “Let’s go!”
  2. Fill out the database information:
    • Database Name: wpfox
    • Username: wpfox
    • Password: (Created in Step 3)
    • Database Host: localhost
    • Table Prefix: wp_
  3. Submit the form and run the installation.
  4. Fill out the basic website information and generate a login credential.
  5. Log in to WordPress and look for the latest update.

Uninstall phpMyAdmin

For security reasons, phpMyAdmin should be removed.

Simply navigate to the Package Center, locate phpMyAdmin, and uninstall. Enter the password you set up for MariaDB 10 in the pop-up window. Don’t worry, the database will not be erased.


Related Posts