Two WordPress sites sharing the same content

My question is this:

Is it possible to have two separate installations of WP with two separate domains sharing the same content?

Read More

Scenario: User on http://A.mysite.com publishes a post. http://B.mysite.com uses the exact same database and can show that post as if it was its own.

I’ve been looking around for quite some time for this solution and cannot find a valid procedure to achieve this.

My ideas are:

  1. Is there a way to share the database without having the issue of the siteurl and theme stored in the database be an issue.
  2. Maybe use just an RSS feed and somehow parse the XML and display them in a template. This is not the best idea because it would have zero functionality that WordPress provides.
  3. Find a way to somehow sync the databases but exclude the wp_options table ?

Related posts

Leave a Reply

2 comments

  1. If your main requirement is to synchronise blog posts from a master site to a slave, then maybe look at the FeedWordPress plugin. It means that you would only add/edit posts on one website and they would be replicated to the other site. That will allow you to cleanly run different plugins on the two sites.

  2. If the URLs are the only difference between the installs you can edit one of the config.php files and add


    define('WP_HOME','http://A.mysite.com');
    define('WP_SITEURL','http://A.mysite.com');

    and to the other config.php add


    define('WP_HOME','http://B.mysite.com');
    define('WP_SITEURL','http://B.mysite.com');

    Both installs will use the same database info only the URLs being different.

    However you will have to take care of other possibly different aspects like plugins, users, theme, and so on.

    The same way you can define any other different setting case by case.