Local WordPress Development

Docker Containers


The purpose of this guide is to help you create a local WordPress development server on your laptop using Docker.


  • You have Docker installed.
  • You already know how to use Docker.
  • Create a project folder that will contain all these files. This can be anywhere on your computer. Example: ~/Code/WordPress-Test

Create MySQL Docker Container

Create a new MySQL instance (if you don’t already have one) so your WordPress can use it as its database. Save the following to the root of your project folder.

Run the following:

docker-compose up -d

Before running a WordPress container, create a schema. For this example, I’ll use the schema name “wordpress-dev”.

Create WordPress Docker Container

Use the following Gist to create your Docker container.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: