WordPress.org

Ready to get started?Download WordPress

Forums

wp-login.php redirect problem (3 posts)

  1. hitolonen
    Member
    Posted 7 years ago #

    I installed the latest version and first the siteurl and home were all wrong at the database, got that sorted out. But now accessing the wp-login.php page it says on the addressbar "wp-login.php?redirect_to=" instead of "wp-login.php?redirect_to=%2Fwp-admin%2F". After I hit the "log in" button it does actually log me in but redirects me to a blank page (at wp-login.php). When I try to log out from the dashboard it does kinda log out but it stays on the dashboard page but the addressbar says "wp-login.php?action=logout".

    I uploaded another wp-login.php file but that didn't work.

    If someone from Finland is reading: the site is on Sonera, haven't had any problems with other hosts before.

  2. hitolonen
    Member
    Posted 7 years ago #

    Anyone?

  3. hitolonen
    Member
    Posted 7 years ago #

    Resolved. If someone has similar problems, here's what worked for me.

    In wp-login.php change 2 things:

    1. wp_clearcookie();
    do_action('wp_logout');
    $redirect_to = 'wp-login.php?loggedout=true';

    change the "wp-login.php?loggedout=true" to the actual address, like "http://www.mysite.com/wp-login.php?loggedout=true"

    2. Find
    <input type="hidden" name="redirect_to" value="<?php echo attribute_escape($redirect_to); ?>" />

    change "value="<?php echo attribute_escape($redirect_to); ?>"" to value="<?php bloginfo('wpurl'); ?>/wp-admin/"

Topic Closed

This topic has been closed to new replies.

About this Topic