It’s common in a website development area to deal with errors that you sometimes don’t know. This is why it’s extremely useful to have a feature that lets you find a solution based on the information that you already have.
First, you need to turn on PHP error messages.
To make errors visible on your website directly, add a checkmark for the displayErrors (display_errors) parameter
To make errors logged in a specific file, mark logErrors (log_errors)
Once done, save your changes, and access your website again. You will now see specific error messages to work on.
Make sure that the scripts were uploaded in the correct mode - ASCII or Binary. Check the
readmeof your script to see any special instructions. Normally it should be ASCII
Check permission (chmod) values of the file or directory. The recommended permissions are 755 for folders and 644 for files
If you've added some additional configurations to your .htaccess file, make sure to double-check it and ensure that it doesn't contain any errors. To confirm whether it's an issue with the .htaccess file, just temporarily rename it
Prevent your PHP code from timing out - for that you need to add timeout rules directly to your PHP scripts
And the most important tip, search on Google for your script name + internal server error or website builder + error message. Most likely, someone already had the same issue and explained a solution online, f.e. WordPress error establishing a database connection
How to fix specific errors?
Also, you can take a closer look at the error code, fixing the source reason might solve your issue without restoration from backup:
Call to undefined function means that in some file(s) the website is trying to call the function, that was not defined properly yet. It usually happens when an incorrect PHP version is chosen, try changing the PHP version first
Parse error (Syntax Error) happens when the code you've written doesn't conform to the syntax or language rules for the language in which you're working. In cases like these, check the file in the given location to see if there are easy syntax errors that you can fix. Usually, it’s something simple, like missing “;” at the end of the line
Warning error means that there’s a missing file or the code is using incorrect parameters in a function. If you see Access denied for a user after "Warning" - check your configuration file if it uses the correct database credentials
Fatal error - this error usually occurs when code uses a
require()function, and it’s not able to find the required file. Check the file in question and upload it (or restore it from the backup)
A Depreciated error means that your website needs a lower PHP version than is currently set. Changing the PHP version to a lower one will solve the issue
Search by using your website builder/plugin's forum, it’s more likely to find a solution there
Stackoverflow is a popular forum/community website where developers all around the world share their issues and solutions
You can also always hire a professional developer to take care of your website