CWP Migration Management
Migrate accounts and data from cPanel, other CWP servers, or alternative control panels to CWP. Handle full server migrations, single account transfers, and data import procedures.
Migration Paths
| Source |
Destination |
Method |
| cPanel (full server) |
CWP |
Automated scripts |
| cPanel (single account) |
CWP |
Admin panel import |
| CWP |
CWP |
Built-in migration tool |
| Webuzo |
CWP |
Manual process |
| Other panels |
CWP |
Manual export/import |
cPanel to CWP (Full Server Migration)
Full server migration requires running a series of scripts in order on a fresh CWP installation.
Prerequisites
- Fresh CWP installation on target server
- cPanel data exported from source server
- Sufficient disk space for migration
- Root SSH access to both servers
Migration Steps
# Step 1: Export cPanel data from source server
# Copy the migration scripts to the cPanel server first
sh 1-cpanel-data-export.sh
# Step 2: Uninstall cPanel from source server
# Only if reusing the same server
sh 2-cpanel-uninstall.sh
# Step 3: Install CWP on target server
cd /usr/local/src
wget http://centos-webpanel.com/cwp-el8-latest && sh cwp-el8-latest
# Step 4: Import data into CWP
sh 4-import-into-cwp.sh
# Step 5: Generate mail SNI certificates
sh 5-mail-sni.sh
Migration Scripts
| Script |
Purpose |
1-cpanel-data-export.sh |
Export all cPanel accounts, databases, emails |
2-cpanel-uninstall.sh |
Remove cPanel (same-server migration) |
4-import-into-cwp.sh |
Import all data into CWP |
5-mail-sni.sh |
Generate mail SSL certificates |
cPanel to CWP (Single Account)
Via CWP Admin Panel
- Navigate to User Account -> cPanel Migration
- Enter cPanel server details:
- Server IP or hostname
- cPanel username
- cPanel password
- Click Migrate
What Gets Migrated
| Data |
Status |
| Website files |
Migrated |
| Databases |
Migrated |
| Email accounts |
Migrated |
| DNS zones |
Migrated |
| Cron jobs |
Migrated |
| FTP accounts |
Migrated |
| SSL certificates |
May need reissuing |
CWP to CWP Migration
Via CWP Admin Panel
- Navigate to User Accounts -> CWP->CWP Migration
- Enter source CWP server details:
- Server IP
- Root SSH credentials
- Select accounts to migrate
- Click Migrate
Manual CWP to CWP
# On source server: create backup (script name varies by CWP version)
if [ -f /scripts/user_backup ]; then
sh /scripts/user_backup USERNAME
elif [ -f /scripts/backup_user ]; then
sh /scripts/backup_user USERNAME
fi
# Find backup file (check both directory structures)
BACKUP_FILE=""
if [ -f "/backup/daily/USERNAME/backup.tar.gz" ]; then
BACKUP_FILE="/backup/daily/USERNAME/backup.tar.gz"
elif [ -f "/backup/USERNAME/backup.tar.gz" ]; then
BACKUP_FILE="/backup/USERNAME/backup.tar.gz"
else
BACKUP_FILE=$(find /backup -name "*USERNAME*.tar.gz" -type f -printf '%T@ %p\n' 2>/dev/null | sort -n | tail -1 | cut -d' ' -f2-)
fi
# Transfer backup to destination
scp "$BACKUP_FILE" root@DEST_IP:/backup/
# On destination: restore
# CWP Admin -> Backup -> Restore
Webuzo to CWP
Webuzo migration requires manual process:
# Step 1: Export from Webuzo
# Download website files and database dumps
# Step 2: Create account on CWP
# Via CWP Admin or API
# Step 3: Upload website files
rsync -avz /source/public_html/ /home/USER/public_html/
# Step 4: Create database on CWP
# Via phpMyAdmin or MySQL CLI
# Step 5: Import database
mysql -u username -p dbname < database_dump.sql
# Step 6: Fix permissions
/scripts/cwp_api account fix_perms USERNAME
# Step 7: Configure DNS
# Update DNS records to point to new server
Migration Checklist
Pre-Migration
During Migration
Post-Migration
DNS During Migration
Lower TTL Before Migration
# Reduce TTL to 300 (5 minutes) 24-48 hours before migration
# This ensures faster DNS propagation
Update DNS After Migration
# Update A records to new server IP
# Update MX records if mail server changed
# Update nameservers if changing DNS provider
Email Migration Considerations
- Email stored in
/var/vmail/DOMAIN/USER/
- Verify DKIM, SPF, and DMARC records after migration
- Test email delivery in both directions
- Check spam filtering is working
Database Migration
Large Database Import
# Increase MariaDB limits for large imports
mysql -e "SET GLOBAL max_allowed_packet=256*1024*1024;"
mysql -e "SET GLOBAL wait_timeout=86400;"
# Import
mysql -u root -p dbname < large_dump.sql
Verify Database Integrity
# Check tables
mysqlcheck -u root -p dbname
# Repair if needed
mysqlcheck -u root -p --repair dbname
Troubleshooting
| Issue |
Solution |
| Migration script fails |
Check SSH connectivity and credentials |
| Databases not importing |
Increase max_allowed_packet |
| Email not working after migration |
Verify Postfix/Dovecot running, check DNS |
| Websites showing errors |
Check PHP version compatibility |
| SSL certificates invalid |
Reissue via AutoSSL or ACME |
| DNS not propagating |
Wait for TTL, verify records |
| Permission denied errors |
Run /scripts/cwp_api account fix_perms USERNAME |
| Disk space insufficient |
Clean up before migration, expand storage |
Diagnostic Commands
# Check disk space
df -h
# Verify user accounts
/scripts/list_users
# Check databases
/scripts/checkdb
# Test website
curl -I http://domain.com
# Check DNS
dig domain.com @localhost
# Verify email
telnet localhost 25
# Check services
systemctl status httpd nginx mariadb postfix dovecot
Additional Resources
references/cpanel-to-cwp.md -- Detailed cPanel to CWP migration guide
references/cwp-to-cwp.md -- CWP to CWP migration procedures
references/other-panels.md -- Migration from Webuzo and other panels