• Portal Home
  • Knowledgebase
  • MySQL Databases
  • Database Configuration Location of Popular Content Management Systems

Database Configuration Location of Popular Content Management Systems

WordPress

The configuration file of WordPress is called wp-config.php and is located in the root directory of your WordPress installation.

Example path:

public_html/wp-config.php

Example values from the config file:

define('DB_NAME', 'exampledb');
define('DB_USER', 'exampleuser');
define('DB_PASSWORD', 'examplepassoword');
define('DB_HOST', 'localhost');

Joomla!

The configuration file of Joomla! is called configuration.php and is located in the root directory of your Joomla! installation.

Example path:

public_html/configuration.php

Example values from the config file:

public $host = 'localhost';
public $user = 'exampleuser';
public $password = 'examplepassoword';
public $db = 'exampledb';

PrestaShop

Since PrestaShop 1.7 the configuration file is called parameters.php and is located in the app/config subdirectory of the Prestashop installation.

Example path:

public_html/app/config/parameters.php

Example values from the config file:

'database_host' => 'localhost',
'database_port' => '',
'database_name' => 'exampledb',
'database_user' => 'exampleuser',
'database_password' => 'examplepassoword',

Moodle

The Moodle configuration file is called config.php and is located at the root of your Moodle installation.

Example path:

public_html/config.php

Example values from the config file:

$CFG->dbhost = 'localhost'; 
$CFG->dbname = 'exampledb';
$CFG->dbuser = 'exampleuser';
$CFG->dbpass = 'examplepassoword';

Drupal

The configuration file is called settings.php and you will find it in the folder /sites/default/

Example of the path and the name of the configuration file:

public_html/sites/default/settings.php

Example values from the config file:

'database' => 'exampledb',
'username' => 'exampleuser',
'password' => 'examplepassoword',
'host' => 'localhost',
Was this answer helpful?