How to Move Accounts From One cPanel Server To Another
This tutorial explains a simple, straightforward method for migrating cPanel accounts from one server to another. You can use this method to transfer accounts from an old server to a new one, help customers from another host move to your host, etc. This does not even require root access on one end of the migration. Basically, this is a more reliable method than the "Transfer Account from another Server" tool in WHM, which rarely works.
Requirements:
- cPanel on both servers
- WHM access on the new server (one that the accounts are being moved to)
- root access on the new server
Definitions
The server you are transferring the accounts from = "old server"
The server you are transferring the accounts to = "new server"
Instructions
1. Log into WHM of your new server and create a new account called "restore", or anything you like for that matter. Remember the FTP address, username ('restore', in this example), and account password. We will need these for later.
2. Log into the cPanel account you are wanting to transfer on the old server.
3. Click on "Backup >> Generate/Download a Full Backup".
4. Once here, select the backup destination to be "Remote FTP Server".
5. Enter your email address for verification, followed by all of the FTP account information for "restore", which we created on the new server.
-Remote Server: new server's address
-Remote User: restore
-Remote Password: restore's password
-Port: 21
Then, click "Generate Backup". This may take some time to backup the files, depending on how large the account is. You should receive an email provided in the above info once it is complete.
6. Now, log into SSH on your new server.
7. Type in the following commands:
cd /home/restore/public_html
ls
After running the list command above (ls), you should see the tar file of the account on the old server. This means that you have successfully sent the file via FTP to your new server.
8. Now move the tar file to your new server's /home directory with the following command:
mv tar_file_name /home
9. Now, log into WHM on your new server and navigate to "Backup >> Restore a Full Backup/cpmove file"
Once here, you should see the old account's username under "Possible cpmove archives found:".
If you do not, log back into SSH and be sure that the account's tar file has been moved into /home.
10. Type in the account name in the text field in WHM, which is proceeded by "Enter the username for the account you wish to restore:".
11. Click "Restore".
12. Repeat process for additional accounts.


