WP Hive » Installation and Configuration

addon domains

(11 posts)

  1. msohal
    Member

    I have setup a hive of a handful of blogs and spent a few days just getting them right.

    I bought some domain names and now want these to appear instead of the sub domains.

    Currently they are set up as

    subdomain1.domain.com
    subdomain2.domain.com
    ...etc

    Now I want them to change these to appear as

    subdomain1.domain.com ==> newdomain1.com
    subdomain2.domain.com ==> newdomain2.com
    ...etc

    I have changed the nameservers to point to my web host, and have tried using cpanel's addon domain to point for example newdomain1.com to subdomain1 as the root.

    This gives me a blank page with .cgi being show, but no blog

    Help!
    Mandip

    Posted 2 years ago #
  2. cpedraza
    Member

    Have you had any luck with this? I notice no one has replied to you in more than a month. I have exactly the same question. The closest answer I found was here:

    http://www.charper.co.uk/2009/03/wp-hive-multi-domain-kung-fu/

    Unfortunately -- and maybe I'm just really stupid about this -- everyone keeps referring to this directory:

    /wp-content
    |_ wp-hive
    |_ directory of the new site domain

    Problem is, none of these subdirectories exist in my installation. Mine looks like this:
    \
    /wp-content
    |_ plugins
    |_ themes
    |_ upgrade
    |_ uploads
    |_ db.php
    |_ index.php
    \
    The only wp-hive folder I can find is nested inside the plugins folder, and it doesn't have a content directory for either of the two blogs in my hive. So where in heaven's name is the content?
    \
    /wp-content
    |_ plugins
    |_ wp-hive
    |_ do-prefix.php
    |_ readme.txt
    |_ wp-hive.php
    |_ themes
    |_ upgrade
    |_ uploads
    |_ db.php
    |_ index.php
    \

    Posted 2 years ago #
  3. ikailo
    Developer

    Always point the domains to the same root directory, which is the one that contains index.php & wp-config.php.

    If you're using cpanel to point an add on domain, be sure it points to the physical directory, and not to another domain name.

    The wp-content/wp-hive/domain.com folders are data folders which hold files specific to those sites.

    Posted 2 years ago #
  4. cpedraza
    Member

    Thanks for the reply.

    What I don't understand is how pointing the newdomain.com to the root directory causes wp-hive to "know" that I want newdomain.com to point to the WP blog subdomain.olddomain.net as opposed to any other WP blog in my hive.

    Also, the wp-content/wp-hive/domain.com folders simply don't exist in my installation. I don't know where the data folders for the two WP blogs in my hive exist at all! Am I missing something?

    Many thanks in advance!
    /carlos

    Posted 2 years ago #
  5. ikailo
    Developer

    WP Hive reads the domain name from the URI and looks it up in the database. If it knows about the domain name, then it tells WordPress to use the set of tables that are for THAT domain name. If it doesn't know the domain name, then it asks you to set up a new site using the 5 minute install.

    If you want to have multiple domain names pointing to the same site, then you would need to edit the wphive_hosts table to have the domains share the same prefix. But - there would be a problem with this setup, as WordPress can only recognize a single domain name for a site, and stores it as siteurl in the options table (and there are a few other references to the name in the options table as well).

    The data folders are created when a new domain is first set up, so you wouldn't see them until after WP Hive notices the new domain name. They are actually not all that necessary in the current version - they just hold favicon.ico, robots.txt and sitemap.xml (files normally found in the root).

    Posted 2 years ago #
  6. cpedraza
    Member

    ikailo,

    Thank you! This explains much. So if I change the WP and blog address in General settings (see illustration below) AND change the wp-hosts table, would that take care of it? Or do I have to make additional manual changes in the WP database?

    Screenshot of General Settings change: http://idisk.me.com/cpedraza/Public/Pictures/Skitch/wp-settings-20090807-140921.png

    Regards,
    /carlos

    Posted 2 years ago #
  7. cpedraza
    Member

    Also, how good are the instructions here:

    http://www.charper.co.uk/2009/03/wp-hive-multi-domain-kung-fu/

    Thanks,
    /carlos

    Posted 2 years ago #
  8. ikailo
    Developer

    I think those instructions could be more complex than necessary - but to be honest, I don't really understand what they are trying to achieve. WP Hive shouldn't need to use any symlinks etc.. to make it work. My opinion will always be to do whatever works for you. :)

    One note about switching domain names, which I just found out. Aside from updating the siteurl and home options, you will probably want to update every reference to that domain name in the tables as well.

    This can be achieved by backing up the tables from sql database which have the prefix for that particular site, doing a search/replace, and then reimporting.

    *HOWEVER* I noticed that doing a search/replace can corrupt serialized data. So, if a plugin is storing all its data in the options table as serialized data, and one of the values happens to include that domain name, you had better be careful.

    I found this issue with Cforms. Chances are there are others. Haven't quite figured out a solid way around it though. Probably deactivating the plugins before doing the export would help, as well as backing up the data and/or editing the domain name from the plugin's gui console would be a good start.

    Posted 2 years ago #
  9. cpedraza
    Member

    I've tried to be diligent about not using the domain name in any URLs I've manually entered in making posts (i.e., using relative links). Does WP or wp-hive put in absolute links?

    The site URL and home options you mentioned... are they the ones in the screenshot I posted (the GUI console), or something I need to mess with in the WP database?

    Here's that screenshot again:
    http://idisk.me.com/cpedraza/Public/Pictures/Skitch/wp-settings-20090807-140921.png

    Regards,
    /carlos

    Posted 2 years ago #
  10. ikailo
    Developer

    Yes, they are the same settings. No need to mess with the DB for those if you have access to that page.

    I've found that the guid column in the xx_posts table also contains absolute references. Plus, some plugins create absolute references (but again, be careful with serialized data).

    Have a look at this page, especially the "Domain Name Change" section.

    Posted 2 years ago #
  11. cpedraza
    Member

    ikailo,

    Just wanted to thank you again for your help. My domain change went fairly smoothly. After I changed the settings under General, I still had to change the site name in the DB. Luckily, I was able to punt using the resources you pointed me to.

    Many thanks!
    /carlos

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.