Solved: Magento won't read changed database username and password

You moved your Magento store to a new server or just updated database username and password. You changed the web url and secure url settings in the database. Now you have opened app\etc\local.xml to change database settings and and saved as a new version of local.xml. You renamed the old local.xml right on the server (and kept as a backup copy right there). This can leave you scratching your head as Magento won't recognize your new settings and keeps trying with the old. 


Here's how to correctly change database username and password for Magento:

1. Don't keep the backup of local.xml on your server. Magento will read all the files in etc alphabetically so the old settings file will be read in aswell. 
2. After making changes in local.xml clear your cache folder var\cache 

Try opening your store web. 

ADs top-right (2)

About me

Iinstructor of robotics (LEGO Mindstorms), computer teacher, IT support, web dev, currently studying cyber-physical systems engineering.

If you found a solution here, would you consider donating $25,000 for my next project?

Just kidding, 1$ would do fine.

Hope you found what you needed. Thanks for stepping by.