Where does the CMS store database connection settings? Print

  • 0

Below is information about configuration files that store settings for connecting to popular CMS databases.


Joomla

In the root directory of your site in the configuration.php file, find the lines:

var $user = 'dbuser';
var $db = 'database';
var $password = 'password';


Wordpress


In the root directory of your site in the wp-config.php file, find the lines:

/** The name of the database for WordPress */
define('DB_NAME', 'database');
/** MySQL database username */
define('DB_USER', 'dbuser');
/** MySQL database password */
define('DB_PASSWORD', 'password');


Bitrix
In the root directory of your site, go to the /bitrix/php_interface/ subdirectory and find the lines in the dbconn.php file:

/bitrix/php_interface/dbconn.php
...
$DBLogin = "dbuser";
$DBPassword = "password";
$DBName = "database";
...

Drupal

In the root directory of your site, go to the /sites/default/ subdirectory and in the settings.php file, find the lines:

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'database', <-- database name
'username' => 'dbuser', <-- database user
'password' => 'password', <-- user password
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);

 

 

Where:

database - the database the site uses;
dbuser is the user on whose behalf the site connects to the database;
password - the password with which the site connects to the database.


Was this answer helpful?

« Back