[Docker] WordPress on Synology NAS via Docker (Manual Installation)
![[Docker] WordPress on Synology NAS via Docker (Manual Installation)](/content/images/size/w1200/2025/09/wordpress.png)
The method I’m sharing here is the quickest and easiest way to set up a WordPress blog. It works fine for basic use, but you might run into some limits if you want to add more features or fine-tune performance later on.
So if you’re planning to run your blog more seriously, I recommend checking out this step-by-step advanced guide I recently put together:
👉[Docker] WordPress with PHP-FPM + Nginx, Redis (phpredis), and phpMyAdmin on Synology Docker
Installing WordPress on Synology NAS via Docker (Manual Installation)
Instead of installing WordPress through the Synology package center, you can set it up manually using Docker Compose.
Before uploading, create appropriate folders for WordPress and MariaDB, then adjust the file paths in the compose file to mount them correctly.
services:
# ── MariaDB database for WordPress ─────────────────────
db:
image: mariadb:11.4
container_name: mariadb
environment:
MARIADB_ROOT_PASSWORD: "YOURPASSWORD" # ⚠️ Change to strong password
MARIADB_DATABASE: "wordpress"
MARIADB_USER: "wordpress"
MARIADB_PASSWORD: "YOURPASSWORD" # ⚠️ Same as above
volumes:
- /volume1/docker/wordpress/mariadb:/var/lib/mysql # <<< EDIT: DB data folder
restart: unless-stopped
networks:
- wp-net
# ── WordPress application ──────────────────────────────
wp:
image: wordpress:latest
container_name: wordpress
depends_on:
- db
ports:
- "8098:80" # Access via http://NAS-IP:8098
environment:
WORDPRESS_DB_HOST: "db:3306"
WORDPRESS_DB_NAME: "wordpress"
WORDPRESS_DB_USER: "wordpress"
WORDPRESS_DB_PASSWORD: "YOURPASSWORD" # ⚠️ Must match DB password
volumes:
- /volume1/docker/wordpress/html:/var/www/html # <<< EDIT: WP files folder
restart: unless-stopped
networks:
- wp-net
networks:
wp-net:
driver: bridge
After deployment, create a proper subdomain and configure a reverse proxy pointing to localhost:8098.
⚠️ Note: If you access WordPress immediately after starting the containers, you may see a DB error. Wait about 3–5 minutes and refresh.
Improvements Needed
1. Image Upload & Editing Issues
Uploading and editing images may fail due to PHP limitations. To address this, modify your wp-config.php
:
// wp-config.php
define('WP_IMAGE_EDITORS', array('WP_Image_Editor_GD','WP_Image_Editor_Imagick'));
define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');
Add these at the bottom of your wp-config.php
file.)
This helps, but some themes may still throw errors when loading presets.
2. Increase PHP Limits
Create a custom.ini file and mount it into the container to increase PHP limits:
max_execution_time = 300max_input_time = 300memory_limit = 512Mupload_max_filesize = 64Mpost_max_size = 64M
Mount the file into the container:
/usr/local/etc/php/conf.d/custom.ini
Then restart the container. This resolves most upload and preset loading issues.
✅ With this setup, you’ll have a stable WordPress instance running on Synology NAS with Docker, fully customizable and easier to maintain than the default package installation.