Title: Database Connection Error
Last modified: August 21, 2016

---

# Database Connection Error

 *  [MrScar](https://wordpress.org/support/users/mrscar/)
 * (@mrscar)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-26/)
 * Hello guys!
    I had to reinstall my wordpress website on another hosting, and 
   now I have to restore my contents. But, there’s a problem. Before migration, 
   I had downloaded a backup using Cpanel. That was a FULL BACKUP, not particularly
   a “database backup”. What do I do now in order to restore my posts on my website?
 * Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [dannyb87](https://wordpress.org/support/users/dannyb87/)
 * (@dannyb87)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-26/#post-4265968)
 * [@mrscar](https://wordpress.org/support/users/mrscar/)
 * Hello! Providing your ‘FULL BACKUP’ has backed up your wordpress files in your
   root/httpdocs and also the accompanying database, and of course none of your 
   hosting settings have changed, you should be able to re-upload your wordpress
   files via an FTP client and import your database content via phpMyAdmin within
   your cPanel.
 * Any content previously backed up, i.e posts, categories, users etc. will be stored
   in your database or MySQL dump.
 * Depending on how the ‘FULL BACKUP’ has exported your database the SQL query may
   needs some minor tweaks. For example, the queries may dictate to update any existing
   tables with the said structure/content and therefore may fail if you have not
   already uploaded the default wordpress tables into your database.
 * In other cases, which is what I tend to use when transferring databases to another
   domain, your SQL query can be slightly modified to automatically create required
   tables and then insert your content, if the tables do not already exist.
 * So basically, in short, unless you have a backup of your database and not just
   your websites files you will not be able to restore any previous content.
 * If you don’t understand anything I have mentioned or would like me to help further
   just ask 🙂
 * Hope this helps, Danny.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-26/#post-4265982)
 * It’s it’s a full cPanel backup, then that can only be restored by your web hosting
   company. To restore that backup you need root acces to the server, and you won’t
   have that. If you contact your new hosting company they’ll be able to help you.
   Also, it’s actually easier for them to do a direct copy from your old host to
   their new servers if the old account is still active.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database Connection Error’ is closed to new replies.

## Tags

 * [connection](https://wordpress.org/support/topic-tag/connection/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-26/#post-4265982)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
