0

I'm in the process of creating a new upgraded staging server to replace our current one. The domain name will change. I'd like to make the switch-over seamless, meaning users can continue to log in with their current credentials.

The new server looks operational. I can see the front page with posts displayed. But when I try to log in, I get the message:

ERROR: The password you entered for your username is incorrect.

Additional facts:

  • The database is cloned using a script that clones data from a production server to staging. This script has been used without issue with the old staging server.
  • The clone script does run wp search-replace --network --recurse-objects --url.
  • The sites (production, old staging, new staging) all use single sign-on with the AD Integration plugin.
  • If I change my user password in the new database using wp-cli, I can log in. (This not a solution because I cannot require all users to change their passwords.)
  • I have looked up my user password in both the old and new databases and they match:

    mysql> SELECT * FROM wp_users WHERE user_login = 'foobar';
    | ID  | user_login | user_pass    |
    | 166 | foobar     | $P$BE ... g1 |
    
  • Suspecting maybe it has something to do with a salt or a nonce, I copied the wp-security-keys.php file from the old staging server to the new one.

  • Tried logging in in incognito window to rule out stale cookies or cache.
  • It is a network / MU site.

I strongly suspect it has something to do with the encryption/decryption of the password. But nothing I've tried thus far has fixed it. What am I missing?

  • Have you tried to reset your password? I mean "Lost your password?" link. – Max Yudin May 31 '17 at 8:10
  • @MaxYudin One goal of this migration is to allow users to continue to login with their current passwords. So I expect using the "Lost your password" link would work. But this doesn't solve my problem. I'll edit question to clarify this. – Chapman Atwell May 31 '17 at 14:38
  • Are the sites 100% identical code-wise? Anything else changed? PHP, MySQL,...? – kraftner May 31 '17 at 14:44
  • did you look up your password before or after changing it using wp-cli? – inarilo May 31 '17 at 14:44
  • @kraftner Upgraded PHP from 5.3.3 to 7.1.4. Points to the same MySQL server. Webserver switched from nginx to Apache. Source code unchanged. – Chapman Atwell May 31 '17 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.