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