Magento db configration file reads from wrong db

Avatar
  • Answered
I have two magento instances where the first instance db config file (local.xml) have been modified by mistake to read from the second instance db which in turn redirects the first instance to the second instance main store and admin panel.. I tried fixing it back to read from the its original db but changes aren't happening since I can access the admin panel and the main url fro the first instance redirects to the second .. any work around on how to fix this
Avatar
johnpaulb-imhs1
Hello, Thank you for your question regarding your Magento site reading from the wrong database. I recommend rechecking your local.xml file for accuracy. Here is a guide I found via online search on How to Edit Magento Database Configuration File. You can view your databases, and users in cPanel at any time by clicking MySQL Databases in the Databases. Since redirects are often handled by your .htaccess file I recommendchecking it. This is easily tested by renaming your current htaccess file. Often, during troubleshooting I'll simply rename the .htaccess to .htaccess.old and now I'll reload the website. If the site loads I then know the issue resides in my configuration of the .htaccess file. If it does not fix the issue I was having, I'll rename the .htaccess by removing the .old I added to the end. That way, it won't affect my website after I resolve the issue. Thank you, John-Paul