- Update activeContext.md with current focus and status - Add development environment decisions to decisionLog.md - Update progress.md with completed tasks - Add development patterns to systemPatterns.md - Update productContext.md with environment details - Add Development Environment Setup section to implementation plan" |
||
|---|---|---|
| .. | ||
| bin | ||
| php.ini | ||
| playwright-report | ||
| tests | ||
| dev-env.conf | ||
| dev_env_proposal.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| php-fpm.conf | ||
| README.md | ||
| testing.md | ||
| tsconfig.json | ||
WordPress Development Environment
Status: Active/Authoritative Last Updated: March 12, 2025 Scope: Development environment setup and configuration
This is a Docker-based development environment for WordPress that replicates the production environment on Cloudways. It includes WordPress with PHP 8.1, MariaDB, and phpMyAdmin.
Prerequisites
- Docker and Docker Compose
- Git
- Node.js and npm (for E2E tests)
- mkcert (for SSL support, installed automatically if needed)
Environment Setup
1. Configuration
The .env file contains:
- Production server details
- Database credentials
- WordPress authentication
- SSL configuration
- Development settings
2. Development Environment
# Start environment
./bin/setup-dev.sh
# Verify setup
./bin/verify-dev.sh
This creates:
- WordPress (PHP 8.1-FPM)
- MariaDB
- phpMyAdmin
- Nginx (with SSL support)
3. Plugin Setup
Required plugins are automatically synced from production:
- The Events Calendar Suite (6.10.2+)
- Event Tickets Suite (5.19.3+)
- Additional required plugins
Access Points
- WordPress Site:
- HTTP: http://localhost:8080
- HTTPS: https://localhost:8443 (when SSL enabled)
- phpMyAdmin: http://localhost:8081
- Server: db
- Username: from .env (DEV_DB_USER)
- Password: from .env (DEV_DB_PASSWORD)
Development Tools
Environment Management
# Setup development environment
./bin/setup-dev.sh
# Sync with production
./bin/sync-production.sh
# Verify environment
./bin/verify-dev.sh
# Setup SSL (if needed)
./bin/setup-ssl.sh
Testing
# Run all tests
./bin/run-tests.sh
# Run specific test suites
./bin/run-tests.sh --unit
./bin/run-tests.sh --integration
./bin/run-tests.sh --e2e
Database Operations
# Backup development database
./bin/backup-dev-db.sh
# Import production database
./bin/import-prod-db.sh
# Reset development database
./bin/reset-dev-db.sh
Troubleshooting
Common Issues
-
Environment Issues
# Check container status docker-compose ps # View container logs docker-compose logs -
Database Issues
# Reset database ./bin/reset-dev-db.sh # Verify database connection ./bin/verify-dev.sh -
Plugin Issues
# Resync plugins from production ./bin/sync-production.sh --plugins-only # Verify plugin status ./bin/verify-dev.sh --plugins
Debug Mode
# Enable WordPress debug mode
./bin/setup-dev.sh --debug
# View debug logs
tail -f wp-content/debug.log
Security Notes
- Never commit
.envto version control - Use WordPress Application Passwords for API access
- Keep production credentials secure
- Regularly rotate passwords and tokens
- Keep SSL certificates secure
Support
For issues:
- Check debug logs
- Review container logs
- Verify environment configuration
- Contact development team:
- Email: support@tealmaker.com
- Slack: #network-events-support
Last Updated: March 25, 2025