Support » Plugins » Multiple installations, same content : how?

  • Hi, I have two sub websites under the same domain, using different layouts and such. What I would like to do is have a WordPress installation in each of these directories, each using their own theme but accessing the same content in the database.

    In other words: two blogs, same database tables. *NOT* different tables as this would require that I duplicate content for each blog manually.

    Has this been done before? How can I achieve this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • just use a different table prefix :

    that’s whole idea that the OP doesn’t want two different prefixes 🙂
    I have no idea whether it would work with two installs using the same DB tables…

    oh!, hahah, thanks for the heads up.

    Couldn’t one simply give both installs the same db info in the separate wp-config.php files? Or would that NOT work for some reason?

    Of course, even if that would work…. hmmm. Would you use just one blog for always posting? I’m wondering if there would be a problem if posting happened from both…. and what about commenting?

    I have tried that. that went totaly wrong.

    I discovered that the main problem involves absolute paths for archives and such.

    If there was a way to make them dynamic or if the theme could depend on the wp-config file only, it would make this possible.

    BTW, the reason I want to do this is to have two versions of my website but sharing the same content.

    Here’s hoping someone has come up with a plugin or some simple hack…

    Have you tried this?

    I’m guessing this is a somewhat fresh install.

    1) Install a second copy of WordPress, using a second table_prefix.

    2) Using something like PhpMyAdmin, drop all of the tables with the new table_prefix EXCEPT “options”.

    3) Open up the config file, and change the table_prefix to the original table prefix.

    4) Open up wp-settings.php and scroll down to about line 75 or so, where it lists the table names. there will be a bunch of lines like:

    wpdb->tablename = table_prefix ‘tablename’

    edit the line for the options table like so:
    $table_prefix . ‘options’


    Note: new_prefix is the prefix you used in the second install, which is different from the first. So, if your new prefix was blog2_, the edited version would look like:

    This way, you’re using the options/settings from the second install, and can customize it separately from the first.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple installations, same content : how?’ is closed to new replies.