Troubleshooting a HTTP 500 internal server error is like solving a mystery.
You don't know what exactly happened or why it happened — all you know is that something's wrong and you need to fix it.
To guide you through the hassle of troubleshooting the dreaded HTTP 500 internal server error, let's go over what it exactly means and its most common causes and solutions.
What is a HTTP 500 internal server error?
A HTTP 500 internal server error means your web server is experiencing problems, but it can't pinpoint the specific error or its root causes. When this happens, your website will serve up a general internal server error web page to your site's visitors.
Potential Causes of a 500 Internal Server Error
A 500 internal server error is, as the name implies, a general problem with the website's server. More than likely, this means there's an issue or temporary glitch with the website's programming.
Some potential causes include:
- Corrupted or broken .htaccess file
- A permissions error
- Faulty third-party plugins or themes
- the PHP memory limit being exceeded
However, the difficulty with a 500 internal server error is it doesn't immediately tell you what the problem is, or how to fix it. Let's dive into a few potential solutions you can try to fix the issue.
How to Fix a 500 Internal Server Error
Fortunately, there are a few effective solutions for fixing most HTTP 500 Internal Server Errors.
If You're Trying to Load a Page with a 500 Internal Server Error
1. Refresh the page.
This might seem obvious, but if it's a temporary loading issue, you might find success if you refresh the page. Before trying anything else in this list, reload the page and see what happens.
2. Come back later.
Since the error is on the server-side, I'm willing to bet the website owners are working as quickly as possible to resolve the issue. Give it a few minutes or upwards of an hour or two, and then reload the URL and see if the development team has fixed the issue.
3. Delete your browser's cookies.
If clearing the browser history doesn't work, you might try deleting your browser's cookies. If the cookies are associated with the error-prone webpage, deleting the cookies might help reload the page.
4. Paste your URL into the website "Down for Everyone or Just Me."
This URL should help you copy-and-paste the URL where you're seeing the internal server error. If it's a problem with the server, you'll see a message that says, "It's not just you! [URL] is down for everyone." This should help assuage any concerns that it's an issue with your own computer.
If the 500 Internal Server Error is on Your Own Website
1. Deactivate a plugin or theme.
Newly activated plugin or themes might conflict with your current plugins or themes. Deactivate them one at a time to identify the exact plugins or themes causing the internal server error.
Alternatively, if you just upgraded your software, your current plugins or themes might not be compatible with the new upgrade. Deactivating plugins or themes one at a time until the error disappears is the best way to find the root cause of your problem.2. Use a plugin like WP Debugging to identify the issue.
If your site is hosted on WordPress, consider installing a plugin to help you identify the issue. This debugger plugin, for instance, helps you figure out exactly what's wrong with your site, which will result in a speedier fix.
To learn how to download the plugin, take a look at our post, How to Fix "is currently unable to handle this request" in WordPress [HTTP Error 500].
3. Ensure your PHP setup is configured correctly.
If the issue is related to a PHP timeout, consider creating timeout rules or error handling in your script to resolve the issue. Here's a full list of php.ini directives to configure your PHP setup.
Additionally, wrong permissions on a file or folder that has a script, like a PHP or CGI script, won't allow the script to run. Check your permissions and make sure you set them correctly on your server.4. Check the code for your site's .htaccess file.
Incorrect coding or improper structure with your .htaccess file could be the reason you're seeing the 500 internal error. A .htaccess file helps you manage how long resources should be stored in a browser's cache. Try editing the file if you're seeing a 500 internal server error.
Coding errors of an .htcaccess file and custom scripts can also cause an HTTP 500 internal server error.
5. Ensure your new software installed correctly.
Check to see if your recently installed or upgraded software actually failed to install or upgrade. To refresh your software, check the vendor's website for instructions.
Asking a Server Administrator for Help
If troubleshooting popular software problems or debugging server-side scripts doesn't fix your HTTP 500 internal server error, you should read about the most common causes for this type of issue in your server's documentation — an HTTP 500 internal server error can occur in different operating systems for a multitude of reasons.
You can also ask your server provider to access your error logs and find evidence for the root cause of your problem.