How to Recover Your Database

A database is a system of storing and fetching data in an organized way. For example, WordPress uses PHP (a common programming language) to store and retrieve data from the database. This data includes posts, pages, comments, categories, tags, custom fields, users, and other WordPress settings. 

If your database is lost, your website functionality will be affected. The following steps show how to recover your database.

To import your database from a backup

Please refer to How to Restore Database Backups using JetBackup to import your database from a backup. 

To create a new database

  1. Create a Database on your cPanel
  2. Import a Database with phpMyAdmin 

How to link a database to a WordPress website

  1. Access your cPanel’s File Manager
  2. Open your wp-config.php file in the root path of the WordPress installation you have. You should enter the database details you used when you created the database in the previous step.

How to link a database to a Joomla website

  1. Access your cPanel’s File Manager
  2. Open your configuration.php file in your Joomla website’s root folder and update the database details to match those entered when you created the database in cPanel

How to link a database to a Drupal website

  1. Access your cPanel’s File Manager
  2. Local the settings.php file which has the following path in your drupal directory under sites/default/settings.php (Notice that the permissions of the file might be set to 444. If it is the case, you won’t be able to make any changes to this file until you reset the permissions to 644.)
  3. Once done, update the database details in the settings.php file to match those entered when you created the database in cPanel

I am unsure of what type of website I have

Regardless of your website type, there will always be a file from which you can update the database credentials. If unsure, please check with your developer or reach out to our Support team for assistance.

I don't have a local database backup

If you have a static website, your website should be fully functional as a database is not required. However, if your website requires a database, you will need to work on creating a new one and linking it to your website. If you need assistance, contact our support team. 

Was this answer helpful?