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;








1















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










share|improve this question









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.




















  • 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

















1















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










share|improve this question









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.




















  • 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













1












1








1








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










share|improve this question









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






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








edited yesterday







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 yesterday









tarek fellahtarek fellah

64




64




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.












  • 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











  • @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










2 Answers
2






active

oldest

votes


















0














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





share|improve this answer
































    0














    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






    share|improve this answer








    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.




















      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.









      draft saved

      draft discarded


















      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









      0














      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





      share|improve this answer





























        0














        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





        share|improve this answer



























          0












          0








          0







          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





          share|improve this answer















          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






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday









          ABHISHEK TRIPATHI

          2,1401828




          2,1401828










          answered yesterday









          Muhammad AyazMuhammad Ayaz

          1818




          1818























              0














              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






              share|improve this answer








              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.
























                0














                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






                share|improve this answer








                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.






















                  0












                  0








                  0







                  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






                  share|improve this answer








                  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.










                  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







                  share|improve this answer








                  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.









                  share|improve this answer



                  share|improve this answer






                  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.









                  answered 18 hours ago









                  tarek fellahtarek fellah

                  64




                  64




                  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.




















                      tarek fellah is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                      Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                      Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form