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:
- The script paths are set correctly.
- 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).
- Another problem could be permissions (chmod) of the file or directory. The recommended permissions are 755, or rwxr–xr-x.
– Easiest way to change permissions are via File Manager from your Cpanel.
Here are a few solutions that will help you fix this error:
- 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)
- 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.
- 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.
- 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.