About
The purpose of this guide is to help you create a local WordPress development server on your laptop using Docker.
Requirements
- 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.