Website errors can haunt you in our dreams. When that dream is about 500 internal server error, then we can only pray it doesn’t become a reality. Why? Because 500 internal server is a very generic error that just tells us that “something is wrong”. What is wrong, well that’s something to be figured out.
In this article, we will explore 10 fixes that can help you resolve this error. We are going from easy to advanced fixes so that if the error gets resolved early on, you don’t need to explore the advanced fixes. However, if you need to try an advanced option then we recommend you to first take a backup of your site. This will save you a lot of frustration if things go south. Check out these 12 Best Plugins to Backup your WordPress Website.
Let’s get started with how to fix 500 internal server error.
1. Wait and Refresh
Sometimes things aren’t as permanent as we think them to be. This also applies to errors. The 500 internal server error you are facing might be a temporary one. There might be an increase in your website traffic or the server is utilizing more resources, who can really predict? Many times, shared hosting environments encounter these problems as one of the many sites that share server resources with you suddenly demands more resources. This causes the 500 internal server error for you.
The easiest way in this situation is to wait for some time and see if you can access the page again. Just wait for some time, refresh your page, and see if it’s working again.
No error? Wonderful. Pat yourself on the back and continue with your work. The Error was temporary after all. Hsshh! That definitely saved a lot of trouble.
2. Clear Browser Cache
You should see if clearing your browser cache can solve the error. If you don’t know what browser cache is or you need to know how to clear browser cache, then we suggest you read this simple guide:
How to Clear Browser Cache in The Latest Versions of All Major Browsers.
By clearing the browser cache, you can check if the issue is with browser cache. If it is, the error will be resolved at this step itself. If not, continue exploring the options.
3. Delete Browser cookies for the site
Sometimes clearing browser cookies can work as well. If clearing the browser cache does not solve the problem you can try clearing the cookies.
Here is how you can do it with Google Chrome.
Go to Settings>> Advanced>> Privacy and Security
Select the “Site Settings” option.
In the Site Settings screen, click on “Cookies”
The Cookies screen will appear. Select “See all cookies and site data”
Once you click the option, a list of sites will appear. Select your site and delete cookies.
After deleting cookies, restart your browser and see if the error is resolved.
4. Ask Your Web Host
If even after these simple fixes, you are still getting the 500 internal server error then you need to understand that it is your web host’s turn to do something about it. Of course, there are advanced fixes that you can try out on your own but why unnecessarily trouble yourself with the stuff that your web host can take care of? Don’t hesitate to ask your web host, you are paying for hosting after all.
Most web hosts provide live chat service or a support system of some kind. Reach out to them, ask them to resolve the error for you.
The next few fixes can be better handled by your web host. Your web host can fix these things for you or rather they should. At this stage, you host will at least respond with the reason for the problem or on a brighter note, with the solution for the same.
Many users have commented that after they contacted their web hosts, their problem was resolved. In the unlikely event, your web host does not resolve the error for you then you will know you need to switch to another host. A managed WordPress hosting solution like Nestify can be a better option.
While you think of changing your web host, there are still a few steps that you can take to resolve the HTTP error. Keep on reading.
5. Deactivate all the Plugins
Sometimes one or more plugins can cause the internal server error. In such a scenario, you can try deactivating all plugins and see if the error goes away.
In case you can access the admin area of your WordPress site, you can manually deactivate each plugin.
If you are not able to access the WordPress admin area, then you can connect to your site using an FTP client.
Once you are connected, go to the wp-content folder. In that folder, there is a folder named “Plugins”. To deactivate the plugins on your site, simply rename the folder to something else. For example, you can rename the folder as “Plugins_old”.
Once your plugins are deactivated, you can see if the site is working without any error. If the error is resolved then you can be sure that one of the plugins was the cause of the error. You can narrow down the culprit by activating each plugin one-by-one and checking the error at the same time.
If your web host supports WP CLI then you can deactivate all the plugins without having to access the plugins folder. Nestify supports WP-CLI.
6. Change Theme
If deactivating the plugins does not resolve the error then the next step is switching your theme. Some theme functions may cause problems and the error can occur. The best way to be sure is to revert to a default WP theme like Twenty Ninteen and see if the error persists.
If you are not able to access the WordPress admin area, then you can switch to the default theme by simply renaming your current theme file.
7. Check for Corrupt htaccess file
Sometimes a corrupt htaccess file may throw an error like 500 internal server error. How to resolve the error in such a case?
Follow these steps:
- Connect to your site using FTP and locate the .htaccess file
- Rename the file. For example, .htaccess_old
- Check your site and see if the problem is solved
- If yes, then you just need to do one last thing: Go to Settings>>Permalinks in the WordPress Dashboard and “Save settings” without making any changes. This will create a new .htaccess file with proper rewrite rules that will work well with your site.
You can move on to other options if this error does not solve your problem.
8. Increase PHP memory limit
Sometimes the insufficient memory allocated to PHP can be the cause of the trouble. You can try increasing the PHP memory limit.
There are three ways:
If you have access to your PHP.ini file then edit the file and add the following line of code.
You may just have to change the value from 64 to 256.
Simply add the following line to your .htaccess file:
php_value memory_limit 256M
Add the following line to the top of your wp-config.php file
Note that your web host may have restricted the allocated memory in which case above codes will not work. Check with your web host about the memory limits.
9. Reupload wp-admin and wp-includes folder
Sometimes there is some problem with the wp-admin and wp-includes folder of the WordPress installation.
You can resolve this issue by downloading a fresh WordPress installation file and upload the “wp-admin” and “wp-includes” folders to your site using FTP.
You will be asked if you want to overwrite the files. Select “Overwrite”. Also, check the box that says “Always use this action” and click OK.
The FTP will upload the WordPress files. If the problem was due to corrupt WordPress files, then this step will resolve the error.
10. Change File Permissions
The only remaining fix for you to try is to change upload folder permissions.
How to do that?
- First, connect to your FTP site using an FTP client.
2. Go to the root directory of your WordPress site.
3. Select all the folders in the root directory. Right click and select “File Permissions”.
4. File Permissions dialog box will open. Enter 755 in the “Numeric Value” field.
5. Tick the box that says “Recurse into subdirectories”.
6. Select the “Apply to directories only” option. Click on “OK”.
By now, the error should be resolved. If not, you need not be disheartened. You have explored all the options. It is up to your web host to do some work now. We hope this exhaustive article gave you comprehensive ways to tackle the 500 internal server error. Hope one of these fixes work for you. Did you find another fix? Do share in the comments.