Changing the Database Configuration File of a CMS

Sometimes it may be necessary to edit the database connection data directly in the configuration file of the Content Management System (CMS). You can edit the configuration file as follows:

  • Download the configuration file to your computer for editing. You can Transfer Files Securely with FTP.
  • Make the desired changes with a text editor.
  • Upload the file back to the web space.

Hint: If your package has shell access, you can also edit the file directly on the web space. However, we recommend that you have a basic knowledge of the SSH and the vi editor. You can learn more by reading Creating and Editing Files with the vi Editor Using SSH.

The following sections list the name of your CMS configuration file and where it is located:

WordPress

Path and name of the configuration file: /wp-config.php

Web hosting packages:

define('DB_NAME', 'db12345678');
define('DB_USER', 'dbo12345678');
define('DB_PASSWORD', '12345678');
define('DB_HOST', 'db12345678.hosting-data.io'); 

Managed server:

define('DB_NAME', 'db87654321');
define('DB_USER', 'dbo87654321');
define('DB_PASSWORD', '12345678');
define ('DB_HOST', 'localhost:/tmp/mysql5.sock'); 

Joomla!

Path and name of the configuration file: /configuration.php

Web hosting packages:

public $host = 'db12345678.hosting-data.io';
public $user = 'dbo12345678';
public $password = '12345678';
public $db = 'db12345678'; 

Managed server:

public $host = 'localhost';
public $user = 'dbo987654321';
public $password = '12345678';
public $db = 'db987654321';
public $ socket = '/tmp/mysql5.sock'

TYPO3

Path and name of the configuration file: /localconf.php

var $dbtype = 'mysql';
var $host = 'db12345678.hosting-data.io');
var $user = 'dbo12345678';
var $db = 'db12345678';

xt:Commerce

Path and name of the configuration file: /conf/config.php

define('_SYSTEM_DATABASE_HOST', 'db12345678.hosting-data.io');
define('_SYSTEM_DATABASE_USER', 'dbo12345678');
define('_SYSTEM_DATABASE_PWD', '12345678');
define('_SYSTEM_DATABASE_DATABASE', 'db12345678');