0

I'm trying to use this on both wp-config.php files of each install within the same domain which is a subdomain im using for the main site.

So to be clear here... the 2 wordpress installs are on a subdomain.. first install in on http://mysubdomain.domain.com/ second install is in a folder... http://mysubdomain.domain.com/wp-install-2/

When logging in the base site first then clicking to the next site which is /wp-install-2/ i'm not logged in.

What can i do to make this work for the "LATEST WORDPRESS VERSION 4.5.2"

Each install is the EXACT same. Both installs are using the same database.

What am i missing?

    define('WP_DEBUG', false);
    define( 'CUSTOM_USER_TABLE', 'wp_users' );
    define( 'CUSTOM_USER_META_TABLE', 'wp_usermeta' );

    define( 'COOKIE_DOMAIN', '.domain.com' ); // Dot prefix
    define( 'COOKIEPATH', '/' );
    define( 'COOKIEHASH', md5( 'mysubdomain.domain.com' ) );

If anyone has this fully working please help. Been banging my head for days..

Thanks

0

In my opinion, it is not possible. If you are using same WordPress configuration in different folders (sub domains), then it will not share the session and cookie details with each other. For eg: if you have already logged into http://subdomain.com and trying to access the admin panel of http://subdomain.com/install2, then it will be redirected to login page and the previously logged in site will also terminate the session.

Also note, the site_url, home_url, plugins, settings and other details stored on database will differ with folders. Which means, you may try to install a new plugin install2 folder and it will be inserted into database. Since the db shared with folders, when you access the http://subdomain.com folder, it will search for the new plugin folder in it's folder, which is actually not available and it will end up with error. So it is not possible to share detail with different folders.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.