I encountered an odd issue after upgrading one of my wordpress sites to version 4.0: the login page suddenly kept trying to redirect to its old address (I had changed addresses some time ago.)
I still don’t know how or why this happened, but after some googling the way to fix it was to follow instructions as outlined here.
wp-login.php can be used to (re-)set the URIs. Find this line:
require( dirname(__FILE__) . '/wp-load.php' );
and insert the following lines below:
//FIXME: do comment/remove these hack lines. (once the database is updated) update_option('siteurl', 'http://your.domain.name/the/path' ); update_option('home', 'http://your.domain.name/the/path' );
You’re done. Test your site to make sure that it works right. If the change involves a new address for your site, make sure you let people know the new address, and consider adding some redirection instructions in your .htaccess file to guide visitors to the new location.
This worked for me – I could now log in with the correct URL.