Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  How to Fix the 500 Internal Server Error on a WordPress Website?
Top Scroll

How to Fix the 500 Internal Server Error on a WordPress Website?

 7 min

The internal server error(http error 500) is the most irritating issue for any WordPress website compared to other HTTP error codes and status codes. You will have no clear information about the problem even when your hosting server is working okay.

We have tried to cover every aspect of the 500 internal server error in this article. By the time you finish reading this piece, you will be capable enough to fix this issue yourself in the future.

What is the 500 Internal Server Error?

If you Google the 500 internal server error, you may find various explanations, but they are still unclear. After all, the error notification does not offer any real clues to what went wrong and caused the problem.

Even though the 500 error is due to some issue on the server itself, our experience speaks that these errors generally occur from one of two reasons:

  • error in the website coding(client-side issue)
  • server malfunction

No matter what caused the internal server error, remember, it usually has something to do with the website itself. If you have a WordPress website, the error may have occurred if the script of your theme or plugin was somehow flawed or has a bug. That may have been the reason to make the server crash.

Now that you know what the 500 internal server error is, it is time to fix it.

How to Fix/Troubleshoot 500 Internal Server Error?

The problem with the 500 internal server error is that there isn’t a clear way of knowing its cause. At times, it is possible that all of it is a minor glitch in the system. It can go away once you refresh the website and reload the page after waiting for a couple of minutes. Sometimes, clearing the browser history will do the trick so try doing that before exploring further troubleshooting options.

If these don’t work, we have other ways to crack this problem.

1. Try Enabling Error Logs

You have to enable the debugging feature for WordPress by editing the wp-config.php file of your website. All you have to do is add a line to the code:

define( "WP_DEBUG", true );

Click the Save button and try reloading your site. There is a chance that the server error will be gone and, a different error that can tell you where the issue is will take its place.

Now, you can take a look at the location of the issue. If it is within a plugin folder, you can disable that plugin and, the error will be no more.

It is advisable to leave the debugging turned on until you resolve the error, even if it seems unnecessary. After all, turning on debugging may not fix the problem, but it may provide you additional details to help you better understand the issue. It will offer more insight to you and the developers into the root cause of the error.

Also, once you have resolved done with the maintenance, do not forget to turn the debugging off.

2. Deactivate Plugins and Change the WordPress Theme

Log in to your WordPress dashboard via the admin account and deactivate/disable all plugins. Check if the error still persists by reloading the website.

If everything goes back to normal and your website loads without the server error, you can assume that the issue was with one of the plugins. To figure out which one, you will have to activate and deactivate each plugin until you come across the one that causes the error.

If it is not your plugins, it is probably your website’s theme. Try to switch your WordPress theme to the default and consistent themes like Twenty Fifteen or Twenty Sixteen. Reload the site again once you have changed the theme to see if the error is still there.

In most cases, the cause of the error is usually some plugin with a bug or improper compatibility.

3. Reassess the .htaccess File

If your WordPress website has a .htaccess file, it will have a set of rules that tells the server what actions to take in certain circumstances. You can use the file to rewrite URLs or block access to your site to suspicious visitors.

You will have to edit the .htaccess file to see if one of the rules is the cause of the error. Create a backup of the file and remove all of its content. You may end up deleting some of the crucial rules. Still, it is the only way to know if the internal server error has occurred because of the .htaccess file. If it resolves the error, it will confirm that the issue lies within the .htaccess file.

Now to the grinding!

Restore the complete file from the backup after deleting and restoring each of the blocks one at a time. Do not forget to keep reloading the website each time. This way, you can then remove that line and with it the 500 internal server error. If you are not confident with this method, ask your developer or call support for further assistance.

4. Increase the Memory Limit

It is rare, but there are times when your WordPress website passes the memory limit you assigned to it. It may cause the 500 internal server error and, to resolve it, you have to increase the memory limit for WordPress via the control panel. This issue is more common in shared environments.

If that resolves the error, you will have dealt with it only temporarily. There is a strong possibility of a malfunctioning code(probably a third-party plugin) that constantly requires a lot of memory. You will have to monitor your resource usage by activating/deactivating the plugins to determine which one is eating away at the allocated memory of your website.

If that resolves the error, you will have dealt with it only temporarily. There is a strong possibility of a malfunctioning code(probably a third-party plugin) that constantly requires a lot of memory. You will have to monitor your resource usage by activating/deactivating the plugins to determine which one is eating away at the allocated memory of your website.

5. Reinstall WordPress

You can try to go old school and resolve the issue in the simplest way by reinstalling the WordPress application. It is not a guaranteed solution to fix the error but, there is a chance it will fix file permission problems.

To do this, you will have to remove and install the WordPress application. I recommend you contact the support before proceeding with it.

6. Contact the Service Provider

As a user, there is a limit to diagnose and deal with the 500 internal server error. It is not uncommon that some issues leading to internal server errors in WordPress are actually related to the server-end. It means you will have to involve the hosting provider and discuss the problem with them.

Your provider can at least confirm if it is a genuine server issue or not. They can also investigate the probable sources causing the error, like file permissions to sort it.

7. Change/Upgrade the Hosting Service

If your site faces the 500 internal server error more often, you should consider switching to better service plans. Upgrading the service plans may cost a bit higher, but it saves you a great deal of trouble as it provides better server resources.

MilesWeb offers managed WordPress hosting and has WordPress optimized servers that have better compatibility to run WordPress sites. The service plans are inexpensive and provide a perfect WordPress experience between ₹40 to ₹170 per month.

To Summarize

Contrary to its description, the server-side is not always the cause behind the 500 internal server error in WordPress. You can try to locate and resolve the issue by yourself if you follow the solutions in this article. If you are having trouble following through, or none of these could fix the error, you will have to contact support as the issue may actually be in the server.

Generally, you can fix the 500 internal server error with these options as any support executive of any host would ask you to do the same.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.