This project was created by Chris Bunting for local development purposes only.
A complete WordPress development environment running in a single Docker container with Nginx, MySQL, and WordPress pre-configured.
- Single Container: Nginx, MySQL, and WordPress all running in one container
- Auto-Configured: WordPress is automatically installed and configured
- Default Admin: Pre-configured admin account (
admin
/admin123
) - Persistent Data: WordPress files and database data persist between container restarts
- Easy Management: Simple Docker Compose setup for starting/stopping
- Docker installed on your system
- Docker Compose installed on your system
-
Build the container:
docker-compose build
-
Start the container:
docker-compose up -d
-
Access WordPress:
- Open your browser and go to
http://localhost:8080
- Login with:
- Username:
admin
- Password:
admin123
- Username:
- Open your browser and go to
-
Stop the container:
docker-compose down
wpdevserver/
├── Dockerfile # Container definition
├── docker-compose.yml # Container management
├── nginx.conf # Nginx configuration
├── supervisord.conf # Process management
├── wp-setup.sh # WordPress auto-configuration script
├── wordpress-data/ # Persistent WordPress files (created automatically)
└── README.md # This file
- 8080: WordPress web interface
- WordPress Admin:
- Username:
admin
- Password:
admin123
- Username:
- Database Name:
wordpress
- Database User:
wordpress
- Database Password:
wordpress123
- Database Host:
localhost
All WordPress data is stored in the wordpress-data
directory:
- WordPress files:
wordpress-data/
- Database is stored within the container but persists through restarts
docker-compose logs wordpress-dev
docker-compose down -v
rm -rf wordpress-data
docker-compose up -d
docker exec -it wordpress-dev-server bash
Edit docker-compose.yml
and modify the ports section:
ports:
- "8080:80" # Change 8080 to your desired port
After WordPress is running, login and change the password through the WordPress admin interface.
This setup is designed for development purposes only. It is not suitable for production use due to:
- Single container architecture (not following Docker best practices)
- Default credentials
- No SSL/HTTPS configuration
- No security hardening
For production deployments, consider using separate containers for each service.
This project was created with care by Chris Bunting for local WordPress development.
For questions or contributions, please visit the GitHub repository.