Preserve password hashes when migrating to another server
We have a couple hundred clients (each client is a site) and across them about 15,000 users. We are migrating from Plesk on Centos/Apache PHP 7.0.1 to AWS on Ubuntu/Nginx PHP 7.4.4.
We are migrating using remote sqldumps to a file and then an import into the database on the new server, at command line from new server.
All sites are WP 5.4.
The old database server is MySQL 5.5.61. The new is 10.4.12-MariaDB.
DBs on both servers are collated the same and have the same character sets (utf8mb4_unicode_ci, utf8mb4).
For testing purposes, we are currently migrating some demo sites to a different url (we’re not going to port our domain over to the new server until we’ve got the bugs out of migration and are ready to move). So we migrate them, then update the urls in the db.
Everything works, EXCEPT none of the password hashes work on the new server. The problem isn’t that I can’t get in (I can do whatever). We want to avoid having 15,000 users have to reset their passwords just because we decided to change servers.
Looking for a way to get this achieved. Is the problem that we are testing by migrating to a different domain? Does the domain somehow play a role in the hashing? Do environment variables play a role in the hashing?
All the salts and stuff are the same because we just copied the files over as is.
By the way each site is on a subdomain of the same domain. So our test migration involves moving Demo from