This is a quick example of running WordPress in CodeSandbox.
- Create a folder for the theme you want to work on (for example
myTheme) - Modify
docker-compose.ymlto add a mounted volume for the theme:
- ./myTheme:/var/www/html/wp-content/themes/myTheme
- Restart the
Start WordPresstask. - Visit the preview (port 8080) to finish installation.
If necessary, additional volumes can be mounted for other themes, plugins, and uploaded content.
Whenever docker-compose.yml changes, restart the Start WordPress task.