Bobcares

How to Migrate Shared cPanel Hosting to a Vultr Cloud Server

by | Mar 24, 2025

Learn how to migrate shared cPanel Hosting to a Vultr Cloud Server. Our Vultr Support team is here to help you with your questions and concerns.

How to Migrate Shared cPanel Hosting to a Vultr Cloud Server

Migrating a website from a shared hosting cPanel to a VPS server can enhance performance, flexibility, and security. But if you are hesitant to proceed without the right guidance, you are in luck!

How to Migrate Shared cPanel Hosting to a Vultr Cloud Server

This guide will walk you through the process, ensuring a smooth transition without data loss or downtime.

How to Migrate Your Website from cPanel to a VPS: A Step-by-Step Guide

1. Set Up FTP Access on the VPS Server

To transfer files from cPanel, we must enable FTP and create a user account.

  1. First, install vsFTPd on your server:
    sudo apt-get install vsftpdCopy Code
  2. Then, edit the vsFTPd configuration file:
    sudo nano /etc/vsftpd.confCopy Code

    Also, uncomment the following lines:

    local_enable=YES
    write_enable=YES
    anonymous_enable=NO
    Copy Code
  3. Now, save and close the file.
  4. After that, create a local user account and grant sudo rights:
    adduser example sudoCopy Code
  5. Then, start the FTP server:
    sudo service vsftpd startCopy Code
  6. Open port 22 on the firewall:
    sudo ufw allow 22/tcp
    sudo firewall reload
    Copy Code

2. Log in to cPanel

Depending on the hosting provider, log in to cPanel using:

https://example.com/cpanelCopy Code

3. Backup cPanel

Create a full cPanel backup to preserve website files, emails, DNS records, and databases.

  1. In cPanel, navigate to Backup under the Files section.
  2. Then, under Backup Destination, select SCP.
  3. Enter the VPS server IP, FTP user, password, and port from Step 1.
  4. Once the backup is complete, log in to the VPS and locate the file:
    tar -xvf backup-*_*_example.tar.gzCopy Code
  5. Then, rename the extracted folder:
    mv backup-__example/ cpanelfilesCopy Code
  6. Change to the directory and list files:
    cd cpanelfiles/
    ls
    Copy Code

Migration Option 1: Install a Web Stack to Host the Website

  1. First, we have to set up Apache, MySQL, and PHP
    • Install Apache:
      
      sudo apt install apache2
      sudo systemctl enable apache2
      sudo systemctl start apache2
      Copy Code
    • Install MySQL:
      
      sudo apt install mysql-server
      mysql_secure_installation
      sudo systemctl enable mysql
      sudo systemctl start mysql
      Copy Code
    • Install PHP:
      
      sudo apt install php php-xml php-gd php-mysql php-curl php-zip php-mbstring
      Copy Code
  2. Then, it is time to configure Apache:
    • Create a virtual host file:
      sudo nano /etc/apache2/sites-available/example.com.confCopy Code
    • Then, add the following:
      
      <VirtualHost *:80>
      ServerAdmin user@example.com
      ServerName example.com
      DocumentRoot /var/www/example.com/
      </VirtualHost>Copy Code
    • Save and close the file.
    • Then, enable the configuration and restart Apache:
      
      sudo a2ensite example.com.conf
      sudo systemctl restart apache2
      Copy Code
  3. Now, it is time to move the website files to VPS. So, copy files to the webroot directory:
    sudo cp cpanelfiles/homedir/public_html/* /var/www/example.comCopy Code

    Then, grant ownership rights:

    sudo chown -R www-data:www-data /var/www/example.comCopy Code
  4. Then, we have to restore databases. So, change to the MySQL directory:
    cd /cpanelfiles/mysqlCopy Code

    And, restore the database:

    mysql -u root exampledb < file.sqlCopy Code

    Then, verify the tables:

    mysql> USE exampledb;
    mysql7gt; SHOW TABLES;
    Copy Code

    After that, exit MySQL.

  5. Now, point the domain to the VPS by logging in to the VPS provider’s portal. Then, add a new domain and enter the server IP. Finally, update the nameservers in the domain registrar panel.
  6. Now, it is time to enable HTTPS. So, install Certbot:
    sudo apt install python3-certbot-apache certbotCopy Code

    Then, request a free SSL certificate:

    sudo certbot -d example.com -m user@example.comCopy Code

Migration Option 2: Migrate to a Free Control Panel

If we prefer a free control panel, Virtualmin allows importing cPanel backups.

  1. Log in to Virtualmin.
  2. Then, go to Add Servers > Migrate Virtual Server.
  3. Upload the cPanel backup file.
  4. Choose cPanel Backup as the backup type.
  5. Finally, click Migrate Now to import the data.

Migration Option 3: Migrate to Self-Hosted cPanel

If we are using cPanel on the VPS:

  1. Log in to WHM:
    http://server-ip:2087Copy Code
  2. Then, go to Transfers > Transfer and Restore a cPanel Account.
  3. Select the backup file from the server or upload it manually.
  4. Next, choose Replace All Matching A Records.
  5. Finally, click Restore to complete the migration.

Test the Migration

  1. Visit the domain:
    http://example.comCopy Code
  2. If DNS propagation isn’t complete, it may take 3-12 hours.
  3. Test HTTPS:
    https://example.comCopy Code

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

Migrating cPanel to a VPS server ensures better performance and security. By following our guide, you can seamlessly transfer your website, restore databases, and configure a secure hosting environment.

In brief, our Support Experts demonstrated how to migrate shared cPanel Hosting to a Vultr Cloud Server.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!