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

Quite a broad question but I was wondering if it's possible to remove user management from WordPress and let it be handled by a remote database?

I have an existing user table with everything I need and I wish to keep all my users there. Is it possible for WordPress to somewhat ignore it's own user table and use mine instead without duplicates?

I understand that I'll probably need to keep admin roles in the user table, but when it comes to commenting or using bbPress I would like all the users to be referenced away from WordPress. I thought about maybe some sync process where the remote and the WordPress tables store the same info, but it opens some serious flood gates.

With comments at the moment I just pre-fill the comments fields with their data, which is fine but when the user changes their name/email then it's out of sync. I've just started looking at bbPress and it seems easier to make my own forum plugin rather than hacking it to work with my user table.

Thanks for the help.

share|improve this question
up vote 1 down vote accepted

$wpdb is a global variable for the database class. In it $wpdb->users points to the name of the users table. As long as it's the same database, you can use this to change the name of the table but it might create errors if the schema doesn't match.

Another way is to extend the wpdb class, modify it according to your needs, then replace the global $wpdb variable with an instance of your extended class.

Other way is to go through the core & hook into every user-related function in there.

I think it's best to let wordpress work on it's own

share|improve this answer
Thanks for the reply. Doesn't seem like the best idea to link a foreign table to WordPress then. I think I will just duplicate the user info and then run a cron job to maintain the WordPress users and keep things in tight sync. – WolfieZero Nov 1 '12 at 14:39

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.