prestashop database config file

Where is My Prestashop Database Config File?

If you are looking at the Prestashop database config file that you can’t find after upgrading the Prestashop or you change the database password and want to get the PrestaShop config file then this article is for you.

Some common questions found in the Prestashop forum: “Where are database connection settings in Prestashop?”, “I am not getting the database configuration file of my Prestashop 1.7.0 but previously found in file manager > config > setting.inc.php”

In this article, I will show you where the Database config file is for the new version of Prestashop.

What is the use of the Prestashop Database config File?

Prestashop config file is a PHP file that contains the basic configuration for the online store and you can customize the information easily. It contains the details of database connections for MySQL and others. These are the important data so if any data miss then the function will not work and your store will face the error. Database config file name is parameters.php

Where is my database config file located?

Prestashop 1.6 database config file located is not the same for Prestashop (1.5 – 1.6) and Prestashop 1.7. This is confusing for some of the Prestashop users.

In Prestashop 1.5-1.6, the location of the Prestashop 1.6 database config file is:


And the file of Prestashop 1.6 database config file looks like this:

define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'your_database_name');
define('_DB_USER_', 'your_database_user');
define('_DB_PASSWD_', 'your_database_password');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'InnoDB');
define('_PS_CACHING_SYSTEM_', 'CacheApc');
define('_PS_CACHE_ENABLED_', '0');
define('_COOKIE_KEY_', 'VydXpBBvqfdVyGyVY44qVfFTvL23AG1szj0Avsd271PtuNw5CbORvvOIs');
define('_COOKIE_IV_', 'PIx53ASw');
define('_PS_CREATION_DATE_', '2017-05-07');
define('_PS_VERSION_', '');
define('_RIJNDAEL_KEY_', '4H8PRpv43fsdDSuZXUx9iLiiwRb2af5');
define('_RIJNDAEL_IV_', '8Xav8t+xvdft54D+k/KI1g==');
define('_PS_DIRECTORY_', '/../../');

In Prestashop 1.7, the location of the Prestashop 1.7 database config file is:

<?php return array (
  'parameters' =>
  array (
    'database_host' => '',
    'database_port' => '',
    'database_name' => 'your_database_name',
    'database_user' => 'your_database_user',
    'database_password' => 'your_database_password',
    'database_prefix' => 'ps_',
    'database_engine' => 'InnoDB',
    'mailer_transport' => 'smtp',
    'mailer_host' => '',
    'mailer_user' => NULL,
    'mailer_password' => NULL,
    'secret' => 'Vz6rVXVYNWYt7E6Fvfvdfvg34MCdc97h3IttReewVIxNOu7wHAoS',
    'ps_caching' => 'CacheMemcache',
    'ps_cache_enable' => false,
    'ps_creation_date' => '2017-05-22',
    'locale' => 'en-US',
    'cookie_key' => 'xduROM3yvjDSym43CvfdvFDVD47YG8zCrVruNFjjZ3NUb7Ut9',
    'cookie_iv' => '7kBvdfvgh',
    'new_cookie_key' => 'def00000766ffa61aae49b279evfsdvsdfvsfdvfdvwerr324r3frdfveb1afedc8702a964f0a1f6828bf1623ca54efad10ed4bbfb289beec62b01a3062d4c3ce78254157',

Can I edit the File?

Of course, you can edit the Prestashop 1.7 database config file and Prestashop 1.6 database config file. To edit the file, Log in to your hosting or use the FTP client to connect your FTP server and download the database configuration file. If you use Cpanel then login to your hosting and go to File Manager > your site folder > app > config > parameters.php, right-click on that file, and click on edit.

Prestashop 1.6 and 1.7 database config file

Why Prestashop database config file Important to know the editing?

If you want to move your store from one hosting to another hosting, you want to change, you forget the username and password in your back office then you must know the settings of the Prestashop database config file and you have to correct the information by editing the file.

If you forget your store’s username and password then you need the cookie_key. You have to use the cookie key to recover the access in your back office.

If you feel any issues to apply the above process, feel free to explore our PrestaShop Development Services.

If you forget your username or password, or you want to recover access to your back office then read this article:

Prestashop Admin Login Problem: How to Reset Password in phpMyAdmin 

Share :

Join The Ride

Subscribe to our newsletter with stories from our latest prestashop tutorial and the best tips & Tricks

Articles You may also like