on May 17th, 2007 at 1:21 pm
Can you tell me how to "log into SSH on your new server"
on May 17th, 2007 at 1:25 pm
You can use a tool like WinSCP, it's free
on July 30th, 2007 at 5:10 pm
I can't login into SSH,
Can tou show me the way how to migrate one account (or many account or one reseller accoount) to another acccount ?
Thank you !
on July 31st, 2007 at 7:16 am
If you can't login to SSH you may need to find another option – so you'll need to contact your host. Let me know what you find out!
on August 29th, 2007 at 12:34 pm
Hi Justin,
Thanks for the information above. But it seems that I continuously receive an error that says the Account Creation Failed…that username is taken. I also attempted to –force the restore and received the same error message.
Any ideas what I am doing wrong?
Thanks
on September 4th, 2007 at 9:23 am
Well are you trying to upload files for which the username is already taken? If you've followed all the steps directly and it's not working, I'd contact your host.
on October 23rd, 2007 at 1:42 pm
Hey Justin,
Thank you for the information above, do these steps grab all of their e-mails sitting on the old server as well?
Cheers,
Wes
on October 24th, 2007 at 11:12 am
Wes,
yes, as long as the emails are still on the server, they should be moved as well
on October 29th, 2007 at 2:17 am
please tell me how to move a text file from one server to another by using a config file.
on December 5th, 2007 at 7:33 pm
I have logged into WHM on my new server but I cant find the option "Backup >> Restore a Full Backup/cpmove file". Is it in WHM or Cpenal?
on December 6th, 2007 at 10:33 pm
Do you not have a dedicated server? Maybe your host has disabled that feature…
on December 28th, 2007 at 2:35 pm
i do backup and receive in email:
Can't call method "login" on an undefined value at /usr/local/cpanel/bin/ftpput line 28.
any idea? thanks
on January 24th, 2008 at 5:33 am
Thanks you for your tips. It was working perfectly.
But I still got problem with mysql database.
When I moving to the new server, some website of my clients cannot connect to database.
Can some body help me regarding this problem?
Regards,
Afrizal
on January 26th, 2008 at 2:54 pm
How do you move the backup to the /home directory, what are the commands for that? Every tutorial I have found says to move it, but none say how to move it!
on January 26th, 2008 at 4:36 pm
NM I see it. I guess I'm blind, dumb, or both! Not sure I missed that part of the tutorial!
Thanks!
on February 3rd, 2008 at 7:17 am
what happen if mysql server versions were different ?
is it give bugs?
on April 5th, 2008 at 7:37 am
I would do it this way.
login to SSH
run /scripts/pkgacct username
(replace username with the cpanel username you wish to move)
it will create the tar.gz of the complete account and place it on your /home/
then transfer the tar file to the new server "/home" and then use whm or SSH to restore it. once this is done, I'll login to old server's WHM and edit DNS zone for this moved account and change the IP to the NEW ones and change the Nameservers to the new one, change the TTL (time to live) value from 14400 to 3600 seconds and save.
Allow it 30 mins and then update the nameservers from the Domain registrar end. This way there shouldn't be any noticable downtime in most cases.
on May 18th, 2008 at 9:09 am
Hi,
thanks for the tutorial,
How would i transfer multiple WHM accounts,plus the cpanels within the WHMs to a new server.
Thansk
on June 30th, 2008 at 6:26 pm
@mohit
How exactly do you move the tar file from old server home to the new server home?
on July 17th, 2008 at 6:38 am
Thanks so much! Transfer went with ease this time around. Your instructions worked perfectly!
on August 19th, 2008 at 12:26 am
I was trying this out. Did not create a restore account, but everything seemed to go well. On new server, tarball was unzipped and all messages said success and new account was created. But many folders and files were not restored, though all databases seem to be in place.
Deleted all, tried again – and still files and folders only partially restored. No error messages anywhere.
(I am a newbie to all this, so I may have missed something.)
Any idea why this happens? Any help is appreciated
on September 5th, 2008 at 1:53 pm
I cannot figure out how to generate a complete backup using godaddy's hosting. They really suck for backend.
Anyone know how I can get this done with godaddy hosting
on September 18th, 2008 at 12:52 am
Do you know how to restore from a CPanel Full Backup if you don't have CPanel. Some dweebtard has sent me a CPanel backup but I have no idea how to access the MySql database.
TIA!
on October 30th, 2008 at 12:20 pm
thanks for tutorial, very helpful. We are moving around 130 websites from one to host to another and I didnt know how to
on December 23rd, 2008 at 6:07 am
thanks, for this straight forward guide…
but I must mention:
backup files are going to /home/restore/ instead of /home/restore/public_html.
if you want to generate backups in public_html dir you must enter public_html in the last textbox which named Remote Dir.
thanks again for this tutorial…
on December 26th, 2008 at 3:39 pm
hi do yiou know if i can movce account from cpanel server to a host plan with godday …. actually i was in full deicated server with cpanel whm ok there i know how to moce account fromserver to server voa WHM bbut now i have to move from cpanel to godadday any idea how
on March 14th, 2009 at 8:47 pm
[...] How to Move Accounts From One cPanel Server To Another [...]
on July 25th, 2009 at 11:41 pm
Thanks for the tutorial!
I did find a problem when attempting to do the restore in WHM on the new server when accessing it via Safari on a Mac. It kept complaining that there was no backup file from which to restore… I'd check and it had been deleted! Every time! I switched to FireFox and everything worked perfectly.
I also used cp instead of mv to make a copy of the file and not move it… after having a couple deleted on me.
To the person that asked about loging in via ssh… open a terminal application (it's in the Utilities folder on the Mac… not sure about Windows) and type the following…
ssh -l username mydomain.com
where:
- username is your username
- mydomain.com is your domain name of the new server
My ISP uses a non-standard port for ssh. Instead of port 22, they use port 7288… so, I typed this instead…
ssh -p 7288 -l username mydomain.com
They also required me to create an SSH key. This is a way of securing ssh access to your server by telling the server in advance that you'll be logging in. In WHM, go to Security -> Manage SSH Keys and click on Import Key. Switch back to Terminal and type…
ssh-keygen
It should ask you for a password. This creates a hidden directory in your home directory called .shh and in it you'll find a file called, id_rsa.pub. Navigate to the directory and display the contents of the file by typing…
cat /Users/username/.ssh/id_rsa.pub
where:
- username is your user name on your Mac
Copy the text that it spits out and paste it in the public key field back in WHM.
The next time you attempt to login via ssh, it should work.
I realize that these instructions are Mac-specific but the ideas should be the same on Windows… just the method will be different. This tutorial helped me a lot so I thought that I'd just give back a little.
Cheers!
on August 11th, 2009 at 11:19 pm
Suggestions for importing just a single addon domain from an existing cpanel account… Not the complete cpanel account just one or two separate addon domains?
on September 19th, 2009 at 11:18 pm
Great tutorial, if you still can not do it, I will move any site for $5.00 goto my site and open a ticket. http://client.myviphosting.com/client/submitticket.php
on November 5th, 2009 at 5:20 am
Justin
Have you got any idea how to access or change an admin username and password in PHPAdmin for a PHP Web script that I have installed?
Cheers
Ken
on November 9th, 2009 at 1:10 am
If i'm transferring to the same domain, should i change the nameserver first before following the steps above?
Thanks