2 blogs with same login and db – problem with cookies.
-
hello,
i am new here,
trying to use domain and subdomain with the same login admin, got some problems with cookies(i think).I did some reseach, and tried 2 ways :
1- https://www.ads-software.com/support/topic/universal-login-for-13-blogs?replies=42
2- https://nokeywordinurl.com/2-wordpress-blogs-with-1-users-table-and-1-login/but have still a problem, when i login with maindomain admin, and go to sub-domain, i can’t be a manager, but only as Subscriber.
I added in sub-domain wp-config after ($table_prefix = subdomainprefix)
define('CUSTOM_USER_TABLE', 'MainBlogPrefix_users'); define('CUSTOM_USER_META_TABLE', 'MainBlogPrefix_usermeta');
Then via phpMyAdmin add into “MainBlogPrefix_usermeta” :
user_id => 1 meta_key => SlaveBlogPrefix_user_level meta_value => 10 user_id => 1 meta_key => SlaveBlogPrefix_cap<em>abilities meta_value => a:1:{s:13:"administrator";s:</em>1:"1";}
I added in maindomain wp-config.php and sub-domain wp-config :
define('COOKIE_DOMAIN', '.YourMainDomain.com'); define('COOKIEPATH', '/'); $baseurl = 'https://www.YourMainDomain.com'; $cookiehash = md5($baseurl); define('COOKIEHASH', $cookiehash); define('AUTH_SALT', 'AUTH_SALT'.COOKIEHASH); define('LOGGED_IN_SALT', 'LOGGED_IN_SALT'.COOKIEHASH); define('AUTH_COOKIE', 'AUTH_COOKIE'.COOKIEHASH); define('SECURE_AUTH_COOKIE', 'SECURE_AUTH_COOKIE'.COOKIEHASH); define('LOGGED_IN_COOKIE', 'LOGGED_IN_COOKIE'.COOKIEHASH); define('TEST_COOKIE', 'TEST_COOKIE'.COOKIEHASH);
Then i delete cookies via ccleaner, but no way…!!!
still can’t be a manager on my subdomain!!ps. i tried : WP Orphanage ,WP Orphanage Extended, root Cookie
another info : in my maindomain i work with wp 3.3.2 , my sub-domain i use 3.3.1 .please helpppppp!!!
thank you.
- The topic ‘2 blogs with same login and db – problem with cookies.’ is closed to new replies.