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
How to format long polynomial?
Has there ever been an airliner design involving reducing generator load by installing solar panels?
Is it unprofessional to ask if a job posting on GlassDoor is real?
Why do I get two different answers for this counting problem?
Watching something be written to a file live with tail
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
How much of data wrangling is a data scientist's job?
Convert two switches to a dual stack, and add outlet - possible here?
Find the result of this dual key cipher
What does "Puller Prush Person" mean?
What is a clear way to write a bar that has an extra beat?
Why can't I see bouncing of a switch on an oscilloscope?
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
Why is Minecraft giving an OpenGL error?
Definite integral giving negative value as a result?
What are these boxed doors outside store fronts in New York?
Is it possible to run Internet Explorer on OS X El Capitan?
Fully-Firstable Anagram Sets
How do I deal with an unproductive colleague in a small company?
How does one intimidate enemies without having the capacity for violence?
Theorems that impeded progress
Codimension of non-flat locus
How to determine what difficulty is right for the game?
What defenses are there against being summoned by the Gate spell?
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
yesterday
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours 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 yesterday
tarek fellah
New contributor
asked yesterday
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
yesterday
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours 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
yesterday
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours 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
yesterday
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
yesterday
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours ago
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours 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 yesterday
ABHISHEK TRIPATHI
2,1401828
2,1401828
answered yesterday
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 18 hours 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
yesterday
@YashShah it is fixed when i changed the web/secure/base_link_url to the new domain
– tarek fellah
18 hours ago