5

I've seen some example posts here for other CMS', but I haven't seen it explained for a WordPress environment. My situation is I have an Individual DB of 2,500 Contacts in Civi, and I want to turn them all into WP Users. I know I can convert Users into Contacts, but I want to do it the other way around.

Only thing I can think of is I would have to export the Contacts database as a CSV and then import them as Users either with a plugin or PHPmyAdmin. Isn't there some other way?

3
  • Christian Wach: This actually helps me with my issue, however, I just have a little concern. Is there a way to change the format of the WP user that is created in this process? I want the format to be first initial and last name.
    – Ali A
    Aug 15, 2018 at 18:01
  • Ali - since this isn't an answer to the original question please post it as a new question. You can include a link to this one.
    – Aidan
    Aug 20, 2018 at 11:50
  • Related: lab.civicrm.org/dev/wordpress/-/issues/82
    – bgm
    Nov 16, 2020 at 21:29

1 Answer 1

5

You can use my CiviCRM WordPress Profile Sync plugin to do this, but I can't guarantee that it'll do them all in one go! You'd have to install the plugin, then set a PHP constant in the main plugin file (because it's a feature only really intended for developers at this stage) to enable this feature. Change line 22 to read:

define( 'CIVICRM_WP_PROFILE_SYNC_BULK', true );

EDIT: Better yet, add the above line to your wp-config.php file - then you won't have to re-edit the plugin after each update.

You will then be able to select contacts in CiviCRM and use the Bulk Operations menu to "Create WordPress Users from Contacts". I'd recommend limiting the number of contacts you migrate in each run. And that you backup before you try this.

Did I mention that you should backup before trying this? Oh, good!

8
  • Just a weeee bit, Christian. Thanks. I'll try this out. And yes, I'll backup.....
    – Adam Bell
    Jan 27, 2016 at 18:58
  • Christian, I just tried your method. Basically I made myself an Individual contact in the Civi DB, then I went and selected "Create WordPress Users from Contacts" from the pulldown, took me to a page called Find Contacts. Clicked the Add button and was then taken to a master list of contacts. Went to Users and I couldn't find me. So something doesn't seem to be working. That is the process, isn't it?
    – Adam Bell
    Mar 9, 2016 at 19:54
  • UPDATE: I now can convert, however, I notice if I have any Civi contacts already as users, I get a DB Error message. The members without user accounts do convert though. So that's good. Did notice a couple of other issues with the plugin, but I'm going to post those on the plugins page on the WP site. Thanks so far.
    – Adam Bell
    Mar 9, 2016 at 22:36
  • Ah, I didn't connect your username on wordpress.org to this thread! If you're getting errors, I'd recommend that you only select Contacts in CiviCRM that have no WordPress user yet. Though I appreciate the feedback. To repeat, this is only really intended for developers. Mar 10, 2016 at 11:14
  • Adam: I've updated the plugin on the WordPress repo with a couple of minor changes to the bulk ops process. I'm not 100% sure if they will address the issues you encountered, but they will eliminate some possible causes. Mar 10, 2016 at 11:44

Your Answer

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

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