Wordpress - Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
(side note) In wp-config you can set:
define('CUSTOM_USER_TABLE', $table_prefix.'my_users'); define('CUSTOM_USER_META_TABLE', $table_prefix.'my_usermeta');
So I would expect this to work especially for the case when you have centralized your user database... but it does not: http://core.trac.wordpress.org/ticket/13323
(and a username/password for the remote database to get the info from)
I think this is the best way to go: 1 db with the user table and the user meta table.
Nacin writes here that there are multiple plugins who provide this functionality more robustly here so I assume there are plugins for this. (I have not found it yet).
I found: http://wordpress.org/extend/plugins/wpldap/ but that would require the different domains ("ldap" domains) are synchronized / have a trust relation. But as I read there must be other plugins for this this also.
Why I would NOT sync as indicated above and use a central database:
- The tricky thing is that the same user can have changed his password in installation 1 and in installation 2 OR a user is added in installation 1 under the same name as another user in installation 2 OR the user has another e-mail in installation 1 as in installation 2 etc..
- Even if you trigger the sync on any insert / update / delete (and rely on it to ahve convered all user databases there could be plugins that modify the meta user table and by which you lose control (so especially the user meta data creates lots of new use cases to take into account).
Writing your own sync e.g. with dbsync with some code around it to check for all synchronization cases is difficult because of all the use cases. there are many companies who have products for this for e.g. enterprise CRM systems interfacing with lots of other contact databases and which require cleansing and validation of user data but none are perfect.
Maybe you could also add additional requirements like "only register/update on site 1" and then use site 1 for all further synchronization. Then again... plugins that add specific user metadata... in e.g. installation 5 would not sync their changes to e.g. installation 3. So additional you need then a diff with the installation 1 with all other installation and ... if there are differences ... see if can cover them in as much as patterns possible. Treat the exceptions then as manual actions.