The Internal Server Error 500 is a collective status code for server errors. In WordPress, it is often caused by a plugin (especially from third-party providers) or theme functions . Other possible causes of internal server error in WordPress that we know of are: corrupted .htaccess file, PHP memory limit, and file/folder permission error
If there is an internal error, the first step is to view the error log files.
With any error message, particularly one as broad as the 500 Internal Server Error, you will first want to check any Apache and PHP error logs for your server. These logs can provide valuable context related to any code failures or other potential causes of a site failure. The error_log file is usually found in the public_html directory. For information on where to find the logs for your server, please see :
This log will display a list of error messages from your website. You will find detailed information about each error including the date and time of the error, some information about the client receiving the error, description of the error and information about which folder or file that is generating the error. From this log, you can see resolution depending on the information about the error that you receive. Also, consider which changes were made shortly before.
1. Incorrect code in .htaccess: The structure in a .htaccess file could be wrong.
Creating A New.htaccess
Once you find your .htaccess file, right-click it, and rename it“.htaccess.bak”. This essentially deletes your site’s.htaccess file,
We need to create a new one
and add this lines of code
It’s also worth mentioning that an improperly named .htaccess file will cause this error to run on your site. Make sure this file is not named anything other than “.htaccess”.Open your website in your browser. If the 500 internal server error is gone, it was caused by a corrupted .htaccess file and your issue is now fixed. If you’re still seeing the error, you have some more tests to run.
2. PHP timeout: Could it be that the memory is overloaded? The script tries to access an external resource and experiences a timeout. PHP memory limit: A process exceeds memory and therefore cannot be executed correctly.
Increasing Your PHP Memory Limit in WordPress.PHP memory limits are set by your host and WordPress. WordPress will attempt to increase your limit if you begin exceeding it, but it can only go as high as the limit your host has placed on your server. This limit is often lower for shared hosting plans. You need to increase your PHP memory limit in WordPress and refresh your site to test whether or not this is causing your 500 internal server error. The memory limit determines how much memory a process may use. If more RAM is needed than is available, this could result in an internal server error. You can increase the limit as a temporary solution. To do this, add a command like this to php.ini:
upload_max_filesize = 720M
post_max_size = 64M
memory_limit = 1024M
max_execution_time = 180
|Pro Tip: All the values given are arbitrary value, change the values as per your need|
Fixing a corrupted .htaccess file and increasing a site’s PHP memory limit are the top two solutions for fixing this error, but there are other solutions if those haven’t helped you.
They are as follows:
Deactivating plugins to check for faulty plugins.
Locating issues by debugging your site.
Checking if your files and folders have the correct file permissions.
Uploading fresh wp-content and wp-includes folders to your site.
Asking your host if the issue is on the server that powers your site.
The 500 Internal Server Error is a general HTTP status code that means something has gone wrong on the website’s server, but the server could not be more specific on what that exact problem is.