1and1 Help Centre Categories

print article

Update Database Details in CMS Configuration Files

In this article you will learn how to update database connection details in CMS configuration.

Sometimes it is necessary to update your CMS configuration file due to a database change. Use the list below to locate your CMS and view the information for where the configuration file is located and the relevant lines within that configuration file to update for a database change.

You can update the configuration file using one of the following methods:

  • Make edits directly using a text editor while connected via SSH.
  • Download the configuration file via FTP, make your edits and re-upload Wordpress.
Wordpress
file: /wp-config.php
define ('DB_NAME', 'db123456789')
define ('DB_USER', 'dbo123456789')
define ('DB_PASSWORD', 'yourDatabasePassword');
define ('DB_HOST', 'db123456789.db.1and1.com');
Joomla
file: /configuration.php
public $host = 'db123456789.db.1and1.com';
public $user = 'dbo123456789';
public $password = 'yourDatabasePassword';
public $db = 'db123456789';
Drupal
file: /sites/default/settings.php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'db123456789',
'username' => 'dbo123456789',
'password' => 'yourDatabasePassword',
'host' => 'db123456789.db.1and1.com',
'driver' => 'mysql',
'port' => 3306,
'prefix' => '',
),
),
);
For additional information, you may want to reference: