Features:
- Volume for the theme to get instant updates while editing
- Volume for the DB for persistant storage
- Composer for installing plugins
- Copy the .env.example to the
/config/local
- Replace the salt vales in the
/wordpress/wp-config.php
- Add required free plugins to the
/wordpress/composer.json
from WPackagist - Add bought/unavailable plugins to the
/wordpress/wp-content/plugins
folder and if the repo is private add them to the.gitignore
as an exception like so:
!/wordpress/wp-content/plugins/plugin-folder-name
- Replace the theme in the
/wordpress/wp-content/themes/your-theme
with your theme, and update the rules in the.gitignore
so the theme is in your repo but the theme vendor folder is not - Run
docker compose up
in the root of the project, first time will require a build of the containers so it will take a bit longer - (Optional) If you need to load in a DB, after the containers are both running you can conntect to localhost:3306 with the credentials in the
/config/local/.env
- Start docker on your local machine
- Run
docker compose up
in the root of the project - Wordpress should be up and running on
localhost:80
- Hit
ctrl/cmnd + c
on the running containers to kill them - To clean them up run
docker compose down
, this will remove the containers