1

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.

1

3 Answers 3

5

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; 
1

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

13
  • I have done this as well but still not working for me :( Commented May 11, 2016 at 6:59
  • what does your .htaccess look like? Commented May 11, 2016 at 7:42
  • go.sparkpostmail.com/f/a/5NCGJYAfvlXHrg_Fn0ACDg~~/AABzJwA~/… Commented May 11, 2016 at 15:18
  • i hope its on the server only as .htaccess Commented May 11, 2016 at 15:20
  • yes it is uploaded as .htaccess on server Commented May 11, 2016 at 15:22
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.