# Restoring cPanel backup to Local

**URL:** <https://community.localwp.com/t/restoring-cpanel-backup-to-local/33621>\
**Category:** Support\
**Created:** [October 7, 2022, 1:03am UTC](https://community.localwp.com/t/restoring-cpanel-backup-to-local/33621 "2022-10-07T01:03:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roly151](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@roly151](https://community.localwp.com/u/roly151)\
**Post date:** [October 7, 2022, 1:03am UTC](https://community.localwp.com/t/restoring-cpanel-backup-to-local/33621/1 "2022-10-07T01:03:48Z")

</div>

### Issue Summary

I have been given a .tar.gz backup file of a site made through cPanel. I’m trying to restore this so I can use it locally for development. Are there any guides on instructions on how to achieve this?

I have tried a lot of things but always end up with the error - cannot connect to database.

Steps I take:

- Create new site on Local
- Extract and Copy public\_html from the backup to the public folder in the new wp site on Local
- Copy the database sql file to the sql folder for the Local site. Open Adminer for the Local wp site and import the sql file.

I have then tried numerous things to get past the cannot connect to database error:

- Used user/password as root/root in wp-config
- Used backup site DB username and password in wp-config
- Created a new user in Adminer with the same username and password as the backup site. Edited wp-config.php with these details
- Created a new user in Adminer with new username/password. Edited wp-config to use these.

#### System Details

- Local 6.4.3
- Mac Monterey

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 7, 2022, 1:55pm UTC](https://community.localwp.com/t/restoring-cpanel-backup-to-local/33621/2 "2022-10-07T13:55:45Z")

</div>

Hi @roly151 can you share a copy of your Local Log here? [Retrieving Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#download-local-logs)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [January 5, 2023, 1:56pm UTC](https://community.localwp.com/t/restoring-cpanel-backup-to-local/33621/3 "2023-01-05T13:56:14Z")

</div>

Closed on January 5, 2023, 1:56pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
