Do you want to fix HTTP 500 Internal Server Error on your WordPress website or blog?
Then this blog will help you to resolve 500 internal server errors on your WordPress website or blog in free.
The 500 internal server error is a type of error that runs on every page of a WordPress website when there is an issue with the server.
It usually occurs in the directory where the WordPress files are, but sometimes can be caused by a problem on the web host’s server.
This error is one of the most severe and frustrating errors on a WordPress website. One day everything is working just fine and the next, you start observing a 500 internal error on every page of your website.
While there is no straightforward solution, there are some things you can do to fix 500 internal server error on your WordPress website.
In this blog post, I am going to try to help you resolve the issue by suggesting the solutions that work and walk you through each of them.
Let’s get started.
What is 500 Internal Server Error?
500 Internal Server Error is a type of HTTP error that occurs when the server is unable to display the requested page. It is a server-side error that can occur on your web host’s server.
Usually, when you enter a specific URL into a browser’s address bar, you are requesting the server to display a page. The same thing happens when you click a link on a website.
If the server can’t show the specific page, you requested for, that’s a clear indication that you are facing an internal server error.
Creating a Back Up For Your Site
The first thing you need to do before starting to fix the error is to back up your WordPress website.
The solutions I’m going to talk about are so intensive, and to avoid making more mistakes that may cause more errors, backing your site should be a priority.
If your web hosting provider doesn’t provide you with the right solutions to back up your WordPress website, you can try the WordPress Backup Plugins.
How to Fix 500 Internal Server Error on Your WordPress Website?
The most common causes of this error include:
- Corrupted .htaccess file
- Exceeding the server’s PHP memory limit
- Outdated Plugin
The .htaccess file in a WordPress site can be corrupted after a plugin is installed on a WordPress website. To fix this, you will need to create a new .htacces file.
When a poorly-coded plugin is installed to an old WordPress site that is using too many plugins, the PHP memory limit of the server may be exceeded. And, the result is an HTTP 500 internal server error.
Let us learn how to fix the two issues.
1. Fixing the .htacces File Issue
First, you will need to log in to your FTP account to be able to determine the issue. You can use an FTP client like FileZilla. Well, there are many FTP clients out there, but for a demonstration, we will use FileZilla in this guide.
Once you have logged in, open your WordPress root directory where you will be able to see a .htaccess file together with other folders like wp-content, wp-admin and wp-include.
The next step is to rename the .htaccess file. This will delete your site’s .htaccess file and allow us to create a new one.
Once you have renamed it, go to your WordPress admin dashboard, then go to Settings>>Permalinks then scroll down, and click Save Changes.
Now is the time to test if a corrupted .htaccess file caused the problem.
Open your website in a browser. If the error is gone, it means that a corrupted .htaccess file caused it and the problem has been resolved. If the error still exists, you will have to run more tests on your site to identify and fix the problem.
Pro Tip: The .htaccess file must not be named anything other than “.htaccess”. You can rename it to .htaccess.new or .htaccess.anything. An improper naming may still cause the 500 Internal Server Error to run on your site.
2. Increasing the PHP Memory Limit in WordPress
The web host always sets the PHP Memory limit. For shared hosting, this limit is usually lower.
If you experience this error when logging in to your WordPress admin dashboard or uploading an image, you should try to increase the memory limit.
Open the directory containing the WordPress files, then locate the wp-config.php file. Download the file to your computer. Open the file with your preferred text editor, and add the code below under the opening PHP tag:
Please save the file and then upload it back to the wp-admin folder using the FTP client.
Refresh your client and the site.
If the error is gone, it means that the PHP memory limit was the cause.
That’s just the beginning.
It would be best if you still found out which file is exhausting your memory limit. The best thing to do is to ask your web host to check the server logs to find the exact cause.
If the error still exists, you will need to run more tests.
3. Deactivating All WordPress Plugins
Sometimes, a faulty or outdated plugin can cause problems leading to errors such as 500 internal errors in a WordPress website.
If you have access to your WordPress admin dashboard, you will need to deactivate the plugins, one by one, and each time refreshing the site.
If the error disappears after deactivating a particular plugin, it will mean that it was the plugin causing the error. You will need to delete it off your WordPress installation.
If you are unable to access your WordPress admin dashboard, you will need to open your FTP client.
Locate the wp-content folder which contains Themes, Plugins and other folders. Rename the Plugins folder to anything of your choice, say “plugins.test.” This will deactivate all the plugins.
The next step will be to refresh your website. If the error is gone and everything works perfectly okay, it means one of the plugins was the cause for the error.
You will need to activate the plugins, one by one, and each time refreshing the site. If on activating a plugin the error reappears, that particular plugin would be the cause of the error. You will need to delete it off your WordPress installation.
Once you are done, make sure you rename the plugin folder back to “Plugins.”
4. Contact your Web Hosting Provider
If any of the above methods fail to fix the error, you will need to get more help. Contact your web hosting provider so they can help you identify the exact cause of the error by checking the server logs.
In most cases, the web hosting support team will help you resolve the issue.
I hope you were able to fix the WordPress 500 internal server error issue. If the error was as a result of an exceeded PHP memory limit, you might want to upgrade your hosting package. Go for a package that can handle massive requests.
Also, ensure that everything is up to date. That includes WordPress core files, WordPress themes, and WordPress plugins.
If you liked this article then please share this article on Facebook and Twitter.