How to fix 500 Internal Server error at Hostinger

Fix the 500 Internal Server Error at Hostinger by enabling PHP errors, changing the PHP version, fixing the error message, or restoring a backup.

Updated 3 weeks ago

Fix the 500 Internal Server Error at Hostinger by enabling PHP error messages to find the cause, changing your website’s PHP version if needed, and fixing the specific error, such as a faulty plugin, a syntax error, or wrong database credentials. If the error persists, restore your website from a backup.

To solve it properly, we suggest enabling PHP error messages first. This way, it will be easier to identify the particular issue.

If nothing changes, and you still see the 500 error after enabling the PHP errors display, try changing the website’s PHP version and enabling displayErrors on different versions. Once that’s done, you can proceed with the suggestions below.

WordPress-Based websites

If your website is created with WordPress, enable WP_DEBUG to see the exact PHP error behind the 500 error. Then, refer to this comprehensive tutorial: How to Fix 500 Internal Server Error on WordPress.

Other CMS

If your website is created using a CMS different from WordPress, perform the following action according to the specific error message:

  • Call to undefined function: change your PHP version. Try all available versions; if the issue persists across all, review the code in the file mentioned in the error

  • Parse error (Syntax Error): check the file mentioned in the error message for any syntax errors and edit the syntax

    PHP code editor showing a red error marker beside a missing username value in connection.php
  • Warning Access Denied: double-check the database credentials to make sure they’re correct in your website’s configuration file

  • Fatal error, Failed opening required: it means that your site is calling for a file that does not exist or cannot be executed. Check if the file mentioned in the error message actually exists in the correct path

  • Deprecated: while lowering your PHP version may temporarily fix the issue, for security reasons, it is strongly recommended that you update your code to the latest PHP version

If the error persists after trying these options, you can restore your website to a previously working state. For other server errors, such as 502, 503, or 504, see Troubleshooting 5xx errors at Hostinger.