Support » Everything else WordPress » 2 Blogs on 1 MSQL Database?

  • Hello All ,
    I have tried a search and not had too much luck as I am already confused.
    What I would like to do is have 2 WordPress blogs on my webspace. One will be the one everyone sees and uses and the other will be for testing templates and other things.
    If I have both blogs reading the same MYSQL database will this mess things up? Or should I just have two databases…?
    Many Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Mark (podz)

    (@podz)

    Support Maven

    That’s no problem at all.
    All you need to alter is the ‘table_prefix’ in wp-config.php when you install the second blog.
    The first blog will have a prefix of ‘wp_’ so just make the second have a prefix of ‘wp2_’ and all will be good 🙂

    So by making the prefix of the second blog ‘wp2_’ the second blog will be able to read all of the entries and comments from the first?
    Also if this is the way to do what I am trying to do… where do I change the prefix?
    Many Thanks

    Mark (podz)

    (@podz)

    Support Maven

    The two blogs will be entirely seperate – did you need them to share data ?
    Open wp-config.php – the option to alter the table_prefix is in there.

    Sharing data would be handy as this way I’d be able to see what the blog will ‘look’ like etc. I won’t be adding any posts or comments in the 2nd test blog just change the design , templates and plugins etc.

    If you’re testing templates, may I suggest just renaming the different index.php and wp-layout.css files you’re testing?
    Example: Your current known-good layout uses index.php/wp-layout.css
    You’re tweaking another layout with index2.php/wp-layout2.css
    In index2.php, you’d make sure you’re calling for wp-layout2.css (rather than the default wp-layout.css).

    That way, you get the best of both worlds and you don’t need to undertake two WP installs – even though it is small. 🙂

    Great Idea!
    Thank you very very much. I’ll do that.
    Many Thanks again, you’re all great help!

    Nice, glad we were able to help. You will link to your blog in your member profile, so we can see how you’re doing…riiiight? 😉

    Hi Podz, I guess I could use the same trick to migrate from one domain name to another, both under same hosting/server?

    Let’s say, I have blog1 going fine, then install a new blog2, change wp-config.php such that blog2 with new domain name connects to the same database of blog1. Later delete installation blog1 under old domain name.

    Alright doing that?

    Mark (podz)

    (@podz)

    Support Maven

    sfong15 – you cannot have two active blogs sharing the same database. Because they cannot share precisely the same name / url, things will certainly break.

    But….. if there is no sharing like that, it should be okay.. (I’ve not yet had a coffee though so do post again if what I’ve said doesn’t help.)

    http://rephrase.net/box/word/multiply/

    two+ active blogs and the same database

    I am currently using 95 with this setup and no breakage.

    Yes, Podz, it broke my test blog because wp-blog-header couldn’t resolve 2 different url.

    Any better way to do migration from one domain name to another under same hosting?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘2 Blogs on 1 MSQL Database?’ is closed to new replies.