1

When I change the base url in the Magento admin panel it doesn't work. I think it's hard coded somewhere but can't find this file.

7
  • after change admin url delete cache from var folder Commented Sep 22, 2017 at 8:25
  • we already tried that
    – Mylan
    Commented Sep 22, 2017 at 8:45
  • check your root's index.php file. Also check the .htaccess files
    – MGento
    Commented Sep 22, 2017 at 9:46
  • I can't find it in those files
    – Mylan
    Commented Sep 22, 2017 at 11:09
  • What do you want exactly? Change base url of your store? Or add remove links from header and footer?
    – Priyank
    Commented Sep 22, 2017 at 11:22

3 Answers 3

1

You have to follow these three steps:

  1. go to your admin panel and change your base url System > Configuration > General > Web : Unsecure and Secure then clear your cache and reindex all.

  2. Find your current header, footer, etc.. with enabling a Path hint, if you don't know how please follow this.

  3. Atfer finding the current file header.phtml for exemple, you can now check if you have the base url hard coded or dynamically, the dynamic one looks like:

    • $this->getBaseUrl()

    • Mage::getBaseUrl()

Nb: Don't forget to clear the browser and Magento cache.

0

Go into your database using PhpMyAdmin (or whichever database management software you're using) and open the core_config_data table. In here you need to find to replace the values of web/unsecure/base_url and web/secure/base_url with your new base URL.

After you've done this, clear /var/cache/ and see if it then works.

0

If you have shell access you can also SSH into your web root and do

$ grep -rl "https://myUrl.tld"

which will print out all files containing the string https://myUrl.tld.

This might help to identify the files that contain the desired string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.