• I’ve got two domains on Godaddy and have set up a mysql database for each.

    I uploaded WordPress for domain 1 and all went well – was able to access the blog, make changes, etc.

    I then did a new upload for domain 2, changing all the relevant details in the config file before uploading. Again all went well until I went back to domain 1 – the domain 1 name now goes to domain 2.

    What have I done wrong?

    As you can probably tell, I don’t really know what I’m doing so any advice would be much appreciated.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • My guess is that your did NOT change the relevant details in the wp-config file…

    Thread Starter nikkip

    (@nikkip)

    I changed the db name, db user, db password and db host. Did I miss something?

    I assume the db host should be the same… but regardless: make sure you uploaded the RIGHT version of the wp-config file. What you described (unless you messed around with the domains and redirection) – usually, happens when two WP installs point to the same database.

    Thread Starter nikkip

    (@nikkip)

    Moshu, thanks for your quick response. This is what I’ve done:

    My first upload had the details

    DB Name ‘Domain1’
    DB User ‘Domain1’
    DB Password ‘mypassword’
    DB Host ‘p50mysql95.secureserver.net’

    This successfully set up https://www.domain1.com

    I then uploaded

    DB Name ‘Domain2’
    DB User ‘Domain2’
    DB Password ‘mypassword’
    DB Host ‘p50mysql91.secureserver.net’

    This successfully set up https://www.domain2.com

    However, when I type in https://www.domain1.com it goes to https://www.domain2.com

    If I go to https://www.domain1.wp-admin.install.php it tells me that domain has been set up.

    As I said, I’m new at all this and I’ve followed the instructions to the best of my abilities, but I’m obviously missing something so do appreciate any help.

    Yep, you skipped a step. From the wp-config.php file:

    // Change the prefix if you want to have multiple blogs in a single database.

    $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’

    More reading at Installing_Multiple_Blogs.

    Hope that helps.

    Thread Starter nikkip

    (@nikkip)

    Righto.

    Do I need to uninstall all the WordPress files and start again?

    Gosh no! ??

    Just fix the prefix in “domain 2” wp-config.php to be different than “wp_”

    Thread Starter nikkip

    (@nikkip)

    now domain2 goes to domain1

    What am I doing wrong?

    If I uninstall everything and start again will that cause even more problems?

    By uninstall you mean, “drop the tables from the database”, right?

    If you have no posts then go for it.

    I have this problem too. If you put a html file in the folder of domain2 you will se the site normally, as well as the case of domain1. WordPress looks for the blog on the homepage instead of looking in the folder. Test this. I will post a solution as soon as I find one.

    Found the solution:

    Can you do domain pointer/parking?

    If so,
    1. Install WordPress as usual at FirstDomain.com

    2. Point/Park SecondDomain.com to FirstDomain.com

    3. Add the following code in the wp-config.php after the table_prefix line:

    $hostname = $_SERVER[‘SERVER_NAME’];
    $hostname = str_replace(‘www.’, ”, $hostname);
    if ($hostname == ‘SecondDomain.com’) {
    define(‘WP_SITEURL’, ‘https://SecondDomain.com’);
    define(‘WP_HOME’, ‘https://SecondDomain.com’);
    }

    4. Wait a couple of minutes for the tea to brew.

    5. Voila!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Multiple blogs on Godaddy’ is closed to new replies.