Wordpress docker dev environment (compatible with M1, arm64v8/mysql). Includes XDebug and wp-cli.
- Key-gen in
/wp-server/keys
(for purposes of these docs, all paths are project-relative) cp .env-template .env
- Put your plugin in
/my-plugin
- If you'd like to rename this folder, edit
.env
- If you'd like to auto-enable your plugin, check your plugin name and namespace in
./docker-compose.yml:46
- If you'd like to rename this folder, edit
docker-compose up
- Add any post-install steps in
./docker-compose.yml
> wordpress-cli > command
Do this while you have containers running.
- Check your IDE global PHP Settings in Settings > PHP > Debug
- Add a PHP server with Docker & set this as the project interpreter.
Note: path mappings for wp internal files will be unavailable with this setup.
docker-compose run wordpress-cli bash
Permissions with mounted dir and wp-cli?
RUN chown 33:33 /var/www/html/wp-content/plugins/plugin
When in doubt, Docker > Troubleshooting > destroy all data .
- Download & verify xdebug instead of including in
/lib
- re-add composer
- move post-install stuff to a separate file mounted/copied to the wp cli image
- secret management/env files
- Auto-gen ssh script
- wp internal path mapping via docker mounted drive?