The internal server error most common error of web application and website. It means something has gone wrong on the website and web server This isn’t a problem with your browser, your computer, or your internet connection. The “500” is the server response code for this type of error and “internal” means that the error is on the server side.

How to Fix the 500 Internal Server Error

Syntax Error, Invalid Code or Worng .htacces File Code

Check your project folder internal .htaccess file. If it’s corrupt this can cause a 500 internal server error. Before any change, code editing and delete .htaccess file on web server. you could also download a copy of the file to your local computer.

Example Here
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on

Change Here
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_value error_log /home/path/public_html/domain/PHP_errors.log

Now, reload your website to see if the 500 internal server error is fixed.

Bad Server permission

Sometimes the 500 Internal Server error is because your are project file and folder permissions to high To correct this, the permissions change.

  • Directories and folders permissions changed from “777” to “755”
  • Images, media, and text files like HTML permissions changed from “777” to “644”
  • CGI Scripts permissions changed from “777” to “755”

You can modify permissions with the File Manager, located in the “Files” category of the cPanel, an FTP client,

Script timeout

Most of one cause internal server error because of your script timeout. Server default maximum execution time 30 sec and your script cross execution time.

Immediate increase your php script memory limit. Open your wp-config.php file either via FTP or via your File Manager (through cPanel) and add the following line inside the main php

ini_set(‘max_execution_time’, 600); for php
define(‘WP_Memory_Limit’, ‘64M’); for WordPress