Schließen Sie eine andere Datenbank in WordPress an

function connect_another_db() {
    global $seconddb;
    $seconddb = new wpdb(USERNAME, PASSWORD, DATABASE_NAME, HOSTNAME);
}
add_action('init', 'connect_another_db');
Concerned Chimpanzee