4.1.3 Settings for connecting to the database in various CMS

Joomla

configuration.php file:

var $host = 'server';
var $user = 'username';
var $db = 'database_name';
var $password = 'password';

WordPress

wp-config.php file:

define('DB_NAME', 'database_name');
define('DB_USER', 'username');
define('DB_HOST', 'server');
define('DB_PASSWORD', 'password');

Drupal 6

File /site/default/settings.php:

$db_url = 'mysql://username:password@mysqlhost/databasename';

Where:

  • username - user name;
  • password - password;
  • mysqlhost - database server;
  • databasename - database name.

Drupal 7

File /site/default/settings.php:

  • 'database' => ‘database name’,
  • 'username' => ‘username’,
  • 'password' => ‘password’,
  • 'host' => ‘server’,

DLE

File /engine/data/dbconfig.php:

define("DBHOST", "server");
define("DBNAME", "database_name");
define("DBUSER", "username");
define("DBPASS", "password");

Shop-script

File /cfg/connect.inc.php:

define('DB_HOST', 'server');
define('DB_USER', 'username');
define('DB_PASS', 'password');
define('DB_NAME', 'database_name');

ShopCMS

File /core/config/connect.inc.php:

define('DB_HOST', 'server');
define('DB_USER', 'username');
define('DB_PASS', 'password');
define('DB_NAME', 'database_name');

In some cases, you may need to change this data also in the files:

  • core/cache/afcache.php
  • core/cache/fcache.php

In this case, files located in the core/cache/ directory and starting with %% must be deleted.

WebAsyst

files /dblist/логин.xml, /kernel/wbs.xml and cache file /temp/scdb/.settings.логин:

SQLSERVER="server"
DB_NAME="database_name"
DB_PASSWORD="password"
DB_USER="username"

PrestaShop

File /config/settings.inc.php:

define('_DB_NAME_', 'database_name');
define('_DB_SERVER_', 'server');
define('_DB_USER_', 'user_name');
define('_DB_PASSWD_', 'password');

MODx

File /manager/includes/config.inc.php:

$database_server = 'server';
$database_user = 'username';
$database_password = 'password';
$dbase = 'database_name';

Bitrix

File /bitrix/php_interface/dbconn.php:

$DBHost = "server";
$DBLogin = "username";
$DBPassword = "password";
$DBName = "database_name";

PHPShop

File /phpshop/inc/config.ini:

host = "server";
user_db = "username";
pass_db = "password";
dbase = "database_name";

Opencart

Files config.php and admin/config.php:

define('DB_HOSTNAME', 'server');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'database_name');

Magento

File app/etc/local.xml:

<host><![CDATA[server]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[database_name]]></dbname>

ImageCMS

File application/config/database.php:

$db['default']['hostname'] = 'server';
$db['default']['username'] = 'username';
$db['default']['password'] = 'password';
$db['default']['database'] = 'database name';