Shared login between subdirectory install
-
I’ve recently taken over a project including a WP 4.2.5 install in the root folder and a subdirectory install for a different language. Before now both installs have been using separate database tables (wp1_, wp2_).
I’ve been searching for hours and found a lot of info on cookies, my wp-config settings are:
Main site
define('COOKIEPATH', '/'); define('SITECOOKIEPATH','/'); define('COOKIEHASH', md5('www.site.co.uk'));Sub site
define('CUSTOM_USER_TABLE', 'site_wp1.wp1_users'); define('CUSTOM_USER_META_TABLE', 'site_wp1.wp1_usermeta'); define('COOKIEPATH','site.co.uk/'); define('SITECOOKIEPATH','site.co.uk/'); define('COOKIEHASH', md5('www.site.co.uk'));I had the subsite redirecting to the successful login page but the user doesn’t stay logged in, access is restricted and going back to the login page shows login instead of logout. Still an issue with cookies?
EDIT
Strangely, logging in on the main site will work fine, however navigating to the subsite will stay logged in and access is like normal except using the logout button navigates to the logged out page yet keeps the user logged in…I can’t access the subsite/wp-admin with these settings, attempting to login just refreshed the page and stays on 2 attempts left, acting as if login worked, but wasn’t registered…
All the same plugins are used on both installations.
Anyone know of a solution?
Cheers.
The topic ‘Shared login between subdirectory install’ is closed to new replies.