How to transfer a website and server professionally Print

  • cpanel, migration, moving servers, whm, transfer, rsync, server, website, move
  • 244

Transferring a cPanel website and server involves moving all your website files, databases, and configurations from one cPanel account and server to another.

Here’s a step-by-step guide for websites and servers:

Option 1: Full cPanel Backup and Restore (Recommended)

  1. Log in to the Source cPanel:

  • Go to the Backup Wizard or Backup under the Files section.

  1. Create a Full Backup:

  • Select Full Backup and choose the backup destination (you can save it locally or send it to a remote FTP server).
  • Once the backup is completed, download the backup file to your computer.

  1. Log in to the Destination cPanel:

  • Go to the Backup Wizard or Backup again and choose Restore.
  • Upload the full backup file you downloaded earlier.

  1. Wait for Restoration:

  • The restoration will import all your files, databases, emails, and configurations.

Option 2: Manual Transfer

  1. Download Website Files:

  • In the source cPanel, go to File Manager under Files.
  • Compress the public_html directory (or the relevant directory) into a .zip file.
  • Download the compressed file to your computer.

  1. Export Databases:

  • Go to phpMyAdmin under Databases.
  • Select the database(s) you need and click on Export to download a .sql file.

  1. Upload Files to the New cPanel:

  • In the destination cPanel, go to File Manager and upload the .zip file to the public_html directory.
  • Extract the file after uploading.

  1. Import Databases:

  • In the destination cPanel, go to MySQL Databases and create a new database and user.
  • Go to phpMyAdmin and select the new database, then click Import and upload the .sql file you downloaded earlier.

  1. Update Configuration Files:

  • Ensure that the configuration files (like wp-config.php for WordPress or config.php for other CMS platforms) have the correct database credentials (name, username, password, host).

  1. Test the Website:

  • Before updating DNS settings, test the website by accessing it via a temporary URL or by editing your local hosts file.

Option 3: Using the cPanel Transfer Tool (for server admins)

  • If you have root access, the Transfer Tool in WHM can be used to directly transfer accounts from one server to another.

Post-Transfer Steps

  • Update the DNS settings to point to the new server.
  • Wait for DNS propagation (this may take up to 48 hours).
  • Test your website to ensure everything is working correctly.

Server Transfer

Transferring a server involves migrating all the data, applications, configurations, and settings from one server to another. This can be more complex than moving a single website, as it often involves various services, databases, and other critical elements. Here’s a general step-by-step guide to transferring a server:

Step 1: Assess the Environment and Prepare

  1. Inventory Current Server Setup:

  • List all software, services, databases, and applications running on the current server.
  • Identify dependencies and specific configurations.

  1. Prepare the Destination Server:

  • Ensure the destination server meets or exceeds the requirements (OS version, software, hardware).
  • Install necessary software, libraries, and services that your applications require.

  1. Backup the Source Server:

  • Take a full backup of the source server, including files, databases, and configuration settings.
  • Ensure you have a rollback plan in case something goes wrong.

Step 2: Transfer Files and Data

  1. Copy Files from Source to Destination Server:

  • Use rsync, scp, or SFTP to copy files securely:

rsync -avz /source/directory/ user@destination_server:/target/directory/

  • You can also use scp:

scp -r /source/directory/ user@destination_server:/target/directory/

  1. Transfer Databases:

  • MySQL/MariaDB: Use mysqldump to export the databases and import them on the new server:

mysqldump -u root -p database_name > backup.sql

Then, import on the new server:

mysql -u root -p database_name < backup.sql

  • PostgreSQL: Use pg_dump for export and import:

pg_dump database_name > backup.sql

And on the destination server:

psql database_name < backup.sql

  1. Transfer Configuration Files:

  • Copy over any critical configuration files (e.g., /etc/nginx/nginx.conf, /etc/apache2/apache2.conf, /etc/php.ini) and adjust paths or settings as needed for the new environment.

Step 3: Update and Test Services

  1. Configure Web and Application Servers:

  • Set up and configure the web server (Nginx, Apache, etc.) to serve your application on the new server.
  • Ensure that any firewall rules, security groups, and SSL certificates are correctly configured.

  1. Configure Database Connections:

  • Make sure application configuration files point to the correct database on the new server.

  1. Test the Setup:

  • Perform tests to ensure that the website or applications are functioning as expected.
  • Check logs for errors and troubleshoot as necessary.

Step 4: Update DNS and Go Live

  1. Change DNS Records:

  • Update the DNS settings to point to the new server’s IP address. This is typically done through your domain registrar or DNS provider.
  • Allow up to 24–48 hours for full DNS propagation.

  1. Monitor the Transition:

  • During the DNS propagation, monitor both servers for any issues.
  • Once confident that the transition is smooth, decommission the old server.

Step 5: Final Cleanup and Optimization

  1. Optimize and Secure the New Server:

  • Implement security measures like firewalls, SSH key authentication, etc.
  • Optimize server performance settings based on your application’s needs.

  1. Backup the New Server:

  • Set up automated backups for the new server to ensure you can recover data in case of an issue.


Was this answer helpful?

« Back