3.5 KiB
3.5 KiB
Deployment Guide
This guide covers deploying the HVAC Trainer Network Events plugin to development and production environments.
Quick Start
# Deploy to development
./deploy.sh --config deploy-config.sh
# Deploy and run tests
./deploy.sh --config deploy-config.sh --run-tests
# Deploy to production
./deploy.sh --config deploy-config-production.sh
Plugin Dependencies
The HVAC Trainer Network Events plugin requires the following plugins:
- The Events Calendar (6.10.2 or higher)
- The Events Calendar Pro (7.4.2 or higher)
- Event Tickets (5.19.3 or higher)
- Event Tickets Plus (6.2.0 or higher)
- The Events Calendar: Community Events (latest version)
- Spectra Pro (2.0.0 or higher)
- Premium Starter Templates (4.4.14 or higher)
- Essential Blocks (5.3.2 or higher)
Important Notes:
- Plugin versions are managed separately from deployment
- Do not update plugins as part of deployment or testing
- Plugin updates should be tested separately in a staging environment
- Use the plugin management system of your hosting environment for updates
Configuration Files
Development Configuration
File: deploy-config.sh
REMOTE_HOST="upskill_wordpress"
REMOTE_USER="root"
WP_PATH="/var/www/html/"
PLUGIN_SLUG="network-events"
WP_CLI_PATH="wp"
PURGE_BREEZE_CACHE=false
USE_ROOT=true
Production Configuration
File: deploy-config-production.sh
- Contains production-specific settings
- Includes additional security measures
- Requires SSH key configuration
Deployment Process
-
Pre-deployment Checks
- Verify dependencies
- Run tests
- Check file permissions
-
Deployment Steps
- Package plugin files
- Transfer to target environment
- Update WordPress configuration
- Clear caches
-
Post-deployment Verification
- Check plugin activation
- Verify functionality
- Monitor error logs
Development Environment
Setup
# Start development environment
cd wordpress-dev
./manage-env.sh start
# Stop development environment
./manage-env.sh stop
# Reset development environment
./manage-env.sh reset
Access Points
- WordPress site: http://localhost:8080
- WordPress admin: http://localhost:8080/wp-admin
- phpMyAdmin: http://localhost:8081
Production Environment
Requirements
- SSH access to production server
- WordPress admin credentials
- Appropriate file permissions
Deployment Steps
- Configure SSH access
- Update production configuration
- Run deployment script
- Verify deployment
Troubleshooting
Common Issues
-
Permission Errors
# Fix permissions ./wordpress-dev/manage-env.sh fix-permissions -
Cache Issues
# Clear WordPress cache wp cache flush -
Plugin Activation Issues
# Check plugin status wp plugin list
Rollback Procedure
If deployment fails:
- Restore from backup
- Revert plugin files
- Clear caches
- Verify functionality
Maintenance
Regular Tasks
- Update dependencies
- Run tests
- Monitor error logs
- Backup data
Backup Management
# Create backup
./wordpress-dev/manage-env.sh backup
# Restore from backup
./wordpress-dev/manage-env.sh restore
Security Considerations
-
Configuration Security
- Use environment variables
- Secure sensitive data
- Restrict file permissions
-
Access Control
- Limit SSH access
- Use strong passwords
- Enable two-factor authentication
-
Monitoring
- Check error logs
- Monitor file changes
- Track plugin activity