? Migration to ISPConfig
Pre-Migration Checklist
- ☐ Inventory all websites and domains
- ☐ List all email accounts
- ☐ Document database names and users
- ☐ Note PHP versions and settings
- ☐ Record DNS records
- ☐ Backup everything
- ☐ Plan migration schedule
- ☐ Notify users of downtime
Migration from cPanel/WHM
- Export from cPanel:
- Create full backup in cPanel
- Download backup file
- Extract backup contents
- Prepare ISPConfig:
- Create client account
- Add websites
- Create email domains
- Set up databases
- Migrate website files:
# Extract cPanel backup tar -xzf backup.tar.gz # Copy website files rsync -avz homedir/public_html/ /var/www/clients/client1/web1/web/ # Fix permissions chown -R web1:client1 /var/www/clients/client1/web1/web/
- Migrate databases:
# Import MySQL databases mysql -u root -p c1_database < mysql/database.sql
- Migrate emails:
# Use imapsync for email migration imapsync --host1 oldserver.com --user1 user@domain.com \ --password1 oldpass --host2 newserver.com \ --user2 user@domain.com --password2 newpass
Migration from Plesk
- Backup in Plesk:
- Create domain backup
- Include all content and settings
- Download backup archive
- Extract and convert:
# Extract Plesk backup tar -xzf domain.com.tar # Website files location domains/domain.com/httpdocs/ # Database dumps location databases/ # Mail directories domains/domain.com/mailboxes/
- Import to ISPConfig:
- Create matching structure in ISPConfig
- Copy files to appropriate directories
- Import databases
- Recreate email accounts
Website Files Migration
Using rsync
# Sync files from old server
rsync -avz -e ssh user@oldserver:/path/to/website/ \
/var/www/clients/client1/web1/web/
# Preserve timestamps and permissions
rsync -avz --preserve-permissions --preserve-times \
source/ destination/
Using FTP
# Download from old server
wget -m ftp://user:pass@oldserver/public_html/
# Upload to new server
ncftpput -R -v -u ftpuser newserver /web local_files/*
Database Migration
Export from source
# Export single database
mysqldump -h oldserver -u username -p database > database.sql
# Export all databases
mysqldump -h oldserver -u root -p --all-databases > all_databases.sql
# Export with compression
mysqldump -h oldserver -u username -p database | gzip > database.sql.gz
Import to ISPConfig
# Create database in ISPConfig first, then:
# Import single database
mysql -u c1_user -p c1_database < database.sql
# Import compressed
gunzip < database.sql.gz | mysql -u c1_user -p c1_database
# Update database credentials in application
nano /var/www/clients/client1/web1/web/wp-config.php
Email Migration
Using imapsync
# Install imapsync
apt-get install imapsync
# Migrate single account
imapsync --host1 mail.oldserver.com --user1 user@domain.com \
--password1 "oldpass" --ssl1 \
--host2 mail.newserver.com --user2 user@domain.com \
--password2 "newpass" --ssl2
# Batch migration with CSV
while IFS=, read -r email oldpass newpass; do
imapsync --host1 oldserver --user1 "$email" --password1 "$oldpass" \
--host2 newserver --user2 "$email" --password2 "$newpass"
done < accounts.csv
DNS Migration
- Export DNS records from old server
- Create DNS zone in ISPConfig
- Add all records:
- A records for domains
- MX records for mail
- TXT records (SPF, DKIM)
- CNAME records
- Lower TTL before migration
- Update nameservers at registrar
Application-Specific Migration
WordPress Migration
- Export database from old server
- Copy all WordPress files
- Create database in ISPConfig
- Import database
- Update wp-config.php with new credentials
- Update site URL if changed:
UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name IN ('siteurl', 'home');
Post-Migration Tasks
- ☐ Test all websites
- ☐ Verify email accounts work
- ☐ Check database connections
- ☐ Test FTP access
- ☐ Verify SSL certificates
- ☐ Update DNS if needed
- ☐ Monitor error logs
- ☐ Set up backups
- ☐ Configure monitoring
Rollback Plan
Always have a rollback plan:
- Keep old server running for 30 days
- Document all changes made
- Have DNS records ready to revert
- Keep full backups of both servers
Important: Test the migration process with a single website first before migrating all sites. This helps identify and resolve issues early.