How to fix the HTTP Error 500
I will share in this post how you can fix the HTTP Error 500.
I just transferred to a new hosting provider this month for many reasons, and, as expected, it was stressful. Buying a plan and migrating this site was easy, but the post-migration days were taxing. For the first few days, the site visitors and I experienced the HTTP Error 500. It scared me off. A part of me just wanted to stay with my old hosting provider, but then I’d remember why I wanted to have a new one.
The HTTP Error 500 or an Internal Server Error means that the server met an unexpected condition that stopped it from fulfilling the submitted request. There are many causes of this error. Some of the possible reasons are:
- PHP timeout
- Incorrect code in .htaccess
- Mod Security is enabled
- PHP memory limit
- Faulty third-party plugins
In this post, I will share how I tried to solve the HTTP error 500.
HOW YOU CAN FIX THE HTTP ERROR 500 IF YOU ARE THE WEBSITE OWNER?
1. Clear Cache
If you have a plugin for clearing your website’s cache, you may use it. As for my case, I have the LiteSpeed Cache, so I used it to clear the cache.
2. Disable the Mod Security
Mod Security is a web application firewall that blocks your site from hacking or exploit attempts. If you decide to disable it, you need to ENSURE that you regularly change your admin passwords using strong ones and keep your software and applications updated.
You can disable the Mod Security for the select domain by logging into your website’s cPanel.
3. Increase PHP memory limit
The memory limit determines how much memory a process may use. If more RAM is needed than what is available, this could result in an internal server error. As for my case, I requested my hosting provider to increase it from 256MB to 512MB because fixes 1 & 2 were futile, and we just migrated the files from my old hosting to the new one as it is, so no changes on the codes or structure were done.
This, ultimately, worked.
If these three suggestions do not work for you, contact your hosting provider immediately so they can assist you better.
HOW YOU CAN FIX THE HTTP ERROR 500 IF YOU ARE A WEBSITE VISITOR?
There is nothing much you can do if you encounter this error upon visiting a website as a website visitor. As mentioned, the cause of this problem lies in the server. This also means that there is nothing wrong with the settings of your PC or network connections. Thus, the easiest solution for you is to reload the page again or contact the website owner. I’m sure they’ll appreciate it, especially the latter 🙂