Transfer magento 2 to new domain, links redirect to old oneMoved magento to new domain, admin URL redirect to old admin URLall links redirecting to old domain after moving to new domainMagento 2 - Changed the base URL but old base url seems to be cached somewhere. Any ideas?Magento 2: How can I add External URL in top menuWhy my menu isn't displaying in Magento 2?How to set menu in magento2moving magento 2X from local server (My mac) to new domain and server (with control panel)Child theme does not load menu or parent theme componentsMagento 2 Generate static files without gulpmagento2: Moved magento to new domain ,all urls redirected to old urlCSS not reflecting after modificationsMagento2 Getting error as variable @baseUrl is undefined in file /var/view_preprocessed
Shell script can be run only with sh command
how to create a data type and make it available in all Databases?
Patience, young "Padovan"
Simulate Bitwise Cyclic Tag
Closed subgroups of abelian groups
How to make payment on the internet without leaving a money trail?
Does the radius of the Spirit Guardians spell depend on the size of the caster?
"The augmented fourth (A4) and the diminished fifth (d5) are the only augmented and diminished intervals that appear in diatonic scales"
Copycat chess is back
Is Social Media Science Fiction?
Is there really no realistic way for a skeleton monster to move around without magic?
How can I fix this gap between bookcases I made?
Calculus Optimization - Point on graph closest to given point
Infinite past with a beginning?
Why does not dark matter gather and form celestial bodies?
Finding files for which a command fails
Can town administrative "code" overule state laws like those forbidding trespassing?
The use of multiple foreign keys on same column in SQL Server
Can I make popcorn with any corn?
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
How to use Pandas to get the count of every combination inclusive
Why is an old chain unsafe?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Transfer magento 2 to new domain, links redirect to old one
Moved magento to new domain, admin URL redirect to old admin URLall links redirecting to old domain after moving to new domainMagento 2 - Changed the base URL but old base url seems to be cached somewhere. Any ideas?Magento 2: How can I add External URL in top menuWhy my menu isn't displaying in Magento 2?How to set menu in magento2moving magento 2X from local server (My mac) to new domain and server (with control panel)Child theme does not load menu or parent theme componentsMagento 2 Generate static files without gulpmagento2: Moved magento to new domain ,all urls redirected to old urlCSS not reflecting after modificationsMagento2 Getting error as variable @baseUrl is undefined in file /var/view_preprocessed
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
We have a dedicated server managed with whm and cpanel for the domains.
I have created a dev version
for my magento 2 website https://domain.com.
I have uploaded files
and database
, changed
in core_config_data table for web/unsecure/base_url
and web/secure/base_url
to have the new domain dev.domain.com.
Now the issue is the new domain has links who redirects to the old domain, in the top navigation, menu, account creation link, ...
The original website is multistore website with 3 stores with mode developper activated
When viewing the new domain firstime i got session error, i fixed it adding
'save_path' => '/tmp'
'session' => [
'save' => 'files',
'save_path' => '/tmp',
],
In app/etc/env.php
In the original website, there’s no problem related to session, is adding this config causes a problem?
I cleared cache folder var/cache
rm -rf var/cache/*
rm -rf /var/tmp/magento/*
, also with this command
php bin/magento cache:flush
also removed static files
rm -rf pub/static/adminhtml pub/static/frontend
Reindex links
bin/magento indexer:reindex
But always menu and top navigation links are from the old domain
I tried this question all links redirecting to old domain after moving to new domain and this Moved magento to new domain, admin URL redirect to old admin URL but without a solution.
Edit in I added this code to get base url in module-theme Topmenu.php file
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
var_dump($storeManager->getStore()->getBaseUrl());exit;
It returns the old website
magento2 magento-2.1
New contributor
add a comment |
We have a dedicated server managed with whm and cpanel for the domains.
I have created a dev version
for my magento 2 website https://domain.com.
I have uploaded files
and database
, changed
in core_config_data table for web/unsecure/base_url
and web/secure/base_url
to have the new domain dev.domain.com.
Now the issue is the new domain has links who redirects to the old domain, in the top navigation, menu, account creation link, ...
The original website is multistore website with 3 stores with mode developper activated
When viewing the new domain firstime i got session error, i fixed it adding
'save_path' => '/tmp'
'session' => [
'save' => 'files',
'save_path' => '/tmp',
],
In app/etc/env.php
In the original website, there’s no problem related to session, is adding this config causes a problem?
I cleared cache folder var/cache
rm -rf var/cache/*
rm -rf /var/tmp/magento/*
, also with this command
php bin/magento cache:flush
also removed static files
rm -rf pub/static/adminhtml pub/static/frontend
Reindex links
bin/magento indexer:reindex
But always menu and top navigation links are from the old domain
I tried this question all links redirecting to old domain after moving to new domain and this Moved magento to new domain, admin URL redirect to old admin URL but without a solution.
Edit in I added this code to get base url in module-theme Topmenu.php file
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
var_dump($storeManager->getStore()->getBaseUrl());exit;
It returns the old website
magento2 magento-2.1
New contributor
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago
add a comment |
We have a dedicated server managed with whm and cpanel for the domains.
I have created a dev version
for my magento 2 website https://domain.com.
I have uploaded files
and database
, changed
in core_config_data table for web/unsecure/base_url
and web/secure/base_url
to have the new domain dev.domain.com.
Now the issue is the new domain has links who redirects to the old domain, in the top navigation, menu, account creation link, ...
The original website is multistore website with 3 stores with mode developper activated
When viewing the new domain firstime i got session error, i fixed it adding
'save_path' => '/tmp'
'session' => [
'save' => 'files',
'save_path' => '/tmp',
],
In app/etc/env.php
In the original website, there’s no problem related to session, is adding this config causes a problem?
I cleared cache folder var/cache
rm -rf var/cache/*
rm -rf /var/tmp/magento/*
, also with this command
php bin/magento cache:flush
also removed static files
rm -rf pub/static/adminhtml pub/static/frontend
Reindex links
bin/magento indexer:reindex
But always menu and top navigation links are from the old domain
I tried this question all links redirecting to old domain after moving to new domain and this Moved magento to new domain, admin URL redirect to old admin URL but without a solution.
Edit in I added this code to get base url in module-theme Topmenu.php file
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
var_dump($storeManager->getStore()->getBaseUrl());exit;
It returns the old website
magento2 magento-2.1
New contributor
We have a dedicated server managed with whm and cpanel for the domains.
I have created a dev version
for my magento 2 website https://domain.com.
I have uploaded files
and database
, changed
in core_config_data table for web/unsecure/base_url
and web/secure/base_url
to have the new domain dev.domain.com.
Now the issue is the new domain has links who redirects to the old domain, in the top navigation, menu, account creation link, ...
The original website is multistore website with 3 stores with mode developper activated
When viewing the new domain firstime i got session error, i fixed it adding
'save_path' => '/tmp'
'session' => [
'save' => 'files',
'save_path' => '/tmp',
],
In app/etc/env.php
In the original website, there’s no problem related to session, is adding this config causes a problem?
I cleared cache folder var/cache
rm -rf var/cache/*
rm -rf /var/tmp/magento/*
, also with this command
php bin/magento cache:flush
also removed static files
rm -rf pub/static/adminhtml pub/static/frontend
Reindex links
bin/magento indexer:reindex
But always menu and top navigation links are from the old domain
I tried this question all links redirecting to old domain after moving to new domain and this Moved magento to new domain, admin URL redirect to old admin URL but without a solution.
Edit in I added this code to get base url in module-theme Topmenu.php file
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
var_dump($storeManager->getStore()->getBaseUrl());exit;
It returns the old website
magento2 magento-2.1
magento2 magento-2.1
New contributor
New contributor
edited Apr 4 at 19:41
tarek fellah
New contributor
asked Apr 4 at 17:06
tarek fellahtarek fellah
64
64
New contributor
New contributor
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago
add a comment |
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
Try these commands
1. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
2. php bin/magento setup:static-content:deploy -f
add a comment |
I changed values for path web/secure/base_link_url and web/unsecure/base_link_url for different scope_id (different store languages) to the new domain and it's fixed
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268832%2ftransfer-magento-2-to-new-domain-links-redirect-to-old-one%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try these commands
1. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
2. php bin/magento setup:static-content:deploy -f
add a comment |
Try these commands
1. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
2. php bin/magento setup:static-content:deploy -f
add a comment |
Try these commands
1. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
2. php bin/magento setup:static-content:deploy -f
Try these commands
1. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
2. php bin/magento setup:static-content:deploy -f
edited Apr 5 at 4:03
ABHISHEK TRIPATHI
2,1421828
2,1421828
answered Apr 4 at 20:27
Muhammad AyazMuhammad Ayaz
1818
1818
add a comment |
add a comment |
I changed values for path web/secure/base_link_url and web/unsecure/base_link_url for different scope_id (different store languages) to the new domain and it's fixed
New contributor
add a comment |
I changed values for path web/secure/base_link_url and web/unsecure/base_link_url for different scope_id (different store languages) to the new domain and it's fixed
New contributor
add a comment |
I changed values for path web/secure/base_link_url and web/unsecure/base_link_url for different scope_id (different store languages) to the new domain and it's fixed
New contributor
I changed values for path web/secure/base_link_url and web/unsecure/base_link_url for different scope_id (different store languages) to the new domain and it's fixed
New contributor
New contributor
answered 2 days ago
tarek fellahtarek fellah
64
64
New contributor
New contributor
add a comment |
add a comment |
tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.
tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.
tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.
tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268832%2ftransfer-magento-2-to-new-domain-links-redirect-to-old-one%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
As you have mentioned the website is multistore, there will be multiple values as per scope_id in core_config_data for path web/unsecure/base_url. Just make sure you change all store values instead of changing for only default scope.
– Yash Shah
Apr 5 at 4:43
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
2 days ago