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;








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










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.


























    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










    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.






















      0












      0








      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










      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 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.




















          2 Answers
          2






          active

          oldest

          votes


















          0














          Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?






          share|improve this answer























          • 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


















          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























            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














            Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?






            share|improve this answer























            • 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















            0














            Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?






            share|improve this answer























            • 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













            0












            0








            0







            Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?






            share|improve this answer













            Did you check if those links are not hardcoded in CMS page? Or did you flush your browser cache as well?







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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

















            • 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













            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










                answered 3 hours ago









                Muhammad AyazMuhammad Ayaz

                1818




                1818




















                    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

                    Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

                    Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

                    Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»