WordPress is giving full functionality in terms of handling and configuring the site. Even for the new users or non-coding people also can create their websites with few clicks. Only it requires a domain name and a good hosting provider. But few times people face issues, which makes them panic.
Internal server error is one of the common WordPress issues occurs often
In this article, we will show you how to fix the internal server error in WordPress by compiling a list of all possible solutions in one place.
Possible reasons for internal server error in WordPress is often caused by corrupted .htaccess file and PHP memory limit.
Other possible causes of internal server error in WordPress that we know of are: corrupted plugin and/or theme functions.
We have also heard internal server error only showing up when you are trying to access the administrator area while the rest of the site works fine.
Step1: Troubleshoot the problem.
Find problem using server error logs by logging into server/hosting admin panel.
Once you find possible reasons then you can try the following things.
Step2: Can be the problem with the .htaccess file.
Check if the .htaccess file in the server root folder corrupted or not. Just by changing the .htaccess file name to something else like .htaccess_test and try to access your site. If it’s working then there is a problem with the .htaccess file.
Regenerate the file using clinking “save” button in WordPress permalink structure.
Step3: Increase PHP memory limit
First, you need to edit the wp-config.php file on your WordPress site. It is located on your WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.
Next, you need to paste this code into the wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’
define( ‘WP_MEMORY_LIMIT’, ‘128M’ );
This code tells WordPress to increase the PHP memory limit to 128MB.
Once you are done, you need to save your changes and upload your wp-config.php file back to your server.
If your problem was still not resolved, then there is a problem with corrupted plugin or theme files.
Step4: Deactivate All Plugins
If you have access to the admin dashboard of your WordPress website, deactivate each plugin one by one. Refresh your website after each deactivation.
Then check your website again. If the site starts functioning properly, then the internal server error must be due to the plugin installed on your WordPress. Now, you need to activate each plugin one by one and refresh your website after each plugin activation. The problematic plugin will soon be identified as it will result in a 500 Internal Server error for your website.
Ideally, at this point, the issue has been settled. If not, move to the following step.
Step5: Fresh wp-admin & wp-includes
In this section, you need to download WordPress new wp-admin & wp-content folders and upload to live host via FTP. Make sure that you have backed up the website before this step.
Step6: Final step: Ask your hosting provider for help
If nothing works, then you need to get in touch with your hosting provider. By looking at the server logs, they should be able to get to the bottom of things.
Hope all these steps may help you to resolve the internal server error. If anything other than this helps you please share us in the comments.