This project provides a Docker-based development environment for WordPress. It allows for quick and easy setup of a WordPress instance with all necessary services. On Windows use it with WSL2.
- WordPress CMS (official image, Apache variant)
- MySQL Database
- phpMyAdmin for database management
- MailHog for email testing
- Optional plugin/theme management via Make targets (clone from Git, reset folders)
- Docker
- Docker Compose
- Make (optional, but recommended). If not installed on Debian/Ubuntu use
sudo apt-get update && sudo apt-get install make.
- Clone this repository:
git clone https://github.com/jswebschmiede/docker-wordpress-starter.git <your-project-name>
cd <your-project-name>
- Copy the
.env.examplefile to.envand adjust the values as needed:
cp .env.example .env
- Start the environment:
make up
- Open your browser and navigate to:
- WordPress Frontend: http://localhost:6969
- WordPress Backend: http://localhost:6969/wp-admin
- phpMyAdmin: http://localhost:8080
- MailHog: http://localhost:8025
make up: Starts the containersmake start: Displays information about the running environmentmake stop: Stops the containersmake down: Stops and removes the containersmake reset: Removes all containers and local datamake log: Shows the logs of the containersmake config: Shows the resolved docker compose configuration
make plugins-reset: Clearswordpress/wp-content/plugins(keepsindex.phpif present)make themes-reset: Clearswordpress/wp-content/themes(keepsindex.phpand the slugs inTHEMES_KEEP)make plugins-install: Clones or updates repositories fromPLUGINS_GIT_URLSintowp-content/pluginsmake themes-install: Clones or updates repositories fromTHEMES_GIT_URLSintowp-content/themesmake content-install: Runsplugins-installandthemes-installmake content-reset: Runsplugins-resetandthemes-reset
docker-compose.yml: Defines the Docker services.env: Contains environment variables for configurationmakefile: Contains useful commands for project managementwordpress/: Directory for WordPress files (created on first start)db/: Directory for database files (created on first start)docker/php/conf.d/uploads.ini: PHP upload limits configuration
You can customize the configuration in the .env file to change ports, versions, and other settings.
If you encounter problems, try the following steps:
- Stop the containers with
make down - Remove local data with
make reset - Restart the environment with
make up
If problems persist, check the logs with make log.
Contributions are welcome! Please create an issue or pull request for improvement suggestions.
This project is licensed under the MIT License. See the LICENSE file for details.