1. Home
  2. Knowledge Base
  3. Applications
  4. PrestaShop
  5. How to fix Error – Link to database cannot be established in PrestaShop

How to fix Error – Link to database cannot be established in PrestaShop

Step 1: Log into your hosting control panel, SSH, or FTP client.
Step 2: Navigate to the PrestaShop website root folder.
Step 3: From there, find your way to the ‘config’ folder.
Step 4: Once in the ‘config’ folder, locate the file named ‘settings.inc.php’ This is the file with all of the database settings.
Step 5: The table below shows your the four database settings. Ensure that each one is correct. The data shown is sample data, so you will need to know the connection data for your own installation.

define(‘_DB_SERVER_’, ‘localhost’);
define(‘_DB_NAME_’, ‘your_database_name’);
define(‘_DB_USER_’, ‘your_database_user_name’);
define(‘_DB_PASSWD_’, ‘your_database_password’);

Step 6: Once you have corrected the database settings and saved the file, refresh the page to see if the site displays. If so, you may turn off the error reporting.

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support