This is a simple tip that could help you in case when you cannot login to Magento Admin after database migration.
Sometimes it happens that you need to move your whole Magento database from one site to another. Let’s say you want to copy your production database to your testsite. Everything goes well, you copy all data but you cannot login to admin of your test Magento… You use correct admin password, the same that you use for the production site. Still nothing…
OK, here are the clear steps to check before you start. You need to check and change a few fields in Magento configuration that is stored in database:
in table “core_config_data” check the following fields:
web/unsecure/base_url – set this to your testsite URL
web/secure/base_url – set this to your testsite URL
web/cookie/cookie_domain (this one got me once…
) – better set it to empty
web/cookie/cookie_path – better set it to empty
After that remove cache – delete var/cache folder.
Please leave us a comment if this post helped you or if you have anything to add here.