Select Category
Sitemap Help Contact
print article

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 the configuration file using one off 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

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: