We have developed a dev website having URL like dev.abc.com and it has magento 2 installed and it is working fine.

Now I need to migrate it on another domain say test.abc.com for that I have done following steps:

  1. Dump for the website which is running for dev.abc.com.
  2. Rename the URL from http://dev.abc.com to test.abc.com.
  3. Deleted var/cache folder
  4. Change the permission for var and pub folder
  5. Change the database credentials in app/etc/env.php

After that Front end section is working fine but admin page is blank and not opening.


It is resolved by this query :

UPDATE `store` SET store_id = 0 WHERE code='admin';
UPDATE `store_group` SET group_id = 0 WHERE name='Default';
UPDATE `store_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
| improve this answer | |

Look for these tables in the database it fixed my problem after remove/replace the static domains in the core_config_data Table





Look what the values are in there and change them accordingly

| improve this answer | |

If your magento2 install is running under a different domain than your source site (eg. when importing a live website into a local dev version), your cookie domain is probably wrong. In the core_config_data table, look for the web/cookie/cookie_domain key and set the value to match your local domain.

Don't forget to run bin/magento cache:flush after updating the config value.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.