Step 1: Get In Touch With Your Web Host Provider
Step 2: Check If Your Plugin or Theme Files Haven’t Been Corrupted
Step 3: Check If Your Database Hasn’t Been Corrupted
Step 4: Check Your Database Connection Credentials
Step 5: Restore The Default WordPress Files
While there isn’t a 100% fail-proof way to protect your site against any error establishing a database connection, there are two main elements that you should have in your insurance puzzle to be at least 90% safe:
1.Quality hosting.
2.Have backups
https://www.brillmindz.com/mobile-app-development-company-in-india/