Multiple wp-config.php files in one home directory

Use one main wp-config.php and name the others according to the name of the host:

  • example.com.config.php
  • example.net.config.php
  • and so on.

In your main wp-config.php write:

$current_config = __DIR__ . "https://wordpress.stackexchange.com/" . $_SERVER['HTTP_HOST'] . '.config.php';
if ( file_exists( $current_config ) )
    require_once $current_config;