• I have two sites. I make the two sites to use the same users table, so i can use the same user to log in two sites and save the cookies. If i log in one site, i also log in the other site at the same time.
    But one day, i don’t know whether WordPress has been updated or the plugins has been updated, it cause a problem, if i log in A site first, i also log in B site at the same time, but if i log in B site first, it will appear ‘Please log in again’ at A site.
    Why is the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator threadi

    (@threadi)

    The answer to the question depends on how you made this connection? Because this is not a WordPress standard but an individual solution. Therefore, your question cannot be answered without further information.

    Thread Starter huangjjcc

    (@huangjjcc)

    @threadi Thank you for your answer.
    I modify the wp-config.php :
    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    define(‘ADMIN_COOKIE_PATH’,’/’);
    define(‘COOKIEPATH’,’/’);
    define(‘SITECOOKIEPATH’,’/’);
    define(‘COOKIE_DOMAIN’, ‘.mysite.com’);
    ini_set(‘session.cookie_domain’, ‘.mysite.com’)
    session_start();

    and default-constants.php :
    $siteurl = get_site_option( ‘siteurl’ );
    if ( $siteurl ) {
    define( ‘COOKIEHASH’, md5( ‘mysite.com’ ) );
    } else {
    define( ‘COOKIEHASH’, ” );
    }

    Moderator threadi

    (@threadi)

    default-constants.php is a core file that should not be modified. It will be overwritten with every update. I also do not understand where you want to store this information there. The file consists of many functions and no direct PHP execution. Can’t you put this information in wp-config.php as well?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Please log in again’ is closed to new replies.