Changing Database configuration in magento site

Sometimes in order to move our site from one server to another server we are required to change database configuration as per new server. Although when you install fresh magento on your server it will ask for your database details from you and you don’t need to make any changes directly on your magento. But because now you need to just move your magento files from one server to another server so you need to change in magento files to make actual changes.

To Change database configuration
Just open the file app/etc/local.xml and look for below code


From the code above you can simply change host name , username, password and database name as well.

Change the url of admin section of Magento Site

You can change the admin section URL of your magento site from the change in same file (app/etc/local.xml) by simply changing following code


From the above code you can understand we will use new admin url like

After changing the admin url don’t forget to flush all the cache from cache management from magento admin

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)