I run a dedicated server which uses CPANEL/WHM.
My client wanted to duplicate their website and it was absolutely massive, around 10 gb with a lot of pictures and files in some of their folders. They wanted to also keep their existing website as well, so I had to figure out a way to copy their entire 10gb website over to a new account.
Compressing the website files, downloading and re-uploading was not an option because it would’ve taken all day, so I thought of a different way around it.
Here’s my process of copying a large website from one user to another user on the same server (using WHM)
Scenario: I need to copy a website from user “larry” to user “larry2”.
1. Copy the original website folder
Right click on the folder you want to copy, in this case, it’s “larry”
When the dialog asks where to copy the folder, called it “larry2”
Once done, “larry2” will now copy over, so essentially you have a direct copy of the website (files) that you can transfer to the new user account. If the folder is large, give it a few minutes to completely copy over. Wait 10 minutes for a large website to be safe.
2. Log in to your FTP program as ROOT user
Now that the folder is copied, we need to log into the server root (which has access to all user accounts) and drag and drop the folder “larry2” into the new user account.
If you’re unsure of your FTP details to log into your root account for your server, you will need to ask your web host.
Log in to your root ftp, find “larry2” (usually in the home folder) and then whilst you can see “larry2” in the top folder structure, navigate to the new account and drag the “larry2” folder into the new user account.
This will transfer fast, almost instantaneously as it is on the same server.
Download Putty
I logged onto SSH via Putty (Download Putty Here), if you’re unsure of your putty details, you’ll want to speak to your web host to clarify the login details and port.
Log into Putty
Again, speak to your web host for SSH login details so you can use putty.
Assuming the new user account is called “larry2” and the folder is called “larry2“.
The code we type below is telling the server to change the permissions for the “larry2” folder within the “larry2” user account to reflect “larry2” instead of the existing permissions of the previous user.
chown -R larry2:larry2 /home/larry2/public_html/larry2/
Once you hit the enter key, it should be instantaneous, now your permissions for the copied folder are set to the new owner.
If you’re moving a WordPress, there will be extra steps involved such as copying over the database and ensuring your WP-CONFIG.php reflects the new database information.