The Error establishing a database connection seems to happen when I click on Customize within Wordpress. It seems like Wordpress is not getting permission from InfinityFree to access something. Using the console to debug, I can see that Error 500 Internal Server Error is being thrown, which in return does not allow me to customize the website (Error establishing a database connection) is shown.
Furthermore, I also can’t update any of my Wordpress pages, the console spams me with this error; 403 (Forbidden)
Please see attached screenshots for more clarifications of the errors mentioned above.
I have double checked the Credentials for my database within wp-config.php and everything seems to be fine. I have made a connection test file to test whether I can connect to my database and that seems to work. You can test my website using samoorservicesltd.co.uk/connecttest.php
I searched the web for this error message and I couldn’t really find a sure fire way to fix the issue. But all the issues seem to center around the internal permission system of WordPress, which is not a hosting issue.
Clearing browser cookies is said to help, and so does reinstalling the theme or plugin to which the action is related. Maybe you could try that?