Â
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
Â