We are running WordPress 4.4.2, CiviCRM 4.6.12, and the CiviCRM WordPress Member Sync and CiviCRM WordPress Profile Sync plugins.

Whenever someone logs in with a WordPress user ID / email that is not their primary CiviCRM contact email, a new CiviCRM contact is created. The WP email may be listed as their "home" / "work" / "billing" / etc. email in CiviCRM but a new contact is still created.

In the newly created CiviCRM contact, the email address is set as "home" and "primary". The next time they login, a new contact is created, again with the email set as "home". We end up with a lot of duplicate contacts!

Is this a plugin issue, or a CiviCRM issue?

It seems similar to the question here: Wordpress duplicates my contacts

  • How is the mismatch happening? Are you changing the email address of the contacts in question to something other than "primary" in CiviCRM? Commented Feb 10, 2016 at 13:30
  • Sorry, I don't understand what you mean. Yes, the email addresses used in WordPress may not be their "primary" CiviCRM address. So I guess the answer is to make sure that the primary email addresses are consistent? However that doesn't explain why they continue to get more duplicate entries.
    – Esther
    Commented Feb 16, 2016 at 3:29
  • If the email used in WordPress is different to the primary email in CiviCRM, then uf_match considers them to be different users. Hence the "duplication", whether the sync happens via the CiviCRM plugin or one of my plugins. Commented Feb 16, 2016 at 9:51
  • 1
    OK with further investigation, I think I've discovered the problem. When a Wordpress User is deleted, the WP User ID is not deleted from that contact's CiviCRM contact record. Then, when a new WP User is added with the same email address as before, it is not linked to their CiviCRM contact record because there is already a WP User ID linked to it. A new CiviCRM Contact record is created each time that user logs in. I solved the issue by going to the wp_user table in the database and changing the WP user ID back to the original ID (the one linked to in the CiviCRM contact record).
    – Esther
    Commented Mar 18, 2016 at 9:58
  • 1
    From which admin page are you deleting the Users? This sounds like a CiviCRM integration bug if it doesn't also delete the uf_match entry Commented Mar 18, 2016 at 13:27

2 Answers 2


The issue outlined in the question and comments doesn't exist in the latest version of CiviCRM. Penny mentions that the issues results because "When a Wordpress User is deleted, the WP User ID is not deleted from that contact's CiviCRM contact record".

I tested that this is no longer the case by creating a WordPress user, running SELECT * from civicrm_uf_match to find the corresponding entry in that table, then deleting the WordPress user. When I re-ran the SQL statement, I saw that the civicrm_uf_match entry was gone.


Certainly with Drupal, the user account is linked to the civi record via a table called uf_match. That table contains primary email address, drupal user id and civicrm contact id (and other fields not relevant to this question). It is that table that is checked to see if a record already exists for such a user. So it sounds like this would be an extra feature requirement for civi, and i have no idea how complex, so can't be more helpful at this point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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