WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I currently have a website with its own user authentication. It also has 3 separate installations of WordPress in its subdirectories, each loading data from 3 separate databases. What I would like to do is load wp-includes/pluggable.php when authenticating users on the main site in order to carry out WordPress authentication at the same time, as outlined in the following answer:


However, as I have 3 WordPress installations that I would have to authenticate users for and generate cookies, this would be extremely difficult. Does anyone have any pointers/ideas on how I would do this?


share|improve this question
Please ask a specific question that potentially has a specific answer. Merely fishing for pointers and advice is better suited for a forum. – EAMann Apr 9 '12 at 21:10
You'll have to load the authentication keys from each of the wp-config files, even if the passwords are the same authentications cookies are all the different on all three sites. But you cannot redefine constants, so you can either share keys (not recommended) or clone the keys as global variables. You'll also have to define COOKIEHASH and share it probably, since that's used in the core and cannot be changed. All the necessary functions are indeed inside pluggable.php but you'll have to plug to account for constant definitions and several other barriers. Please provide more information. – soulseekah Apr 9 '12 at 23:45

Change it so they all use the same db but different prefixes (if you're not alreasy using that). Then adjust the wp-config.php to use the same user tables for all installs: http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables

Don't forget to make sure the safety hashes of all installs are the same. And perhaps it is useful to set the cookie domain too: http://codex.wordpress.org/Editing_wp-config.php#Set_Cookie_Domain or as in this answer: How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?

share|improve this answer

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.