upskill-event-manager/docs/deployment.md

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:

  1. The Events Calendar (6.10.2 or higher)
  2. The Events Calendar Pro (7.4.2 or higher)
  3. Event Tickets (5.19.3 or higher)
  4. Event Tickets Plus (6.2.0 or higher)
  5. The Events Calendar: Community Events (latest version)
  6. Spectra Pro (2.0.0 or higher)
  7. Premium Starter Templates (4.4.14 or higher)
  8. 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

  1. Pre-deployment Checks

    • Verify dependencies
    • Run tests
    • Check file permissions
  2. Deployment Steps

    • Package plugin files
    • Transfer to target environment
    • Update WordPress configuration
    • Clear caches
  3. 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

Production Environment

Requirements

  • SSH access to production server
  • WordPress admin credentials
  • Appropriate file permissions

Deployment Steps

  1. Configure SSH access
  2. Update production configuration
  3. Run deployment script
  4. Verify deployment

Troubleshooting

Common Issues

  1. Permission Errors

    # Fix permissions
    ./wordpress-dev/manage-env.sh fix-permissions
    
  2. Cache Issues

    # Clear WordPress cache
    wp cache flush
    
  3. Plugin Activation Issues

    # Check plugin status
    wp plugin list
    

Rollback Procedure

If deployment fails:

  1. Restore from backup
  2. Revert plugin files
  3. Clear caches
  4. Verify functionality

Maintenance

Regular Tasks

  1. Update dependencies
  2. Run tests
  3. Monitor error logs
  4. Backup data

Backup Management

# Create backup
./wordpress-dev/manage-env.sh backup

# Restore from backup
./wordpress-dev/manage-env.sh restore

Security Considerations

  1. Configuration Security

    • Use environment variables
    • Secure sensitive data
    • Restrict file permissions
  2. Access Control

    • Limit SSH access
    • Use strong passwords
    • Enable two-factor authentication
  3. Monitoring

    • Check error logs
    • Monitor file changes
    • Track plugin activity