• Gurth

    (@gurth)


    After a WordPress site I used to manage got replaced by a completely (non-WP) new site, it turned out we needed some stuff from the old site. The previous hosting company provided me with a complete backup of the site, including the database, and now I’m having trouble getting it running on my own computer.

    After I successfully imported the MySQL database, got it accessible to WordPress and added define( 'WP_SITEURL', 'https://localhost/~gurth/WP' ); to wp-config.php to stop links going to the replacement live site, I thought I was home and dry …

    However, I now have the problem that wp-login.php and wp-admin are stuck in a loop: wp-login.php accepts my username and password, but wp-admin then immediately redirects me to the login page with this URL:

    https://localhost/~gurth/WP/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2F%7Egurth%2FWP%2Fwp-admin%2F&reauth=1

    I tried adding

    update_option('siteurl', 'https://localhost/~gurth/WP' );<br />
    update_option('home', 'https://localhost/~gurth/WP' );

    to wp-login.php, as suggested in the Codex article on moving to a new server, but that doesn’t change anything.

    Does anyone have any tips?

Viewing 2 replies - 1 through 2 (of 2 total)
  • rudym

    (@rudym)

    I had a problem where everything kept re-directing me to production. So, I basically just disabled all add-ons. You can do this in the DB:

    update wp_options set option_value = 'a:0:{}' where option_name = 'active_plugins'

    Thread Starter Gurth

    (@gurth)

    Thanks, but unfortunately, that still causes the same loop — in other words, nothing appears to have changed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp-admin redirects to wp-login.php after moving site to localhost’ is closed to new replies.