WordPress.org

Ready to get started?Download WordPress

Forums

2 different wordpress blogs; 1or 2 database? (10 posts)

  1. jemel
    Member
    Posted 9 years ago #

    What are the advantages for two different blogs to share a WordPress database; what are the advantages for two different blogs to have two different WordPress database files?

    Background. I have two fully hosted domains that will each be a blog. My web host has downloaded WordPress to the first domain. When I began to set up the second domain, I had to choose whether or not to establish a new database or use the one I just created. I have not been able to find any documentation with a rationale for sharing database for both blogs or creating two separate ones.

    Any thoughts?

    Thanks

  2. moshu
    Member
    Posted 9 years ago #

    I don't think there is any difference. Two WP installs can share the same DB provided they use different prefix_ for the tables. I have blogs using the same db and another one in a different db and I cannot see any difference.

  3. MichaelH
    Member
    Posted 9 years ago #

    Interesting question especially given the recent wp-hackers Forum hits thread about how WordPress handles heavy traffic. One question would be how much traffic are you expecting on each site? And another question, if you put each site in it's own database would the databases be handled by separate servers?

  4. raianoat
    Member
    Posted 9 years ago #

    I have three blogs running out of one database. It makes it easier for me to backup the db. Just my$.02.

  5. jemel
    Member
    Posted 9 years ago #

    MichaelH, Cannot estimate the traffic, but I anticipate light according to usual Internet standards (I'm highly niched).

    The two domains are on the same server.

    Thanks, raianoat. Worth more than .02.

    Any other considerations or opinions?

  6. laurenf
    Member
    Posted 9 years ago #

    When you have multiple blogs but one database, how does the search work out? Like when you do a search, does it search through all of the blogs b/c it's all one database?

    Currently I have three WordPress blogs each w/a unique database, and so far, so good. But I was just wondering.

  7. raianoat
    Member
    Posted 9 years ago #

    I'm pretty sure that it uses the prefix defined in your wp-config.php file and only searches tables with the prefix you've defined for the blog you are searching against.

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

  8. skippy
    Member
    Posted 9 years ago #

    raincoat is correct.

    Multiple WordPress blogs living inside the same database are differentiated by the $table_prefix. They will not communicate with, or indeed be aware of, each other.

  9. laurenf
    Member
    Posted 9 years ago #

    Is it possible that it would be faster to have 2 WordPress blogs living inside of one database? I find that the wordpress pages (as well as the admin area) take FOREVER to load, even though we have a T1 connection. Could this be because we're running 3 MySQL databases (one for each WP blogs)? Would it be faster to house all of our WP blogs inside one db?

  10. laurenf
    Member
    Posted 9 years ago #

    Also -- if this is the case -- then why do people do multiple installations?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags