I have a live and testing servers. I have cloned my live website to the development stack and have some problem when trying to access it.
I have edited the local machine
hosts file and mapped the DNS, however when trying to access the website it was redirecting to the live website. I managed to fix this by editing 4 rows in my
core_config_data table for my development site:
web/unsecure/base_url -> http://dev.mydomain.com web/secure/base_url -> http://dev.mydomain.com web/unsecure/base_link_url -> http://dev.mydomain.com web/secure/base_link_url -> http://dev.mydomain.com
However, if I navigate to the
dev.mydomain/admin and try to log in, it gives me error that the username or password is incorrect or the account has been temporary disabled.
I had similar problem with Magento 1 and fixed it by either commenting out these lines in
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath() // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );
Or running a query in MySQL client:
DELETE FROM core_config_data WHERE path = "web/cookie/cookie_domain"; DELETE FROM core_config_data WHERE path LIKE "web/secure/base%"; DELETE FROM core_config_data WHERE path LIKE "web/unsecure/base%";
Anyone know how to solve the problem with Magento ver 2.1.8?