Redirecting to different URL's after restoring the site on local
-
01-03-2021 - |
Question
We have a development server to test our code changes before pushing them to live. Recently, we have restored the development server to local (xampp) for testing and also done the necessary changes to the core_config_data in database.
Though we have done the changes in core_config_data, most of the products still redirecting to the development server instead of showing them as a localhost URL. Hope you got my point.
I can understand that I have missed something but I don't know what it is.
Can anyone please help me to resolve this issue?
Solution
In core_config_data Table :-
UPDATE core_config_data SET value = 'your_site_url' WHERE config_id = '2';
UPDATE core_config_data SET value = 'your_site_url' WHERE config_id = '3';
After core_config_data Changes Apply This Command :-
sudo rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs pub/static/deployed_version.txt var/cache var/page_cache var/generation var/view_preprocessed var/session generated/code
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento indexer:reindex
sudo php bin/magento cache:flush
OTHER TIPS
Run below command step by step.
rm -rf var/* pub/static/* generated/*
php bin/magento setup:upgrade
php bin/magento setup:static:content:deploy -f
php bin/magento cache:flush
After done all the command you check.