Synology produces some pretty powerful network storage devices. These are basically tiny computers optimized to store/serve data and able to run programs to stream music, videos, photos, websites, and more. By default, WordPress will run relatively slow on a Synology since it is configured to minimize disk, CPU, and memory utilization. By simply making a few changes, you can make WordPress on your Synology run faster than average website without compromising its ability to run other functions.

Enable PHP Caching

By default, the Synology is configured to enable PHP caching. Ensure â€œEnable PHP cacheâ€ is still checked under Control Panel | Web Services | PHP Settings.

Tuning Configurations

Tuning the following configurations will give you the largest performance gain of any of the other recommendations listed in this article. It is also the most dangerous as you can easily cause an over consumption of resources slowing down parts of all of your Synology or worse yet can break WordPress or your entire Synology. Before proceeding, ensure you have everything backed up OFF your Synology in case you need to perform a full Synology restore. Now that we have that gloom and doom over with, on with the tuningâ€¦ To perform any of the changes below, you will first need to enable Telnet by checking â€œEnable Telnet serviceâ€ under Control Panel | Terminal & SNMP | Terminal.

Note: Enabling telnet allows remote command line access to your Synology. You should only enable it when needed and if your network is adequately secured.

OPCache

OPCode is caching mechanism preinstalled on Synology to cache running PHP code into memory and to recall the code from memory instead of from disk. To configure the OPCode engine to consume more resources and thus speed up WordPress:

Telnet to your Synology with the root account

Edit and save /etc/php/conf.d/opcache.ini with your desired changes

Restart Apache by running /usr/syno/etc/rc.d/S97apache-sys.sh restart

Below are some of the change I have implemented with positive results:

1

2

[opcache]

opcache.memory_consumption=512

PHP Configuration

PHP is the language WordPress is written in. Synology has the PHP engine preinstalled and preconfigured to consume minimal resources such as memory and CPU. To configure the PHP engine to consume more resources and thus speed up WordPress:

Telnet to your Synology with the root account

Edit and save /etc/php/php.ini with your desired changes

Restart Apache by running /usr/syno/etc/rc.d/S97apache-sys.sh restart

Below are some of the change I have implemented with positive results:

1

2

memory_limit=512M

max_execution_time=2000

Apache Configuration

Apache is the web server preinstalled on the Synology for all web applications (like WordPress). The Apache configuration is preconfigured to consume minimal resources such as memory and CPU. To configure Apache to consume more resources and thus speed up WordPress:

Below are some of the change I have implemented with positive results:

1

2

3

4

5

6

7

8

9

10

<IfModule mpm_worker_module>

ServerLimit40

StartServers4

MaxClients960

MinSpareThreads8

MaxSpareThreads64

ThreadsPerChild64

MaxRequestsPerChild5000

Include conf/extra/httpd–mpm.conf–max–connection

</IfModule>

MariaDB Configuration

MariaDB is the database server you can install to run with Wordpress. The MariaDB configuration is preconfigured to consume minimal resources such as memory and CPU. To configure MariaDB to consume more resources and thus speed up WordPress:

Telnet to your Synology with the root account

Edit and save /volume1/@appstore/MariaDB/etc/mysql/my.cnf with your desired changes (note: you may have to change â€œvolume1â€³ to the location where you installed MariaDB).

Restart MariaDB by running /usr/share/mysql/mysql.server restart

Below are some of the change I have implemented with positive results:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

[myisamchk]

key_buffer_size=64M

sort_buffer_size=64M

[mysqld]

innodb_buffer_pool_size=500M

innodb_additional_mem_pool_size=64M

key_buffer =256M

query_cache_limit =16M

query_cache_size =48M

key_buffer_size=256M

max_allowed_packet=2M

table_open_cache=128

sort_buffer_size=512K

read_buffer_size=512K

read_rnd_buffer_size=512K

WordPress Tuning

WordPress by default is also not optimized for speed but thankfully there are some great plugins and changes your can make to make your site scream.

Enable Site Caching

Basically this plugin caches all the dynamic content on your website while also shrinking down code where possible. The performance gained because of this plugin is like night and day. If you are skittish about implementing any of the suggestions within this article, this is the one NOT to skip.

There are tons of settings and tons of articles already on the web on how to optimally configure this plugin. Here are some quick tips:

Conclusion

While the changes above bring huge performance gains, I still have 2 things that quirk me from being completely satisfied. First, I donâ€™t really know which parts of the configuration changes are truly essential, which are not required, and if they are fine tuned to bring optimal performance. Second, I donâ€™t see my Synology utilizing noticeable memory despite calling for more memory consumptions in the configuration files. This causes me to question the value they bring.

But with that aside, I know WordPress on my Synology now runs substantially faster having implemented the changes above. And in fact, any web application on your Synology should run faster as well (ex. the DSM console). Let me know if they work well for you too by liking or sharing this page on Facebook. Feel free as well to send me any performance enhancing tips to make WordPress on Synology run even faster.