Complete CyberPanel Migration Guide (Manual Transfer without Migration Tool)
This guide walks through a manual CyberPanel-to-CyberPanel migration including website files, database, email, DNS settings, and SSL restoration. It is intended for scenarios where the CyberPanel migration tool is unavailable or space-limited.
---
SECTION 1: Manual Website File Migration
----------------------------------------
1. On the OLD server, transfer the website files directly to the NEW server:
tar czf - /home/yourdomain.com/public_html | ssh root@NEW_SERVER_IP "mkdir -p /home/yourdomain.com/public_html && tar xzf - -C /home/yourdomain.com/public_html"
2. Verify the directory:
ls -lah /home/yourdomain.com/public_html
3. If WordPress files are not in the right folder, move them:
mv /home/yourdomain.com/public_html/subfolder/* /home/yourdomain.com/public_html/
---
SECTION 2: Set Proper File Ownership
-------------------------------------
1. Check the correct CyberPanel user:
ls -ld /home/yourdomain.com
2. Set ownership recursively:
chown -R youruser:youruser /home/yourdomain.com/public_html
---
SECTION 3: Transfer wp-config.php or Recreate It
-------------------------------------------------
1. Find it on old server:
find /home -type f -name wp-config.php
2. Transfer via scp:
scp /home/path/to/wp-config.php root@NEW_SERVER_IP:/home/yourdomain.com/public_html/
3. Set correct ownership and permissions:
chown youruser:youruser /home/yourdomain.com/public_html/wp-config.php
chmod 640 /home/yourdomain.com/public_html/wp-config.php
---
SECTION 4: Database Creation and Connection
-------------------------------------------
1. Extract DB credentials from wp-config.php:
nano /home/yourdomain.com/public_html/wp-config.php
2. Retrieve MySQL root password:
cat /etc/cyberpanel/mysqlPassword
3. Create DB and user:
MYSQL_PWD='MYSQL_ROOT_PASS' mysql -u root -p"$MYSQL_PWD" -e "CREATE DATABASE IF NOT EXISTS db_name;
CREATE USER IF NOT EXISTS 'db_user'@'localhost' IDENTIFIED BY 'db_password';
GRANT ALL PRIVILEGES ON db_name.* TO 'db_user'@'localhost';
FLUSH PRIVILEGES;"
4. Restart services:
systemctl restart mysql
systemctl restart lsws
---
SECTION 5: Fix Index Issues
----------------------------
If you see the default CyberPanel welcome page:
1. Remove the default index:
rm /home/yourdomain.com/public_html/index.html
2. Confirm WordPress files exist:
ls /home/yourdomain.com/public_html
3. Restart web server:
systemctl restart lsws
---
SECTION 6: DNS Settings
------------------------
1. On new server, add DNS zone in CyberPanel:
Websites > List Websites > Manage > DNS > Add Records
2. Update your domain registrar's nameservers or A record to point to the new server's IP.
3. Verify propagation with:
dig yourdomain.com +short
---
SECTION 7: Email Migration
---------------------------
1. Export mailboxes from old server (if using maildir):
rsync -avz /home/vmail/yourdomain.com/ user@NEW_SERVER_IP:/home/vmail/yourdomain.com/
2. Ensure `postfix` and `dovecot` are properly configured on the new server.
3. Update MX records in DNS if changed.
4. Test email by sending and receiving after DNS resolves.
---
SECTION 8: SSL Certificate Setup
---------------------------------
1. Enable SSL in CyberPanel:
Websites > List Websites > Manage > SSL > Issue SSL
2. Alternatively, use the CLI:
/usr/local/CyberCP/bin/python3 /usr/local/CyberCP/plogical/sslUtilities.py --issueSSL yourdomain.com
3. Restart web service:
systemctl restart lsws
4. Verify:
curl -I https://yourdomain.com
---
TROUBLESHOOTING
----------------
- Permission denied: Use `chown` or `chmod`
- wp-config.php not found: Transfer or recreate from sample
- Database errors: Recreate DB and ensure correct user/password
- SSL not working: Re-issue in CyberPanel and confirm DNS is resolved
- DNS not propagating: Wait or verify with `dig`, `nslookup`
---
Thankyou