Knowledge base

Find articles about information features, troubleshooting guides,
and other technical information related to the hosting service Hostinger.

I get Internal Server Error (500), help!

Modified on:
internal server error 500 htaccess .htaccess

There are many different reasons as to why you can get the Internal Server Error. And in most cases, it is due to incorrect configurations in the .htaccess file.

If you get 500 Internal Server Error in WordPress, you can check out this tutorial.

Although this is generally caused by problems within the website's script, it can also be due to incorrect file permissions either on the script itself, or another file or directory used by the script.

You should make sure that:

  1. The script paths are set correctly.
  2. The scripts were uploaded in the correct mode (ASCII or Binary - check the readme of your script to see any special instructions. Normally it should be ASCII).
  3. Another problem could be permissions (chmod) of the file or directory. The recommended permissions are 755, or rwxr-xr-x.

Here are a few solutions that will help you fix this error:

  1. Check your .htaccess file. If you've added some additional configurations to your .htaccess file (these changes can also be applied by your website's script, for example a recently installed plugin for WordPress is likely to make changes to that file). So make sure to double check the .htaccess configurations to ensure that it doesn't contain any errors. To confirm whether it's an issue with the .htaccess file, just remove or rename the .htaccess file. (IMPORTANT: Make sure to make backups of your .htaccess file if you plan to remove it)
  2.  PHP code Timing Out. If your PHP script makes external network connections, the connections may be timing out. If too many connections are attempted and they time out, this will cause the internal server error. To prevent such timeouts and errors, we suggest that your relevant PHP scripts be coded with some timeout rules.
  3. Check your Error logs. If this is a PHP related issue, any error log will be stored in your .logs folder, so make sure to check them out. If your log does actually contain errors, just search for that specific error online for possible solutions.
  4. Search on Google for your scripts name + internal server error. For example, if you get this error on your WordPress website - query Google for Wordpress internal server error Fix. Most likely, someone already had the same issue as you are having now and found a solution.

  • Easy Website Builder
  • 99.9% Uptime Guarantee
  • 24/7 Live Support
  • Powerful Control Panel
  • 30-Days Money-Back Guarantee
Limited Time Special Offer!
Save 90%
Get started