How to change base url from https://www.example.sg/ from https://www.example.sg/aaa? I would like to permanently append "aaa" next to https://www.example.sg/. Usually, when I click, for example, "test" category, the base url is https://www.example.sg/ and the url for "Test" category will be https://www.example.sg/test. What I would like to be right now is that the base url is https://www.example.sg/aaa and the url for "Test" category will be https://www.example.sg/aaa/test.

2 Answers 2


You can change your base URL of the store by following any of the below methods

From the Admin Panel

System >> Configuration >> Generel >> Web

See the below screen shot

enter image description here

Or the another way is you can directly change it from the database using phpmyadmin changing its value in the table:


enter image description here

Or either you can change it using command line follow the below steps:

1 Log into the client's server using terminal

2 Gain access to MySQL using m or mysql -u root -p.

3 Access their database using the following command, where database is the database name.

use database

4 Run the following command:

select * from core_config_data where path like '%base%url%';
  1. This will display the current base_urls set in Magento

  2. To change the base URLs, execute the following commands:

    update core_config_data set value = 'http://domainname/aaa' where path = 'web/unsecure/base_url';

update core_config_data set value = 'http://domainname/aaa' where path = 'web/secure/base_url';

Your website base url will be changed now.

  • Hi, I did follow your way but it does not work and my website gone. Only html page is shown. Please suggest me. Thanks!
    – May18
    Oct 9, 2014 at 5:49
  • you have to clear the magento cache folder to make it work Oct 9, 2014 at 5:51
  • My registered domain is example.sg but the url 'example.sg/aaa' what I want to change now has not been registered. but I am just appending aaa next to registered url example.sg. My webpage is gone because of this?
    – May18
    Oct 9, 2014 at 6:17
  • You're missing some vital knowledge about domains and URLs to be even thinking about working with Magento. I highly suggest you familiarize yourself with it. The short version is that the domain that you have to register ends with the /. Anything you put after it is whatever you want it to be. I suspect your site is not working because both answers here tell you to add aaa to the url, while it should be aaa/. The base url MUST end with a slash.
    – user4351
    Oct 9, 2014 at 7:15

You can go to

System  >  configuration  >  General  >  Web 

to change Secure Url.

Or you can go to database core_config_data , then replace url https://www.example.sg/ to https://www.example.sg/aaa

  • Can I change even though I do not register example.sg/aaa? because I already registered example.sg and what I want to do is to append aaa next to the registered url example.sg. Is it ok?
    – May18
    Oct 9, 2014 at 2:37

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.