0

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.

4

It is resolved by this query :

SET FOREIGN_KEY_CHECKS=0;
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';
SET FOREIGN_KEY_CHECKS=1;
0

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

web/secure/base_url

web/secure/base_link_url

web/secure/base_skin_url

web/secure/base_media_url

Look what the values are in there and change them accordingly

0

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.

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.