Reputation: 143
i have installed latest magento 2.1.7 version on my server and installed a theme. I have installed magento in a folder(http://example.com/site/) everything is working fine there. Now i have moved it to root directory (http://example.com/) as a main website, but there it is not working, it redirecting to old url with SID var. http://example.com/site/?sid=8374urh347yr7w4ry
I have tried the following changes:
Is magento store base_url in any file also? so that i could change.
Any help will be appreciated
Upvotes: 1
Views: 5518
Reputation: 1
Try to restart apache.
/etc/init.d/apache2 restart
sudo /etc/init.d/apache2 restart
sudo service apache2 restart
For some share hosting like godaddy try to switch php version and clear browser cache.
Upvotes: 0
Reputation: 21
First thing first head over to database under table core_config_data
chage both secure and unsecure url to your new store adress then run this
php -dmemory_limit=2G bin/magento setup:upgrade && php -dmemory_limit=2G bin/magento setup:di:compile && php -dmemory_limit=2G bin/magento setup:static-content:deploy -f && php -dmemory_limit=2G bin/magento indexer:reindex && php -dmemory_limit=2G bin/magento cache:flush
Upvotes: 2
Reputation: 630
For me it was setting not just base_url and secure_base_url but also base_url_link in in core_config_data.
Upvotes: 1
Reputation: 566
As my comment solved your problem I will post it as an answer.
According to magento takes all config data from cache folder you have to clear the magentodir/var/cache
- including all subfolders - to be sure the new config is taken.
You said you allready cleared the cache, my advice is to check this point again. (Maybe you cleared the cache before you did the necessary changes?)
Upvotes: 5