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
What is going on with Captain Marvel's blood colour?
Took a trip to a parallel universe, need help deciphering
Etiquette around loan refinance - decision is going to cost first broker a lot of money
Could gravitational lensing be used to protect a spaceship from a laser?
Is it legal for company to use my work email to pretend I still work there?
Why is consensus so controversial in Britain?
What to put in ESTA if staying in US for a few days before going on to Canada
Neighboring nodes in the network
How to take photos in burst mode, without vibration?
Will google still index a page if I use a $_SESSION variable?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
Is it possible to download Internet Explorer on my Mac running OS X El Capitan?
Anagram holiday
UK: Is there precedent for the governments e-petition site changing the direction of a government decision?
Is there a hemisphere-neutral way of specifying a season?
How to model explosives?
How to draw the figure with four pentagons?
Emailing HOD to enhance faculty application
Do I have a twin with permutated remainders?
What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?
How do I write bicross product symbols in latex?
Can a virus destroy the BIOS of a modern computer?
How can I make my BBEG immortal short of making them a Lich or Vampire?
How much of data wrangling is a data scientist's job?
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
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 4 hours ago
tarek fellah
New contributor
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 6 hours ago
tarek fellahtarek fellah
13
13
New contributor
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
tarek fellah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
add a comment |
Try these commands
- rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- php bin/magento setup:static-content:deploy -f
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
Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
add a comment |
Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
add a comment |
Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?
Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?
answered 5 hours ago
MehdiMehdi
609721
609721
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
add a comment |
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
Yes in CMS page they are hardcoded, i changed them but in menu links, top navigation they are generated I added this code to menu module $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); var_dump($storeManager->getStore()->getBaseUrl());exit; And it returns the old domain
– tarek fellah
4 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
– magefms
2 hours ago
add a comment |
Try these commands
- rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- php bin/magento setup:static-content:deploy -f
add a comment |
Try these commands
- rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- php bin/magento setup:static-content:deploy -f
add a comment |
Try these commands
- rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- php bin/magento setup:static-content:deploy -f
Try these commands
- rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- php bin/magento setup:static-content:deploy -f
answered 3 hours ago
Muhammad AyazMuhammad Ayaz
1818
1818
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