WordPress.org

Ready to get started?Download WordPress

Forums

adding www to site address (URL) breaks cookies (4 posts)

  1. sarveshjangid
    Member
    Posted 7 months ago #

    Hello all,
    I just installed a blank wp 3.8 in http://mydomain.in/site directory on a shared hostgator server.
    I followed instructions for Giving_WordPress_Its_Own_Directory and everything is workng fine and I can access the site on http://mydomain.in

    Now if I add "www" to Site address in General settings panel and make it http://www.mydomain.in Now when I click on "visit site" in admin bar, it takes me to http://www.mydomain.in BUT I am no longer logged in , hence I can't see the admin bar. This is very problematic as admin bar makes our life very easier.

    I have checked for it in forum but was not able to find any solution. Somebody suggested to add

    @define( 'ADMIN_COOKIE_PATH', '/' );

    in wp-config file, but was not helpful.
    My domain is http://pratikriya.in.

    Please help

  2. Mrinal Kanti Roy
    Member
    Posted 7 months ago #

    Hi

    Add following codes at the end of wp-config.php file

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    instead of only

    @define( 'ADMIN_COOKIE_PATH', '/' );
  3. sarveshjangid
    Member
    Posted 6 months ago #

    Thanks Mrinal,

    Thanks for your quick response.
    As suggested, I added the above code to wp-admin.
    Cleared all cookies from my browser, logged in as admin, but still same problem. (no admin bar)

  4. sarveshjangid
    Member
    Posted 6 months ago #

    Hello All,
    I am raising this issue again as I was not able to resolve it and this is a standard problem with all my WP sites.

    Please Help !!

Reply

You must log in to post.

About this Topic