A Docker Compose file to get you started using WordPress via Docker
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A basic Docker Compose file to launch a container for WordPress and a second for MySQL.

  • Launch this with 'docker-compose up'
  • Then connect to http://localhost:8080/ to go through the WordPress installation process.


  • YOU SHOULD CHANGE THE PASSWORDS in the file (but make sure WORDPRESS_DB_PASSWORD and MYSQL_PASSWORD are the same).
  • You may need to change the port number 8080 if you have some other service running on that port.
  • A "wp-content" directory will be created in your current directory which will hold themes, plugins and other content you add to your WordPress installation.


Credit to @wglambert on Github: https://github.com/docker-library/wordpress/issues/346#issuecomment-435975469

I originally posted a request for a step-by-step tutorial about how to use the 'wordpress' Docker image. wglambert was kind enough to come back with a simple and easy-to-use Docker Compose YAML file.