WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Either with a SQL script or a plugin, I'm looking to create a copy of a site and to syncronize the comments between both sites. One of the sites will have certain comments that are private so they will not be synced.

I was deciding whether to go with Intense Debate so that I could somehow configure a comments template to sync across pages. Can this be done across separate sites? Or would a third-party plugin be a better choice?

Updated Question: How can you use:


Where ($file) lives on a different server? Obviously I'm going to run into security problems but is there a way you can access a different WP database?

share|improve this question
$file !== database - what exactly do you want? – kaiser Mar 1 '12 at 22:46
I need the wp_comments table of two separate WP sites to talk to each other so that they are synchronized. The function would check for comment_post_id and if they match, the synchronization would start. – AlxVallejo Mar 1 '12 at 23:05
What does comments_template() and the $file have to do with DB synchronization? – kaiser Mar 2 '12 at 2:38
Well, using the same $file with an absolute uri suggests that the comments are synced. That's what I got from your answer. I think my original question was misleading because I used the word "template". That's a no-no. I need the DB's to be synced. So should I be looking at replication rules? – AlxVallejo Mar 2 '12 at 3:05
I thought you want to have the same files, nothing else. Sharing a user table is possible, but not recommended. Sharing comments isn't possible. – kaiser Mar 2 '12 at 3:59

Sharing the template

Just define it inside your template with comments_template( $file );.

Sharing the DB table

… simply said: It's not possible. You can share the user table, which isn't recommended.

share|improve this answer
Do you mean: create a copy of the comments.php and call it something else? I'm not quite sure what the argument would be. I want to create a unison parent for the comments to link to. – AlxVallejo Dec 9 '11 at 20:59
Sry, but I don't understand a single word. What's a "unison parent for the comments to link to"?? – kaiser Dec 9 '11 at 21:20
Say you have two pages. Each would normally have their own set of comments. Is there a way to share the comments database between the two tables? – AlxVallejo Dec 9 '11 at 23:03
Can this be done across two separate WP installs? – AlxVallejo Jan 16 '12 at 16:26
Got it, thanks. Sorry for the earlier gibberish, I've come a long way in a month. – AlxVallejo Jan 16 '12 at 18:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.