Copying a large Website between accounts
I have a client website which is over 50GB on a dedicated WHM server, they need some work done on the website. I'd like to simply make a copy into a temporary cPanel account so I can work on it without breaking the live site. So on the file system, it looks like:
/home/live_site/public_html/ - Huge 50GB worth of webstie
/home/temp_account_1/public_html - Empty directory
I'm SSH'ed into the box, I'm wondering will a simple copy command suffice for this, something like:
cp -r /home/wptest1/public_html/* /home/wptest2/public_html/
I'm a little concerned that I might have issues with file permissions with this.
-
Hello Hefin, If you want to duplicate a live website to a temp account, Imagine that live website username is "wptest1" 1. Create a temporary cpanel account with user name "wptest2" 2. Copy the contents from live website to temp account by using cp commands cp -pvr /home/wptest1/public_html/* /home/wptest2/public_html/ 3. Correct the ownership by using chown command chown -R wptest2:wptest2 /home/wptest2/public_html/ 4. If it is a wordpress contents, create a seaparate database & db user for temp account 5. Take a backup of live website database and restore it to the temp account database 6. Mention the newly created database name, database username, password in the temp account wp-config.php file 0 -
Hey @techAMIGO Your command to change the ownership is what I was looking for that should be just the ticket. Yeah, it's a WordPress site, thanks for the additional database cloning instructions, that part I'm fairly confident about as I've got the cPanel interface to help me.;) But copying the massive site over to another account using Linux commands and changing the ownership was a little daunting, so thanks for the instructions! :) :) Much appreciated, cheers 0 -
Thanks, @techAMIGO ! 0
Please sign in to leave a comment.
Comments
3 comments