This guide provides instructions for setting up a local WordPress development environment using Docker. It includes a MariaDB database, phpMyAdmin for database management, and WordPress. The setup uses Docker Compose for easy configuration and management.
- Docker Desktop (version 4.26.1 recommended for compatibility)
- Docker Compose
First, clone the repository containing the Docker Compose configuration:
git clone <repository-url>
cd <repository-directory>
Create a .env
file in the root directory of your project with the following properties. Replace <something>
with your actual values:
MYSQL_DATABASE=<something>
MYSQL_USER=<something>
MYSQL_PASSWORD=<something>
MYSQL_ROOT_PASSWORD=<something>
Run the following command to start the services:
docker-compose up -d
- WordPress: Open your browser and go to http://localhost:8080
- phpMyAdmin: Open your browser and go to http://localhost:8081
To stop the services, run:
docker-compose down
For a video walkthrough of this setup, you can refer to the following video: YouTube Video.
If you encounter issues, ensure you are using Docker Desktop version 4.26.1 as newer versions might have compatibility issues. Refer to the provided video for additional troubleshooting tips.
This guide should help you set up a local WordPress development environment using Docker. If you have any questions or need further assistance, please refer to the resources provided or seek help from the Docker and WordPress communities.