An easy way to set up a Wordpress install to do theme or plugin development.
- Start the containers
docker-compose up -d
- Install Wordpress http://localhost:8000
- Log into PHPMyAdmin http://localhost:8080
- use the credentials from
.env
(MYSQL_USER
andMYSQL_PASSWORD
)
If you'd like to customize the username/password for mysql, set the environment variables.
MYSQL_ROOT_PASSWORD=<value> MYSQL_DATABASE=<value> MYSQL_USER=<value> MYSQL_PASSWORD=<value> docker-compose up -d
The wp-content/
directory gets mounted to the directory this runs in. It will allow you to copy plugins or themes into it from your file system easily.
docker-compose down
will turn off the containers, but the volumes will persist. If you want to start fresh and delete the database, run docker-compose down --volumes
and it will delete the volumes.