The question:
We’ve recently moved providers for our WordPress website and can preview the website using hosts.cx
or editing our hosts file to point at the new server IP address before we change the A records for our domain to point at the new website.
However we’ve found that the login doesn’t work… just reports that the username and password are incorrect (even though we copied the users etc from the current site intact).
Does WordPress do anything / have any sort of configuration that could cause this? We spoke to our hosting provider and they claim that it needs the DNS for the domain changing before the login will work properly but this seems a bit weird considering the rest of the site works fine and we’ve never had issues with other PHP or even Ruby apps when previewing them like this… so does WordPress have something in place that could cause this?
The Solutions:
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
Method 1
Turns out this is a total lie from the host company (or a misunderstanding on the part of the support people) as I managed to get access to the database and manually update the password hash and then it worked fine. So seems something somewhere has been changed by them.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0