A production-ready WordPress deployment template for Kubernetes, designed for use with the Displace CLI.
This template provides everything you need to deploy WordPress to Kubernetes with enterprise-grade features:
- π WordPress - Latest Bitnami WordPress image with persistent storage
- ποΈ MariaDB - Database backend with persistent storage
- βΈοΈ Kubernetes Manifests - Production-ready deployment without Helm complexity
- π Automatic HTTPS - SSL certificates via cert-manager and Let's Encrypt
- π οΈ Cross-platform Tooling - Makefile that works on Linux, macOS, and Windows
- π Built-in Monitoring - Health checks, resource limits, and observability
- π Security First - Secure credential management with git-safe templates
templates/
βββ .gitignore.tmpl # Git ignore file template
βββ .credentials.tmpl # Credential file template (git-ignored)
βββ Makefile.tmpl # Cross-platform commands
βββ README.md.tmpl # Project documentation template
βββ manifests/ # Kubernetes manifests
β βββ 01-namespace.yaml.tmpl # Namespace definition
β βββ 02-database-secret.yaml.tmpl # Secret template (placeholders)
β βββ 03-mariadb.yaml.tmpl # MariaDB deployment & service
β βββ 04-wordpress.yaml.tmpl # WordPress deployment & service
β βββ 05-ingress.yaml.tmpl # Ingress configuration
βββ secrets/ # Secret overrides (git-ignored)
βββ database-secret-override.yaml.tmpl # Real credentials
# Initialize a new WordPress project
displace project init wordpress
# You'll be prompted for:
# - Project name (e.g., "my-blog")
# - Kubernetes namespace (defaults to project name)cd my-blog
# Deploy everything with one command
make deploy
# Check status
make status
# View logs
make logs# Forward local port to WordPress service
make port-forward
# Then visit http://localhost:8080
# Admin panel: http://localhost:8080/wp-adminThis template is automatically downloaded and used by the Displace CLI when initializing WordPress projects:
displace project init wordpressThe CLI will:
- Download the latest template release
- Generate secure passwords
- Process templates with project-specific values
- Create all necessary files with proper security settings
| Variable | Description | Sensitive |
|---|---|---|
ProjectName |
Project identifier | No |
Namespace |
Kubernetes namespace | No |
DBRootPassword |
MariaDB root password | Yes |
DBPassword |
WordPress database password | Yes |
WordPressPassword |
WordPress admin password | Yes |
| Variable | Default | Description |
|---|---|---|
ProjectDisplayName |
{{.ProjectName}} |
Human-readable name |
WordPressReplicas |
1 |
Number of WordPress replicas |
WordPressStorageSize |
10Gi |
WordPress PVC size |
MariaDBStorageSize |
8Gi |
MariaDB PVC size |
IngressClass |
nginx |
Ingress controller class |
CertIssuer |
letsencrypt-prod |
Cert-manager issuer |
The generated Makefile includes comprehensive commands:
| Command | Description |
|---|---|
make deploy |
Deploy WordPress to Kubernetes |
make destroy |
Remove deployment from cluster |
make status |
Check deployment status |
| Command | Description |
|---|---|
make logs |
View WordPress application logs |
make logs-db |
View MariaDB database logs |
make events |
View recent Kubernetes events |
| Command | Description |
|---|---|
make shell |
Access WordPress pod shell |
make shell-db |
Access MariaDB pod shell |
make mysql |
Connect to MySQL CLI |
make port-forward |
Forward local port to WordPress |
make open |
Open WordPress in browser |
| Command | Description |
|---|---|
make backup-db |
Backup database to local file |
make restore-db |
Restore database from backup |
make backup-content |
Backup wp-content directory |
| Command | Description |
|---|---|
make scale REPLICAS=N |
Scale WordPress replicas |
make validate |
Validate Kubernetes manifests |
make info |
Display project information |
- Automatic
.gitignoregeneration protects sensitive files - Separate credential files (
.credentials) automatically excluded from version control - Kubernetes secrets use placeholder values in main templates
- Real credentials stored in git-ignored override files
- Secure password generation with YAML-safe character sets
- Environment variable format for easy shell integration
- Clear separation between public manifests and private credentials
This template builds WordPress from source and uses the official MariaDB image:
- WordPress: Custom build from
Dockerfile(PHP {{PHPVersion}}, WordPress {{WordPressVersion}}) - MariaDB:
docker.io/library/mariadb:11.5
make status
make events# Check MariaDB is running
make logs-db
# Test connection
make mysqlkubectl get certificates -n [namespace]
kubectl logs -n cert-manager deployment/cert-managerThis template was originally inspired by the Bitnami WordPress Helm chart and has since been rewritten to use official upstream images and a build-from-source approach.
This template provides a simplified, security-focused WordPress deployment optimized for the Displace CLI workflow.
Copyright 2025 Displace Technologies
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Displace Technologies - Making Kubernetes deployment simple and reliable.