Sometimes you may encounter a HTTP error like HTTP 404 error and HTTP 403 Forbidden Error when visiting a site. The HTTP 500 Internal Server Error is also a general HTTP status code indicating the website cannot display the page properly. It means something is wrong on the server, but the server cannot make sure the problem.
There are several causes may result in this error and it’s not easy to judge the reasons and find a corresponding solution. In order to help readers solve this problem easily, we today come out this tutorial to introduce the reasons and solutions in detail. By finding the cause of the error, you can quickly and correctly remedy this problem.
What Causes HTTP 500 Internal Server Error?
HTTP 500 Error can present on any browser, any operating system, and any websites, not only WordPress sites. It occurs when no more specific message is suitable, such as the following.
As every website is allowed to customize error message, you may see it in many ways, such as 500 Internal Server Error, HTTP 500 – Internal Server Error, Temporary Error (500), etc.
No matter what way it showcases, the cause is the same, for the PHP memory limit, plugin conflicts, corrupted .htaccess file, and more. Because of the general essence, it doesn’t clearly showcase any reasons, but we can common judge its causes as the following:
- Unexpected errors in both WordPress core and plugins.
- Bugs in WordPress plugins and themes.
- PHP memory limit is insufficient.
- Bugs in web server software, such as Apache, PHP, etc.
- Incorrect web server configuration file.
- And more.
In the below content, we guide you to fix the 500 error for these possible reasons.
How to Fix the HTTP 500 Internal Server Error?
# Checking The .htaccess File
Corrupted .htaccess file is the most likely cause of HTTP 500 Error. To remedy the error, you can first check the file by renaming .htaccess file to a new name. You can find the file by logging into your server control panel or through FTP client. Personally, we complete the whole process in cPanel.
Log into cPanel and click on the File Manager icon in the Files section. Select the box of document Root and choose the domain you need to access from the drop-down menu. Then, select the checkbox for Show Hidden Files(dotfiles) and click Go button to the next step.
Find .htaccess file in the directory where you can find wp-content, wp-includes and wp-admin folders. Once located it, right click on the file and then you will see a list of options, choose Rename and it will present you a new tab to type a new name.
After renamed the file, try to refresh the site to check whether the 500 Error is solved. If it did, you successfully fix the error and you can go to WordPress Dashboard -> Settings -> Permalinks and click the Save button. By this way, WordPress generates you a new .htaccess file with proper rewrite rules.
If the 500 Error is still not resolved, you should continue for the next steps.
# Increase PHP Memory Limit
The HTTP 500 Error sometimes happens due to the lower memory limit. To fix this problem, you can modify the memory_limit line in the php.ini file with the below tips:
- Create a new text file named as php.ini
- Copy and paste the below code into it
memory_limit = 256M
- Save the file and upload it under /wp-admin/ folder
Then, check for your site. if the error is solved, you temporarily succeed but the thing is still not complete. You should also contact for the WordPress hosting provider to access the server logs for finding the certain cause.
If the HTTP 500 Error is still unresolved by increasing memory, you may need to do tedious trouble shootings.
# Disable All Plugins
If you haven’t fixed the error with the previous methods, you need to consider the plugin errors. The conflicts between plugins and the incompatibility with WordPress are both possible to cause 500 Error. Unfortunately, it’s unable to find the cause with easy method.
You need to disable all plugins of your site at once. If the error is successfully fixed, you can make sure that one or some specific plugins results in this error. So you can reactivate plugins one after the another until finding the one caused this issue. Then, delete it and feed issue to the developer.
Seriously, you may be unable to solve the error by disabling all plugins. In this condition, you can re-upload the WordPress core files or just contact the web host for helps.
Some Other Great Tips
Besides these critical and must-do steps, you can also consider the following tips to deal with this issue.
Reloading Page
Try reloading the webpage by pressing F5, clicking refresh button on your browser, CTRL + R or retype the address on the address bar of your browser. This is important as the issue may be temporary and clears out within a short time. Reloads are mostly successful.
Delete Browser Cookies
The error may be caused by cookies form the site you are trying to access. Delete browser cookies and then restart your browser to see if the problem has cleared out.
Clear Browser’s Cache
Issues related to the cached version of the page you need to access may cause the 500 HTTP issues. Though this is not a common cause, you may try clearing the cache as it is harmless. Some problems are solved by simply clearing the cache.
Troubleshoot 504 Gateway Timeout
Sometimes the server may return a 500 error when it was supposed to be Timeout error. Though this is uncommon, you should troubleshoot the 504 gateway timeout just to explore more fixing ways.
Talk to your Web Host If It Persist
If after trying a number of methods, there is still and error, you should talk to your web host to look into the problem and get a lasting solution. If the problem is permission settings, you can get them to change your permission settings. You can also ask the web host to increase the timeout duration temporarily to minimize the issues of getting the 500 error.
Don’t leave It Unsolved
As the problem is temporary, some people prefer leaving for some time and then coming back later after it clears. This can divert your customers from your site if the error stays for long. You can try trouble shooting the error by turning on error reporting from your sites FTP or website cPanel and then refreshing the pages to see if the error has cleared.
You can search for more ways on how to fix 500 internal server error on the internet and ensure you do not lose any of your readers or customers from your site. The error is not as scary as many purport it to be.