Upgrading LeadCMS
This guide covers how to safely upgrade your LeadCMS Docker Compose installation to the latest version, including backup procedures, database migrations, and rollback strategies.
This guide is specifically for Docker Compose deployments as covered in our deployment guide. For production environments with managed services, adapt these procedures to your infrastructure.
Before You Upgrade
Check Current Version
# Or check via API
curl http://localhost:8080/api/version
Review Release Notes
Always review the release notes before upgrading:
- Check Core Releases for application changes
- Check for breaking changes
- Note any new configuration requirements
- Review plugin compatibility
Backup Your System
Always create complete backups before upgrading. Use the provided backup scripts for reliable backup and restore procedures.
We recommend using the automated backup scripts covered in detail in our Backups and Recovery guide.
Quick Backup with Scripts
# Full backup using the pg-backup.sh script
./pg-backup.sh leadcms
# This creates: leadcms-backup-YYYY-MM-DD-HH-MM.sql
# Verify backup was created successfully
ls -lh leadcms-backup-*.sql
Configuration Backup
# Backup essential configuration files
cp .env .env.backup
cp docker-compose.yml docker-compose.yml.backup
# If you have custom plugins mounted via volumes
cp -r plugins/ plugins_backup/ 2>/dev/null || echo "No custom plugins directory found"
Upgrade Process
This is the simplest method for upgrading when using the standard LeadCMS Docker images:
Stop Current Services
# Navigate to your docker-compose directory
cd /path/to/your/leadcms/docker-compose
# Stop all services
docker compose down
Update Image Version
Edit your docker-compose.yml
to use the new version:
services:
leadcms:
image: leadcms/core:v2.1.0 # Update to desired version
# ... rest of your configuration
Pull New Image
# Pull the new image
docker compose pull leadcms
Start Services
# Start services with new image
docker compose up -d
Database Migrations
LeadCMS automatically runs database migrations when the container starts. You can monitor this process:
Best Practices
Upgrade Strategy
- Test in staging before production
- Schedule maintenance windows for upgrades
- Monitor closely after upgrades
- Have rollback plan ready
- Document changes for your team
Getting Help
If you encounter issues during upgrade:
- Review GitHub issues
- Join our community discussions
- Contact professional support