Move website from cPanel to cPanel

ctrlaltdel21

Member
Jan 6, 2021
23
1
3
Ontario, Canada
cPanel Access Level
Root Administrator
I have a WordPress website at MyDomain.com/newsite (cPanel #1) and would like to move it to BizName.com (cPanel #2). They are both on the same WHM.

Is there an easier way to move the site other than downloading it via FTP from MyDomain.com/newsite and reuploading it to BizName.com via FTP and then having to export/import the database, change the WP-config file, search and replace URLs in phpMyAdmin, etc.?

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Hey there! The short answer, is "not really" - while you could move the files between the directories over SSH as the root user, you'd still need to change the ownership of the files after that move, and still dump and import the database, edit the wp-config, and all that. So..you might save a bit of time by not moving files over the network, but that's about it.

Even with more advanced tools such as WordPress Toolkit's Cloning ability, it only allows you to make a subdomain and not an entirely new domain, so it wouldn't update all the database settings in a way that would work for your situation.

I'm sorry I don't have better news on this one!
 

ctrlaltdel21

Member
Jan 6, 2021
23
1
3
Ontario, Canada
cPanel Access Level
Root Administrator
@cPRex - would you be able to let me know how to move the files via SSH? I assume the reason for doing this instead of FTP is that with SSH the transfer process takes place in the background and you can shut down your computer without aborting the process?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
The reason for choosing SSH over FTP is that you don't have to move the files twice off the server, so you save time since you're just rearranging files on the same disk.

Unless you are running your command inside of a "screen" session, you'd need to stay connected while the file move happens.

Outlining how to use SSH isn't something we can really do through a forums post as there are entire books just on that, but I'd recommend looking up the "cd" and "mv" and "chown" commands for this particular work. The following links should help get you started in the right direction if you want to learn how to work on the command line: