Step by Step to find the PrestaShop Database Config file

How to find the PrestaShop Database config file to get the necessary information you forgot?

Your database connection can be established in the PrestaShop configuration setting by adding your database username, password, hostname, and database name. Once you are connected to your databases, the Prestashop framework knows all the tables you are using in your installation.

Feel free to get this information from the configuration file if you missed them.

PrestaShop database config file

What is a config file, and what is its purpose?

The PrestaShop config file is a PHP file that contains basic configuration information for an online store. You can customize and override any of the settings in this file anytime after finishing the PrestaShop installation..

In general, it contains the following information: database connection details for MySQL database and PostgreSQL, secret key...

These are important data and if any data of these provided is missed, the site will either not function or run incorrectly.

This information is stored in a parameters.php file.

Where is the Database Config File located?

The place to store this file in PrestaShop 1.6 & 1.7 is not the same. This can be confusing for some people.

In PrestaShop 1.6, the default place for the config file is at the config folder in the root folder of your store's domain name:

your-website/config/parameters.php

In PrestaShop 1.7, the default place for the config file is at the config folder inside the app folder:

your-website/app/config/parameters.php

The physical URL of this PHP configuration file was changed to make it easier to manage configurations, but this has caused some confusion among users who do not know.

return array (
  'parameters' => 
  array (
    'database_host' => '127.0.0.1',
    'database_port' => '',
    'database_name' => 'mystore',
    'database_user' => 'myadmin',
    'database_password' => 'a424SSd#',
    'database_prefix' => 'ps_',
    'database_engine' => 'InnoDB',
    'mailer_transport' => 'smtp',
    'mailer_host' => '127.0.0.1',
    'mailer_user' => NULL,
    'mailer_password' => NULL,
    'secret' => 'WsdfsdWiiwFBhpH5touUzBv',
    'ps_caching' => 'CacheMemcache',
    'ps_cache_enable' => false,
    'ps_creation_date' => '2021-08-10',
    'locale' => 'en-US',
    'use_debug_toolbar' => true,
    'cookie_key' => 'cfsdf98wrMkgpIPYG1MoVQ1zhADGGFDGz2B4BuB3',
    'cookie_iv' => 'qwxmkkfsdfs7ZgSgjnKbToXLpNzypKO',
    'new_cookie_key' => 'def00000d264b27sdfsf0bb8bfbe6',
  ),
);

Is there a way to edit this configuration file?

Yes, the file can be edited by hand.

Use an FTP client to connect your FTP server and download the database configuration file into your local PC.

Which one should I use?

In my opinion, FileZilla or Remote FTP for Atom are good choices for this file transfer task. But it is recommended to use a file manager tool from your hosting provider. It will help you save time and energy when editing this file.

Why is this important?

The default place for the config file in PrestaShop 1.6 & 1.7 is not the same, so when you change settings, you have to know where your PrestaShop website's configuration file is located.

By knowing this information, it will make you more effective and efficient.

In order to move your PrestaShop store to a new domain or change other information related to database settings after installation, such as the database name or database server, you need to correct this information by editing this file with a file manager.

PrestaShop database config

If your site is installed for a long time, you will forget the database configuration. Accessing the database information section of the file is an easy way to restore whatever you want.

This file contains not only the database connection data but also other advanced parameters such as the cookie key. It's very helpful to use the cookie key to recover the accessing to PrestaShop Admin Panel Dashboard from the database following my tutorial.

Last but not least, don't forget to back up this PrestaShop database config file every time you edit it.

PrestaSEO AI++.

PrestaSEO AI module

PrestaSEO AI++ is a cutting-edge module designed to take your PrestaShop store’s SEO to the next level. Built with advanced automation and AI technology, it streamlines SEO tasks, making optimization easier and more effective.

Whether you're focused on improving local visibility or cleaning up your site's URL structure, PrestaSEO AI provides a comprehensive suite of features to enhance your store's performance.

Latest modules update!

iConvert Promotions 8.0.0 ⊙

Optimize source codes to improve the performance and user experiences on PrestaShop 8, resolved various issues to enhance compatibility with PrestaShop 1.7.x.


DocumenThemix 3.3.7 ⊙

Compatible with PrestaShop 8.


ChargeMe v5.4.1 ⊙

Clear the cart & redirect to the checkout page.


Age Restriction - 18+ v2.3.6⊙

Fix page assignment issues.


Newsletter Popup v3.2.5 ⊙

Enhance the level of security.


JumptoCheckout v.2.1.1 ⊙

Fix the deleting product issue.


PrestaSOO team

Trusted by 7k++ clients.

Modules you need to make a living doing work you love.

Discover

It is a wise investment

PrestaShop modules we created first to solve the problem of our own business - an e-Commerce site. That means they are very useful for serious business. If you value your web property, these modules are a wise investment.
Sarah Reeves, App Developer @ PrestaSOO
Made with in Paris & Hanoi
PrestaSOO © 2024. All rights reserved. // Privacy Policy Terms of Service