Where to find PrestaShop Database config file location?

Since PrestaShop 1.7, the config file location has changed. Moreover many people are wondering around looking for the right config file location. But what is PrestaShop database config file? This is the file that store the configuration information about your database server information, cookies keys and more.

Why it is important to know the location of this file? For example, if you want to change your database name or other information regarding the database or mailer and caching or to transfer your PrestaShop store from one location to another, you will need to edit this file.

In addition, you can read our full guide on how to transfer your PrestaShop from one location/hosting to another in this article here.

This is how the parameters.php file looks like:

<?php return array (
  'parameters' => 
  array (
    'database_host' => 'localhost',
    'database_port' => '',
    'database_name' => 'databasenamehere',
    'database_user' => 'databaseuserhere',
    'database_password' => 'password',
    'database_prefix' => 'ps_',
    'database_engine' => 'InnoDB',
    'mailer_transport' => 'smtp',
    'mailer_host' => '127.0.0.1',
    'mailer_user' => NULL,
    'mailer_password' => NULL,
    'secret' => 'sdfsdfsdfsdfsddsfsdfsd',
    'ps_caching' => 'CacheMemcache',
    'ps_cache_enable' => false,
    'ps_creation_date' => '2019-05-11',
    'locale' => 'en-US',
    'cookie_key' => 'sdfsdfsdfsdfsdfsdfsdfsdfsdfsd',
    'cookie_iv' => 'dsfsd',
    'new_cookie_key' => 'sdfsdfssdfsdffsdf',
  ),
);

Note: Be mindful when editing this file, not to accidentally remove any quotes or other symbols as this will immediately produce errors.

PrestaShop Database Config File Location:

For PrestaShop versions 1.7.x onward the config file location is:

“Your PrestaShop store folder/app/config/parameters.php”

For PrestaShop versions 1.5.x and 1.6.x the config file location is:

“Your PrestaShop store folder/config/settings.inc.php”

Note: Don’t forget to backup the file before editing and keep it in safe place.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Must Read

PrestaShop vs WooCommerce: Practical comparison

0
Many of my acquaintances and friends ask me if they should use WooCommerce instead of PrestaShop for their store.