How to Fix 500 Internal Server Error in Magento 2?

When you update, install, backup, restore, move to another server, or remove a component such as a theme, patches, plugins…on your Magento 2 website, you might encounter the error “Magento 500 Internal Server Errors”.

The error looks like as here

Follow the case below to fix this.

1. Change Magento file permission

You need sure permission files correctly the index.php should have permission 644. If you use Cpanel can change the image below or you can log in ssh after going to root Magento and run the command: chmod 644 index.php.

2. Try edit or rename .hatccess

Sometimes errors cause config default in file .htaccess of Magento incompatible with version apache, HTTP(s) in your server.

Remove all blocks with the format as the image below in file .htaccess and .htaccess pub/.htaccess:

If still not fix you can try rename file .htaccess to .htaccess_backup after check again.

3. Enable Developer mode

Run comman php bin/magento deploy:mode:set developer or add direct code ini_set('display_startup_errors', 1);ini_set('display_errors', 1); error_reporting(-1); to file index.php