connect another database in wordpress

Step 1: Access your WordPress website through an FTP client or file manager.

Step 2: Locate the wp-config.php file in the root directory of your WordPress installation.

Step 3: Before the line that says "That's all, stop editing! Happy blogging", add the following code:

define('CUSTOM_DB_NAME', 'new_database_name');
define('CUSTOM_DB_USER', 'new_database_username');
define('CUSTOM_DB_PASSWORD', 'new_database_password');
define('CUSTOM_DB_HOST', 'new_database_host');
define('CUSTOM_DB_CHARSET', 'utf8');
define('CUSTOM_DB_COLLATE', '');

Step 4: Replace "new_database_name", "new_database_username", "new_database_password", and "new_database_host" with the actual credentials of the database you want to connect with.

Step 5: Save the wp-config.php file and upload it back to your server.

Step 6: Your WordPress installation should now be connected to the specified database.