This document outlines the management of WordPress sites hosted on this server.
Each WordPress site runs in a set of isolated containers:
nx_*
)wp_*
)db_*
)rd_*
)sftp_*
)All WordPress sites are managed through the Demyx container, which provides tools for managing WordPress deployments.
Demyx provides a set of commands for managing WordPress sites:
# List all sites
demyx list
# View site details
demyx info <site_id>
# Start a site
demyx start <site_id>
# Stop a site
demyx stop <site_id>
# Restart a site
demyx restart <site_id>
# Take a backup
demyx backup <site_id>
# Restore from backup
demyx restore <site_id> <backup_file>
# Access WordPress CLI for a site
demyx wp <site_id> <wp_command>
# Access database for a site
demyx db <site_id>
# Update WordPress core
demyx wp <site_id> core update
# Update all plugins
demyx wp <site_id> plugin update --all
# Update all themes
demyx wp <site_id> theme update --all
# List users
demyx wp <site_id> user list
# Create a new user
demyx wp <site_id> user create <username> <email> --role=administrator
# Reset a user password
demyx wp <site_id> user update <user_id> --user_pass=<new_password>
# Optimize database
demyx wp <site_id> db optimize
# Create a backup of a site
demyx backup <site_id>
Backups are stored in /var/lib/docker/volumes/demyx/_data/backup/wp/<site_id>/
and are included in the daily Docker backup.
# List available backups for a site
ls -la /var/lib/docker/volumes/demyx/_data/backup/wp/<site_id>/
# Restore from a specific backup
demyx restore <site_id> /var/lib/docker/volumes/demyx/_data/backup/wp/<site_id>/<backup_file>.tgz
WordPress sites use SSL certificates managed by Traefik. The certificates are automatically obtained and renewed through Let's Encrypt.
Some sites use Redis for caching to improve performance:
# Check if Redis is enabled for a site
demyx info <site_id> | grep redis
# Access Redis CLI for a site with Redis enabled
docker exec -it <site_id>-rd_* redis-cli
Check if the containers are running:
docker ps | grep <site_id>
Check Nginx logs:
docker logs <site_id>-nx_*
Check WordPress container logs:
docker logs <site_id>-wp_*
Verify Traefik is properly routing traffic:
docker logs demyx_traefik | grep <domain>
Check if MariaDB container is running:
docker ps | grep <site_id>-db
Check MariaDB logs:
docker logs <site_id>-db_*
Test database connectivity from WordPress container:
docker exec -it <site_id>-wp_* bash -c "mysqladmin ping -h <site_id>-db_* -u wordpress -pwordpress"
docker exec -it <site_id>-wp_* cat /var/log/php/error.log
docker exec -it <site_id>-wp_* chown -R www-data:www-data /var/www/html
Create a backup before updates:
demyx backup <site_id>
Update WordPress core:
demyx wp <site_id> core update
Update plugins:
demyx wp <site_id> plugin update --all
Update themes:
demyx wp <site_id> theme update --all
Verify site functionality after updates
# Create a new WordPress site
demyx run <domain> --wp --cache
# Access the site to complete setup
# Open http://<domain> in a browser
# Create a new site
demyx run <domain> --wp
# Import database
demyx db <site_id> < database_dump.sql
# Import files (using SFTP or Docker cp)
docker cp /path/to/wp-content/. <site_id>-wp_*:/var/www/html/wp-content/