Site icon The Perpetual Student

Local WordPress Development

Docker Containers

About

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

Requirements

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.

Exit mobile version