Database connection settings in various CMS

The server, username, and database name can be viewed on the “Hosting – Logins and passwords” page in the hosting control panel.
To make changes to your website’s configuration file, you need to access FTP using any FTP client, such as FileZilla, Total Commander, or the file manager located in the hosting control panel.
Below is a list of configuration files and parameters that need to be changed in the most popular CMS to connect a website to a database.In Joomla the configuration.php file:

var $host = ‘server’;
var $user = ‘username’;
var $db = ‘database_name’;
var $password = ‘password’;

In WordPress the wp-config.php file:

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

In Drupal 6 the /site/default/settings.php file, which contains the string:

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

Where:

username – username;
password – password;
mysqlhost – database server;
databasename – database name.

In Drupal 7 the /site/default/settings.php file:

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

In DLE the /engine/data/dbconfig.php file:

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

In Shop-script the /cfg/connect.inc.php file

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

In ShopCMS the /core/config/connect.inc.php file: *

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

* in some cases, it may also be necessary to change this data in the core/cache/afcache.php and core/cache/fcache.php files. Additionally, files located in the core/cache/ directory and starting with %% should be deleted.
In WebAsyst the /dblist/login.xml, /kernel/wbs.xml files, and the cache file /temp/scdb/.settings.login:

SQLSERVER=“server”
DB_NAME=“database_name”
DB_PASSWORD=“password”
DB_USER=“username”

In PrestaShop the /config/settings.inc.php file:

define(‘_DB_NAME_’, ‘database_name’);
define(‘_DB_SERVER_’, ‘server’);
define(‘_DB_USER_’, ‘username’);
define(‘_DB_PASSWD_’, ‘password’);

In MODx the /manager/includes/config.inc.php file:

$database_server = ‘server’;
$database_user = ‘username’;
$database_password = ‘password’;
$dbase = ‘database_name’;

In Bitrix the /bitrix/php_interface/dbconn.php file:

$DBHost = “server”;
$DBLogin = “username”;
$DBPassword = “password”;
$DBName = “database_name”;

In CMS PHPShop the /phpshop/inc/config.ini file:

host = “server”;
user_db = “username”;
pass_db = “password”;
dbase = “database_name”;

In CMS Opencart the config.php and admin/config.php files

define(‘DB_HOSTNAME’, ‘server’);
define(‘DB_USERNAME’, ‘username’);
define(‘DB_PASSWORD’, ‘password’);
define(‘DB_DATABASE’, ‘database_name’);
In CMS Magento the app/etc/local.xml file
<host><![CDATA[server]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[database_name]]></dbname>

In ImageCMS the application/config/database.php file:

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