{"id":31199954,"url":"https://github.com/hnthap/wordpress-docker","last_synced_at":"2026-04-11T04:32:12.903Z","repository":{"id":311181797,"uuid":"1042455558","full_name":"hnthap/wordpress-docker","owner":"hnthap","description":"A containerized WordPress development setup using Docker Compose, featuring automated permission management and integrated database administration tools. Donate me: https://paypal.me/hnthap","archived":false,"fork":false,"pushed_at":"2025-08-22T15:19:48.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T10:48:40.542Z","etag":null,"topics":["containerization","database-management","deployment","docker","docker-compose","http-server","mariadb","permissions","php","php8","phpmyadmin","sql","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hnthap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-22T03:45:08.000Z","updated_at":"2025-08-22T15:19:51.000Z","dependencies_parsed_at":"2025-08-22T17:49:51.916Z","dependency_job_id":"dac15f2a-e27a-4f1a-b1b3-0402f92259a2","html_url":"https://github.com/hnthap/wordpress-docker","commit_stats":null,"previous_names":["hnthap/wordpress-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hnthap/wordpress-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnthap%2Fwordpress-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnthap%2Fwordpress-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnthap%2Fwordpress-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnthap%2Fwordpress-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnthap","download_url":"https://codeload.github.com/hnthap/wordpress-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnthap%2Fwordpress-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerization","database-management","deployment","docker","docker-compose","http-server","mariadb","permissions","php","php8","phpmyadmin","sql","wordpress"],"created_at":"2025-09-20T10:48:38.021Z","updated_at":"2026-04-11T04:32:12.873Z","avatar_url":"https://github.com/hnthap.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Development Environment with Docker\n\nA containerized local WordPress development setup using Docker Compose. It includes automated permission management and integrated database administration tools for easier project setup and management.\n\nBased on [@richardevcom’s tutorial](https://medium.com/@richardevcom/wordpress-development-environment-with-docker-ba52427bdd65).\n\n## 🚀 Features\n\n- **Multi-container architecture** with WordPress, MariaDB, and phpMyAdmin\n- **Automated file permission handling** for WordPress uploads and plugins\n- **Environment-based configuration** for secure credential management\n- **Database initialization** support with SQL dump integration\n- **Development-optimized** with accessible local ports and volume mounting\n\n## 🛠 Technical Stack\n\n- **WordPress**: PHP 8.2 with Apache\n- **Database**: MariaDB 12.0.2\n- **Containerization**: Docker \u0026 Docker Compose\n- **Web Server**: Apache HTTP Server\n\n### Development Tools\n- **phpMyAdmin**: Database administration interface (optional)\n\n## 📋 Prerequisites\n\n- Docker Engine 20.10+\n- Docker Compose 2.0+\n- At least 2GB available RAM\n\n## ⚡ Quick Start\n\n1. **Clone and navigate to project**\n   ```bash\n   git clone https://github.com/hnthap/wordpress-docker\n   cd wordpress-docker\n   ```\n\n2. **Configure environment variables**\n   ```bash\n   cp .env.example .env\n   # .env.example uses simple passwords suitable for development.\n   # Change passwords in .env for production.\n   ```\n\n3. **Launch the application**\n   ```bash\n   docker-compose up -d\n   ```\n\n4. **Access the services**\n   - WordPress: http://localhost:8080\n   - phpMyAdmin (optional): http://localhost:8180\n\n## 🏗 Architecture Overview\n\n```\n┌─────────────┐    ┌──────────────┐    \n│  WordPress  ├────┤    MariaDB   │    \n│   :8080     │    │  (internal)  │    \n└─────────────┘    └───────┬──────┘    \n                           │\n                   ┌───────┴──────┐\n                   │  phpMyAdmin  │\n                   │    :8180     │\n                   │  (optional)  │\n                   └──────────────┘\n```\n\n**Key Design Decisions:**\n\n- **Minimal Dependencies**: WordPress only depends on the database service it actually needs\n- **Custom Dockerfile**: Implements automated permission fixing to resolve common WordPress file access issues\n- **Volume Mounting**: Persistent data storage for both WordPress content and database\n- **Optional Tooling**: phpMyAdmin included as a development convenience, not a core dependency\n- **Environment Isolation**: Sensitive configuration separated from codebase\n\n## 📁 Project Structure\n\n```\nwordpress-docker/\n├── docker-compose.yaml # Multi-service orchestration\n├── Dockerfile          # Custom WordPress image with permission fixes\n├── .env                # Environment configuration (not in repo)\n├── .env.example        # Environment template file\n├── wp-content/         # WordPress content (themes, plugins, uploads)\n├── db_data/            # MariaDB data persistence\n├── dump.sql            # Database initialization script (currently empty)\n└── README.md           # This documentation\n```\n\n## 🔧 Configuration\n\n### Environment Variables (.env)\n\n```bash\nWORDPRESS_DB_USER=root\nWORDPRESS_DB_PASSWORD=password\n\nMYSQL_USER=root\nMYSQL_PASSWORD=password\nMYSQL_ROOT_PASSWORD=password\n```\n\n### Custom Docker Image Features\n\nThe custom Dockerfile extends the official WordPress image with:\n\n- **Permission Management**: Automatic file ownership and permission correction\n- **Startup Script**: Custom entrypoint that ensures proper WordPress file access\n- **Security Hardening**: Proper file permissions (755 for directories, 644 for files)\n\n## 🔍 Development Workflow\n\n1. **File Changes**: Edit files in `./wp-content/` - changes reflect immediately\n2. **Database Access**: Use phpMyAdmin at localhost:8180 for database management (or connect directly to MariaDB)\n3. **Logs**: Monitor with `docker-compose logs -f [service-name]`\n4. **Restart Services**: `docker-compose restart [service-name]`\n\n\u003e **Note**: phpMyAdmin is included as a development convenience but can be removed from docker-compose.yaml if not needed, as WordPress doesn't depend on it.\n\n## 🚀 Production Considerations\n\nFor production deployment, consider:\n\n- [ ] Implement health checks for all services\n- [ ] Add SSL/TLS termination\n- [ ] Configure backup strategies for database and content\n- [ ] Implement proper secrets management\n- [ ] Add monitoring and logging solutions\n- [ ] Set up reverse proxy with Nginx\n\n## 🐛 Troubleshooting\n\n### WordPress Installation Issues\n\n- Verify database connection in wp-config.php\n- Check file permissions in wp-content directory\n- Ensure all containers are running: `docker-compose ps`\n\n## 📚 Learning Resources\n\nThis project demonstrates proficiency in:\n- **Containerization**: Custom Docker image creation and composition\n- **Web Development**: PHP-based application deployment\n- **Database Management**: Relational database integration\n- **DevOps Practices**: Environment configuration and service orchestration\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b \u003cfeature-name\u003e`\n3. Commit changes: `git commit -m \"Add feature description\"`\n4. Push to branch: `git push origin \u003cfeature-name\u003e`\n5. Submit a pull request\n\n---\n\n**Built with ❤️ using Docker, WordPress, and industry-standard containerization practices**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnthap%2Fwordpress-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnthap%2Fwordpress-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnthap%2Fwordpress-docker/lists"}