Sometimes things happen. Sometimes things happen for no reason at all. However, most likely things do happen for a reason — even if that reason isn’t immediately obvious. When something does happen there is usually an error code that helps to point us in the right direction.
You might be familiar with the 404 Not Found or maybe the 301 Redirect (which isn’t an error at all, but redirect too many times and you’ll be in for a surprise!). Sometimes things go wrong and all you get is a “Something is broken!” message… Ah, our old friend 500 Internal Server Error.
Keep reading to learn about the 500 Internal Server Error on WordPress. Learn the steps you can take to fix an Internal Server Error on WordPress in this blog.
What Is A 500 Internal Server Error?
A 500 Internal Server Error is a message you’ll see on some websites when something unexpected happens. It means that there is something wrong with the website — not your browser or internet connection.
While the specific wording varies by server, for a 500 Internal Server Error on WordPress
you should see something like:
- 500 Internal Server Error
- Error 500
- Internal Server Error
- Server Error 500
- HTTP 500 Error
What Are The Causes Of an Internal Server Error 500?
When something unexpected happens, and there is not a more fitting error code you will see a 500 Internal Server Error. Causes include file corruption, permission errors, plugins, and more. This can seem intimidating, but at this point at least you know that there is a problem — and you can go about fixing it.
Steps To Fix A 500 Internal Server Error On A WordPress Website
Plugins Causing a 500 Internal Server Error
With a plugin-based system like WordPress, plugins written by different authors (and at different points in time) can conflict with each other. This is certainly the kind of thing that can cause unexpected errors. In this case, in order to identify the problem, you will need to disable all of your plugins and then re-enable them one-by-one until the error is reproduced.
If you have access to the wp-admin, then you can log in to your WordPress dashboard and using the plugins menu screen deactivate all plugins in bulk. If you do not have access to the wp-admin (presumably because of the 500 error) then you can disable plugins manually by temporarily renaming the plugin folders on the server.
Once you find the plugin that is causing the error you can try rolling back the plugin version to a previous version that does not cause the error. If rolling back the plugin version resolves the issue, then it would be helpful to reach out to the plugin developer to let them know of the error.
Check the Error Logs
Even though the server error is unexpected, there are often troubleshooting notes in the error log. These errors are not publicly visible and can only be accessed via the server.
Developers add these private error messages as breadcrumbs so that they can trace a problem (such as a 500 error) related to the server without accidentally exposing secret server information, such as the server configuration.
This information is very valuable to both developers and hackers, so these error messages are kept privately in the error log on the server.
If you are not seeing anything listed in the error log, you will want to make sure that WP_DEBUG is configured correctly on your site to log errors. This can be helpful to get troubleshooting information without displaying the error message publicly.
Perhaps the best advice for preventing unexpected errors on your website is to be proactive and check for errors yourself before publishing changes.
When you make a change to your website, such as installing a new plugin, test out common features of your website. You can take this a step further and use what is called a development environment or a development site.
Can A Server Error 500 Be Prevented?
By their nature, 500 errors are reserved for the unexpected and it is difficult to prepare for the unexpected. However, you can update your workflow to catch potential 500 errors by using a development site.
Before you make changes on your website, like installing a new plugin or changing the theme, making those changes on a development site will allow you to check for errors before migrating those changes to your public website.
Consider WordPress Hosting With Hostdedi
Sometimes things happen. The important part is how we react to things when they happen.
A host offering fully managed WordPress hosting will provide the tools that you need to handle errors as they happen — because at some point they will happen.
Check out fully managed WordPress hosting plans by Hostdedi to get started today.