Server Administration & Management

How to backup & website transfer on cPanel

Steps to backup and move your site is as following :-

1. First login to your cPanel on old server and click “backup” (make sure you are using x skin)

2. Once in backup click “download a home directory backup” This will backup all your email accounts, files, and a few other things. It will not backup your MySQL databases.

3. If you have any MySQL databases you will download them now.

4. If you have any Aliases/Filter Backups download them.

5. Congratulations, you have backed up your entire site, and it’s now time to restore it.

6. Login to your WHM and create a domain with the same name as on old server, the login at the cPanel of this domain on the new server and click “backup”

7. Under “Restore a Home Backup,” click “Browse” and find the home backup you have you have already downloaded, and click upload.

8. Do the same for your MySQL databases.

9. Do the same for your Aliases/Filters.

10. You are done with everything your site has been restored, now repeat this process for any more sites you wish to backup.

Getting your database to work after restoring it

After you have restored your database, you will get an error when trying to view it’s page. Example Error:

Warning: mysql_connect(): Access denied for user: ‘bakerpe_osc1@localhost’ (Using password: YES) in /home/bakerpe/public_html/catalog/includes/functions/database.php on line 19
Unable to connect to database server!

What this means is that your database now exists in cPanel, but it has no username and password assigned to it. To assign a username and password login to your cPanel and click “MySQL Databases” Scroll down till you see the below.

Your username will look something like this yourusername_databasename@localhost The red part would be your username. The username in our example error above is “osc1”

You will need to find out your databases password. To do so look at the error your page gave you and take note of the path.

Path from our example error:


You will now login to your sites FTP and go through the folders until you find the file listed in your error path.

You will now download the file to your computer. Once it’s downloaded open it up and browse until you find your database password.

Example of what to look for: DB_SERVER_PASSWORD’, ‘nvGHdCC0dCMz’);

nvGHdCC0dCMz would be our database password. We will now fill that password in for our database password, and and then press “add user”

The user has now been added, but it has not been assigned to a database.

Match up the user with the database it belongs to and then just click “add user to database”

You are done!

February 24, 2011 - Posted by | cPanel | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: