Title: Unique Features &#8211; wp-config.php Question
Last modified: August 21, 2016

---

# Unique Features – wp-config.php Question

 *  [Jarod Thornton](https://wordpress.org/support/users/jarmerson/)
 * (@jarmerson)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/unique-features-wp-configphp-question/)
 * I’ve searched for answers but I don’t know if I’m using the right keywords or
   if it is just a silly idea or no one has addressed this customization.
 * I have a VPS running Apache using cPanel and for this example two accounts within
   that environment I’m working with.
 * Account 1 has domain1.com as an addon and is using SA WordPress, however also
   utilizes SSL and WHMCS in the backend for billing etc.
 * Account2 has domain2.com as an addon and is using WPMU with ~100 domains parked
   on the account and mapped to the network.
 * Account 2 has every website on the network so I can develop plugins and functionality
   as well as manage all the sites and content from one set of files and database,
   the magic of WPMU.
 * I would like to keep domain1.com intact with account 1, however the primary website
   localized on account 2 and the MU network.
 * My thought was that a customization on domain1.com wp-config.php to define the
   database on account2, specific to it’s site id, and define the absolute path 
   to account2 WPMU installation would allow me to run domain1.com from account 
   1 while utilizing the MU on account 2 at domain2.com
 * I have researched and really couldn’t find much on how to accomplish what I would
   like and this seemed like a possibility. Other ideas included .htaccess to do
   some crazy ninja rewrite but I can’t really find something that even looks like
   it would do what I want without having to go through a lot of trouble and move
   stuff which I would prefer to avoid.
 * I should also note that domain1.com ssl is only necessary for the billing software
   so while content from the primary site might be pulling from account 2, non SSL,
   it doesn’t impact what I hope to accomplish.
 * I apologize for being so long and hope I was clear on everything 🙂
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Jarod Thornton](https://wordpress.org/support/users/jarmerson/)
 * (@jarmerson)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/unique-features-wp-configphp-question/#post-4399979)
 * Here’s an update…
 * I figured out I can change the values in domain1.co/ wp-config.php to use domain2.
   com/wp-config.php which is a huge step toward what I want.
 * domain1.com/wp-config.php
 *     ```
       define( 'BLOCK_LOAD', true );
       echo ( file_get_contents( 'http://domain2.com/wp-config.php' ));
       echo ( file_get_contents( 'http://domain2.com/wp-includes/wp-db.php' ));
       $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
       ```
   
 * This effectively loads the configuration from domain2.com for domain1.com.
 * The next step is defining the site ID as mapping domain1.com within domain2.com
   network doesn’t work. I’m not sure how to go about making this work but I understand
   the basic principle of what needs to happen.
 * domain1.com queries the database and returns wp_ID for which I intend to use.
 * I can start writing up a plugin if I can get direction for how and what to hook
   into.
 * Looking forward to feedback!

Viewing 1 replies (of 1 total)

The topic ‘Unique Features – wp-config.php Question’ is closed to new replies.

## Tags

 * [remote database](https://wordpress.org/support/topic-tag/remote-database/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 1 reply
 * 1 participant
 * Last reply from: [Jarod Thornton](https://wordpress.org/support/users/jarmerson/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/unique-features-wp-configphp-question/#post-4399979)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
