2

My Magento 2 live site redirects to localhost

Already done:

  1. updated database URLs in web/unsecure/base_url & web/secure/base_url.
  2. flushed cache.

Anymore suggestions?

1
  • As well please check the app/etc/env.php configuration also – Nagaraju K Oct 23 '17 at 9:32
4

Magento takes all config data from cache folder. You have to clear the <magentodir>/var/cache including all its subfolders.

Apart from that remove page_cache folder also.

Also check whether you have changed store URLs at stores level or default level.

1

check following setting of your webserver:

PHP 5.5.x and greater versions

MySQL 5.6.x and greater versions

following extensions install on your apache server

PHP Extension curl. dom.

mcrypt.

simplexml.

spl.

xsl.

intl.

mbstring.

ctype.

hash.

openssl.

zip.

xmlwriter.

gd.

iconv.

writtable permission :

 "{"path":"directorypath/app/etc"}"   writable directory permission.

"{"path":"directorypat/var"}" writable directory permission.

"{"path":"directorypath/pub/media"}" writable directory permission.

"{"path":"directorypath/pub/static"}" writable directory permission. 
1

I know this is late, however I've just had a similar issue that has been driving me insane after updating, I hope this can help someone.

Turns out both of these variables in core_config_data on my end were set to the websites scope:

  • web/unsecure/base_url
  • web/secure/base_url

I set those two to default scope ran the following command:

php bin/magento cache:flush

And I'm finally in again!

0

I'm adding some input here because it's the first question I found on google regarding this issue. I also faced it as well today after upgrading to 2.2.1 and in addition to deleting all cache folders for some reason I had to also execute

php bin/magento setup:db-schema:upgrade
php bin/magento setup:db-data:upgrade

After that I was able to get back to my normal URL.

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.