Running WordPress Docker on Synology – Part 2

Before we create wordpress container, same as before, we need to create some folder by File Station for storing data.

docker/web-wordpress/apache2-ssl
docker/web-wordpress/php-conf
docker/web-wordpress/wp-content

Also, to enhance security, goto
https://api.wordpress.org/secret-key/1.1/salt/
to generate some keys first (** these keys are unique)

Similar as Part 1, we repeat the step to download and create a wordpress container. And the setting as follow

Create WordPress docker

Click “Advanced Setting”

Add following Environment Variable with value

WORDPRESS_DB_USER

WORDPRESS_DB_PASSWORD

WORDPRESS_DB_NAME

And input the value got from https://api.wordpress.org/secret-key/1.1/salt/

WORDPRESS_AUTH_KEY

WORDPRESS_SECURE_AUTH_KEY

WORDPRESS_LOGGED_IN_KEY

WORDPRESS_NONCE_KEY

WORDPRESS_AUTH_SALT

WORDPRESS_SECURE_AUTH_SALT

WORDPRESS_LOGGED_IN_SALT

WORDPRESS_NONCE_SALT

WORDPRESS_CONFIG_EXTRA define(‘FS_METHOD’, ‘direct’);

REF: https://hub.docker.com/_/wordpress/

After the docker started, execute /bin/bash to grant permission on wp-content directory by following command:

cd /var/www/html

chmod -R 777 wp-content

chwon -R www-data www-data wp-content

As here, it should finish the wordpress docker configuration (** we will add more config for this docker later for enable https )