Magento2 Admin login not working

Generally we faced one issue on creating a clone of our any production site or staging server. The issue is that after setup the project, we are unable to login to admin while we entering the correct username and password.

To fix this issue, follow the step:

  1. Go to PhpMyadmin
  2. Open table core_config_data
  3. Run this command: SELECT * FROM core_config_data WHERE path LIKE '%cookie%'
  4. Change the value for the row which path is “web/cookie/cookie_domain”
  5. For my setup, I setup naveenosmagentowork.test. If you have local setup then you can setup localhost or respective local URL name.

Do not forget to run below commands:

  1. rm -rf var/*
  2. rm -rf generated/*

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*