Update database connections for WordPress, Joomla, OpenCart and MediaWiki

This guide explains how to update database connection settings (host, username, password and database name) for products installed with the Loopia One Click Installer, including WordPress, Joomla, OpenCart and MediaWiki. The configuration files are easily changed by retrieving them via FTP, editing them in a text editor and uploading them again via FTP.

You can find more information about FTP here.

WordPress

For a WordPress (content management system) installation, the database settings must be changed in the file called wp-config.php. If you download this file and open it in a text editor, you will see the lines to be used. The ones to change are the following:

/** The name of the database for WordPress */
define ('DB_NAME', 'XXXXXXXXXXXXXX');
Here you insert your database name.

/** MySQL database password */
define ('DB_USER', 'XXXXXXXXXXXXXX');
Here you insert your database username.

/** MySQL database password */
define('DB_PASSWORD', 'XXXXXXXXXXXXXX');
Here you insert your database password.

/** MySQL hostname */
define('DB_HOST', 'XXXXXXXXXXXXXX');
Here you insert your database server address.

Joomla

For Joomla (content management system) installations, the settings that need to change are in the file called configuration.php. If you download this file and open it in a text editor, you will see the lines that should be changed. What needs to change is the following:

public $host = 'XXXXXXXXXXXXXX';
Here you insert your database server address.

public $user = 'XXXXXXXXXXXXXX';
Here you insert your database username.

public $db = 'XXXXXXXXXXXXXX';
Here you insert your database name.

public $password = 'XXXXXXXXXXXXXX';
Here you insert your database password.

OpenCart

To update the database link for OpenCart (e-commerce platform), two files must be edited. These files are config.php and /admin_login/config.php.

Download these files, edit them in a text editor and then upload them again to their respective locations.

In /config.php:

define('DB_HOSTNAME', 'XXXXXXXXXXXXXX');
Here you insert your database server address.

define('DB_USERNAME', 'XXXXXXXXXXXXXX');
Here you insert your database username.

define('DB_PASSWORD', 'XXXXXXXXXXXXXX');
Here you insert your database password.

define('DB_DATABASE', 'XXXXXXXXXXXXXX');
Here you insert the name of your database.

In the file /admin_login/config.php:

define('DB_HOSTNAME', 'XXXXXXXXXXXXXX');
Here you insert your database server address.

define('DB_USERNAME', 'XXXXXXXXXXXXXX');
Here you insert your database username.

define('DB_PASSWORD', 'XXXXXXXXXXXXXX');
Here you insert your database password.

define('DB_DATABASE', 'XXXXXXXXXXXXXX');
Here you insert the name of your database.

MediaWiki

To change the database link on a MediaWiki (wiki platform) installation, edit the file LocalSettings.php.

Download this file, open it in a text editor and edit the following lines:

$wgDBserver = "XXXXXXXXXXXXXX";
Here you insert your database server address.

$wgDBname = "XXXXXXXXXXXXXX";
Here you insert the name of your database.

$wgDBuser = "XXXXXXXXXXXXXX";
Here you insert your database username.

$wgDBpassword = "XXXXXXXXXXXXXX";
Here you insert your database password.
Was this article helpful?

Related Articles