WordPress Package Mounts – wpcamp-hub
0 Stars
View on GitHub
Purpose
Section titled “Purpose”WordPress development environments should live in dev/wordpress-* folders, but plugin and theme source code lives in packages. DDEV mounts selected package folders into WordPress so the local site can run them without copying files or committing generated WordPress content.
Mount File
Section titled “Mount File”Map WordPress plugin and theme packages with dev/wordpress-<name>/.ddev/docker-compose.mounts.yaml.
services: web: volumes: - type: bind source: ${DDEV_APPROOT}/../../packages/<plugin-package> target: /var/www/html/wp-content/plugins/<wordpress-plugin-folder> - type: bind source: ${DDEV_APPROOT}/../../packages/<theme-package> target: /var/www/html/wp-content/themes/<wordpress-theme-folder>DDEV_APPROOT points to the active dev/wordpress-<name> folder on the host. The ../../packages/... part walks from that WordPress environment back to the repository root and then into packages.