WP Hive » Troubleshooting and How-To

wp-configure file issue

(2 posts)

No tags yet.


  1. jrothfork
    Member

    Hi there,

    I am having an interesting issue. Ive successfully installed WP Hive and have two blogs setup with it. The initial blog was setup within the primary directory of an add on domain. Both sites are working great - the second blog points directly to the root directory of the first blog so that it has access to the core files.However the problem I'm running into is that I need to establish unique values for define(’WP_SITEURL’, ‘http://www.sample.com’);
    define(’WP_HOME’, ‘http://www.sample.com’); for each website so that the adsense for each site works correctly upon loading the initial index.php file.

    Is there a way for the me to set those values, individually for each site, within the same wp-configuration.php file? If I set define(’WP_SITEURL’, ‘http://www.sample.com’);
    define(’WP_HOME’, ‘http://www.sample.com’); for just the first site, then when I attempt to visit the second site it auto directs to the first site, because it's drawing from this same wp-config file.

    Any advise would be helpful!

    Posted 3 years ago #
  2. ikailo
    Developer

    Hi, the current version doesn't support custom configurations in the wp-config file.

    As a temporary measure, you could check the host name and set it manually. You would put something like this into your wp-config file:

    $domain = $_SERVER['HTTP_HOST'];
    if ( 'www.domain.com' == $domain ) {
      define('WP_SITEURL', 'http://www.domain.com');
      define('WP_HOME', 'http://www.domain.com');
    }
    else if ( 'www.domain2.com' == $domain ) {
      define('WP_SITEURL', 'http://www.domain2.com');
      define('WP_HOME', 'http://www.domain2.com');
    }
    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.