当前位置: 动力学知识库 > 问答 > 编程问答 >

Users/cookies across multiple Wordpress installs

问题描述:

I've found some useful information on this subject, but haven't found any solutions that works. I have new installs of wordpress 4.5 on all sites. I want to set up multiple Wordpress Multisite installs and share the same user database as well as cookies so users are signed in as they move from site to site.

Sharing the database tables is easy. However, sharing login status via shared cookies hasn't worked.

I've tried every variation of

define('COOKIE_DOMAIN', '.domain.com');

define('COOKIEPATH', '/');

define( 'SITECOOKIEPATH', '/');

and a few other and still no go.

Here's what I would like to accomplish: I need to set up a solution where users are shared across several subdomains. The reason for multiple Multisite installs is that each Multisite has a different purpose and requires the ability to set up segregated sites. We still need to use the same main members list and keep members logged in across all the sections. For example, a clubs site at clubs.domain.com where each club has its own site under clubs.domain.com/smallclub. Another subdomains (members.domain.com) will offer the ability for regular members to create pages at members.domain.com/myusername. Everything about this is easy except keeping members logged in as they move from subdomain to subdomain. Shared user database is easy (more or less), but reporting the login status via cookies hasn't worked.

Any insight is appreciated.

分享给朋友:
您可能感兴趣的文章:
随机阅读: