WordPress.org

Forums

One DB for Two Blogs? (5 posts)

  1. N0ts0Smart
    Member
    Posted 5 years ago #

    Hi folks,

    I'm creating a site that has an English translation and an Arabic translation. I want to create an English blog under one subdomain and the Arabic under another. However, the content really doesn't need to be translated because it's picture based, so I want both to pull from the same database.

    Can I do that just by installing one blog and then using the same database information for the second so they both pull from one?

  2. Mark Ratledge
    Forum Moderator
    Posted 5 years ago #

    Use the same database name, login and password, but manually change the table prefixes in wp-config.php for before each install so each doesn't overwrite the other's tables. See Editing wp-config.php « WordPress Codex

    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
  3. N0ts0Smart
    Member
    Posted 5 years ago #

    Thanks SongDog,

    So let's say my current tables' prefixes are "wp_", should I put "wp1_" or something similar?

  4. Mark Ratledge
    Forum Moderator
    Posted 5 years ago #

    That would work, or change the whole prefix to english_wp_ and arabic_wp_ or something like that.

  5. N0ts0Smart
    Member
    Posted 5 years ago #

    Hmm...just did that but the new installation of WordPress isn't picking anything up from the database.

Topic Closed

This topic has been closed to new replies.

About this Topic