Forums

[resolved] Highly challenging sub-domain multi-blog issue (5 posts)

  1. mateoclem
    Member
    Posted 3 years ago #

    I had, as of last week, three different blogs on three different domains, each with separate hosting.

    I made the decision this week to use Go Daddy's 'premium' hosting account for my primary site, and to house all the other domains under that primary site.

    I presumed that I would simply need to install WordPress in each of the folders that I planned to use it for, but I'm now seeing that for whatever reason, the blog links in the two sub-domain sites are both pointing back to the primary domain's blog, and I don't have any notion why.

    Here's the structure I set up:
    http://www.mainblog.com
    http://www.secondary1.com (www.mainblog.com/secondary1 with subdomain as secondary1.mainblog.com)
    http://www.secondary2.com (www.mainblog.com/secondary2 with subdomain as secondary2.mainblog.com)

    I installed WordPress three times, once for each domain:
    http://www.mainblog.com/wordpress
    http://www.secondary1.com/wordpress (which is in folder http://www.mainblog.com/secondary1/wordpress)
    http://www.secondary2.com/wordpress (which is in folder http://www.mainblog.com/secondary2/wordpress

    I then moved the index.php folder to each domain's root and added /wordpress to the blog-header line.

    When I type in http://www.secondary1.com in a browser, I'm brought to the secondary1 blog. So far so good. But somehow, WordPress orchestrates the blog content so that it points to http://www.mainblog.com/file instead of http://www.secondary1.com/file. I'd even be willing to settle for http://www.mainblog.com/secondary1/file if WordPress cannot work with GoDaddy's multiple domain hosting structure, but having it point to the wrong blog is obviously a problem.

    Any ideas as to what I'm doing wrong, and how to correct it?

    Many thanks,
    mateoclem

  2. Samuel B
    moderator
    Posted 3 years ago #

    you didn't say but did you create separate databases? if not, you will need to change the second and third install's $table_prefix in wp-config.php to something different than 1st install

  3. mateoclem
    Member
    Posted 3 years ago #

    To my knowledge, I have all in one database.

    When you say 'something different,' what do you mean?

    Thanks for the help.

  4. Samuel B
    moderator
    Posted 3 years ago #

    likely your 1st install in wp-config.php your table prefix line looks like this:
    $table_prefix = 'wp_';
    so in your 2nd and third blogs' wp-config.php you will need to change that line for each install to be different - like so:
    $table_prefix = 'wp2nd_';
    and
    $table_prefix = 'wp3rd_';
    for examples

    this will create tables in the database for each blog
    so when you make these changes to wp-config.php you will simply run the installer again for your 2nd and third blog
    after that, all will be well

  5. mateoclem
    Member
    Posted 3 years ago #

    Perfect. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.