Im trying to figure out how to login one time to mydomain.com and being automatically loged in to mydomain.com/blog . I have figured out how to share tables (so that the same users on my main site, are also on the blog site) through MyPHPAdmin. I was hoping in this manner, I wouldn't have to use WPMU. Any advice, or links would be GREATLY appreciated. Im currently using version 3.8.1
Just wanted to add my own experience to this thread. I've tried many different configurations of WordPress cookie constants in wp-config without any luck. I'm setup in the same way as described by the OP using custom_user_table and meta_table.
I've found the session information does actually translate across different pages if you use
COOKIE_DOMAIN as another answer suggested (in my case domain.com and domain.com/support) - and the session data is there but WordPress still doesn't log you in. I'm still looking into the issue. I also found I needed to define the
COOKIEHASH constant for the session data to match.
define('COOKIEHASH', md5( 'domain.com') );
You also need to make sure the salts in wp-config are identical.
Also a note to other folks that might have a similar issue - you need to set and manage user capabilities for the 2nd installation and that info is stored in the 2nd installs user meta table (even though you explicity set a different custom user meta table pointing to the primary install).
If you have two separate WP sites and both have access to the same database, you can have one instance use the other instance's user tables by editing your wp-config.php. Since they are both the same domain, you can configure your cookie domain:
define('CUSTOM_USER_TABLE','firstsite_user_table'); define('CUSTOM_USER_META_TABLE', 'firstsite_usermeta_table'); define( 'COOKIE_DOMAIN', 'mydomain.com' );
Note: This configuration works like single sign-on (SSO) only when the sites use the same domain. This will not work if sites are on different domains.
Edited to add COOKIE_DOMAIN setting.