The .htaccess file is used for web server configuration in the WordPress site and is used to set the permalinks structure in WordPress. If you configure it and a small mistake happens then you may have to face internal server error.
To re-create or generate it, you have to login to your web hosting's cPanel. Then click on File Manager.
After this, go to the root directory and find the .htaccess file and rename it to anything, such as “.htaccess old file”.
Now log in to your WordPress site and go to Settings >> Permalinks section and click on save changes button without making any changes.
WordPress will automatically create a .htaccess file for your site. Now your site will start running again without any internal server error.
2. By Deactivating the Plugin
If your internal server error is not resolved even after creating the .htaccess file, then you will have to deactivate all the plugins from your site.
To deactivate the plugin from your site, you have to go to the WordPress plugin section and then deactivate all the plugins.
If you are not able to access your WordPress admin area as well, then you have to log in to your web hosting's cPanel, then go to the root directory and click on “wp-content”.
After this rename the plugins folder present inside it.
Now all the plugins will be deactivated from your site. If now your site is getting open then there was a WordPress plugin due to this 500 internal server error.
When you go to your WordPress plugin section, you will get the error code “the plugin has been deactivated due to an error; plugin file does not exist”.
No need to worry, to fix this, log in to your web hosting cPanel again and rename the renamed plugins_OLD folder to plugins again.
Then, go to the WordPress dashboard and activate the plugins one by one.