PHP + WordPress + MariaDB
WordPress is the most widely used content management system in the world: corporate sites, blogs, news portals, and stores, with a huge ecosystem of themes and plugins.
This Stack installs WordPress with MariaDB as the database.
Included services
In addition to the application, the Stack brings up MariaDB, an nginx that receives traffic on port 80, an automatic backups service, and the web file manager.
Project structure
.
βββ backup
β βββ backup-runner.sh
βββ health
β βββ status.php
βββ nginx
β βββ default.conf
βββ .env.example
βββ compose.yaml
Getting started
Install the Stack and bring it up:
docker-deploy-stack --stack php/wordpress-mariadb
cd /root/stack/php/wordpress-mariadb
docker compose up -d
This is a ready-to-use application: you donβt need to upload code. Themes, plugins, extensions and files you upload from its administration panel are stored in the Stack and are included in automatic backups.
Configuration
Editable values are in the Stackβs .env file:
| Variable | Default | Purpose |
|---|---|---|
APP_PORT |
80 |
Public port of the Stack. |
APP_ENV |
development |
Application environment. |
DB_NAME |
wordpress |
Database name. |
DB_USER |
wordpress |
Database user. |
BACKUP_ENABLED |
1 |
Automatic backups: 1 enabled, 0 disabled. |
BACKUP_INTERVAL_SECONDS |
86400 |
How many seconds between backups. |
BACKUP_RETENTION_DAYS |
7 |
How many days backups are retained. |
MARIADB_VERSION |
11.4 |
Version of the corresponding image. |
WORDPRESS_VERSION |
php8.3-apache |
Version of the corresponding image. |
After changing it, apply the changes with docker compose up -d.
Useful commands
docker compose ps # view running containers
docker compose logs -f # view live logs
docker compose restart # restart services
docker compose down # stop and remove containers