Lately I've been finding myself experimenting with Wordpress. I created a docker-compose file to help me stand up a new clean setup more quickly.
It is based upon the Docker compose guide), but includes some extras, like phpMyAdmin.
Usage
- Clone the repository or copy the docker-compose file
- Start the container
docker-compose up -d
- Run through the Wordpress installer http://localhost:8000
Adding a theme or plugin
The wp-content/
directory is mounted to the local file system. It makes it easy to copy plugins, or edit the theme files from your IDE.
phpMyAdmin
You can access phpMyAdmin from http://localhost:8080 using the credentials set in the docker-compose.yml
file (MYSQL_USER
and MYSQL_PASSWORD
).
Reset the database
If you find you need to reset the data, you can delete the volumes created.
docker-compose down --volumes