How to install Wordpress with Bravada theme for local development in 8 steps.
Step 1: Install Dependencies
Step 2: Clone Sources
Put them next to each other.
Step 3: Create Cluster
Bootstrap K3s in a multi-node Docker cluster:
k3d cluster create k3s-wordpress -i rancher/k3s:latest \
--api-port 6550 --agents 2
Step 4: Update WordPress
Remove spurious themes and push to remote:
cd wordpress && \
rm -rf wp-content/themes/twenty* && \
git commit -m "perf: ⚡️ remove theme cruft" && \
git push -u gitlab default
Helm Chart requires GitLab for WordPress customizations.
Step 5: Prepare Chart
cd ../wordpress-helm && \
cp install.sh.example install.sh && chmod +x install.sh && \
cp values-local.yaml.example values-local.yaml
Edit values-local.yaml
and your own CLI image if desired:
227initImage:
228 repository: comfusion/wp-cli-docker
229 tag: 0.1.6.1
230 pullPolicy: Always
Find and edit themes_install section to add Bravada and TwentyTwentyOne themes:
45 themes_install:
46 - twentytwentyone
47 - bravada
48 theme_active: bravada
49 theme_fallback: twentytwentyone
Also configure git_repo to use GitLab repo created in Step 4.
Step 6: Deploy Chart
export KUBECONFIG=$(k3d kubeconfig write k3s-wordpress)
kubectl create namespace sandbox && \
./install.sh -n sandbox
Wait until pods are Ready up with watch kubectl get pods -n sandbox. Debug init-container with Lens…
Step 7: Connect to Lens
Write kubeconfig:
k3d kubeconfig write k3s-wordpress -o `pwd`/kubeconfig-k3d-dev
Open kubeconfig-k3d-dev in Lens:
Watch wordpress-production-0 Ansible logs for errors:
Step 8: Browse the Site
With pods Ready proxy the ClusterIP service (prefix with sudo -E if needed):
kubectl port-forward service/wordpress-production 80:8080 -n sandbox
Browse the site:
Enable Redis in values-local.yaml
. Run ./install.sh -n sandbox. Profit.