Magento Layout Error after changing Base URL {{base_url}}

When I first login to admin menu on my Magento, I was bothered by this message at the top of my admin interface.

{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure Url / Base Secure Url. It is highly recommended to change this value in your Magento configuration.

Well, most likely you will stumble upon this message on localhost installation. Please do not change this to uncorrect value or else… your Magento site will just break down. If you did it anyway, follow these steps:

  1. Go to your Magento database (you can use phpmyadmin) and open core_config_data table. Then find a row which has path = ‘web/unsecure/base_url’ and change the value back to {{base_url}}.
  2. Finally, to make it works you need to clear out any cache. Go to your magento installation, and open var folder, then delete the session folder (in other word, delete /magento/var/session).

Now, if you still want to update {{base_url}}, read this article Well, in my opinion, Magento is premature product, so it is still fragile. You have to think twice before implement it on your production site.

11 Replies to “Magento Layout Error after changing Base URL {{base_url}}”

    1. if you experienced problem after changing your Base URL, you should change it back to the previous value (before you make any changes).
      So if the default Base URL value in your Magento is {{base_url}}, please use that.

      Now if you want to get rid message “{{base_url}} is not recommended to use… bla bla bla… ” in your admin, you can try to update {{base_url}} with your web path (could be “” or other, depends on your installation). However, if you get messy site after changing this value, follow again my tutorial to return it back to {{base_url}}.

  1. Guys, I am new to Magento. I have installed http://localhost/magento. I can view only the first page of mag. All other pages give me cookie error page including /admin. I also heard, mag is not possible to use in http://localhost (have to use If it is true, why is that when all other applications including oscommerce, zendcart are well running in localhost ? Please let me know how to make it run on my http://localhost/magento.

    1. yep, try to change your localhost to via hosts file.

      C:Windows\System32\drivers\etc\hosts (edit this file in notepad)

      The reason for this problem is Magento uses cookies and somewhat require URL Strange and make you scratch your head… Nevertheless Magento is still on it’s early evolution, expect something better in next year.
      Let us know if it doesn’t work. All the best.

  2. I have been having the same problems and must agree that the product is premature. Not possible to use in real projects.

    Also help is hard to come by unless you like to pay.

    Will wait for the next version.

  3. i’m new in magento, i have a same problem, i couldn’t click on web (magento configuration ) and change the {{baseurl}}, i tried to change on phpmyadmin but i couldnt find where to get path = ‘web/unsecure/base_url’ ,please help

  4. sir i have to change wrong base url… so i cant open admin for again change the base url….

    please help me for solve out this problem by database table or file editing. i cant open project vai url


  5. Thank you for information, very helpfull.

    One small adon:

    in folder “/magento/var/” you must as well delete folder “cache”, other wise you will not have any changes, when entering your localhost you will still be redirected to the wrong url you entered before.

Leave a Reply

Your email address will not be published. Required fields are marked *