A 500 internal server error is so annoying isn’t? If you are a website owner and if your web pages return this you are in trouble. You will lose traffic and will most probably annoy your visitors.
And since your visitors will bounce off your website, a HTTP 500 internal error (or any type of error for that matter) will increase your site’s bounce rate.
This isn’t a good sign as far as search engine optimisation is concerned.
If your visitors leave your site as soon as they land (they will, because they’ve come to a dead end) your rankings might go down – if you don’t take immediate action to fix the issue.
And the worst thing is this – your visitors won’t be able to do anything except in some cases, they might be shown a message that tells them to contact the webmaster.
And again in most cases, the email address provided on that page might not be the actual webmaster’s mail id. So your visitors are really helpless and they can do nothing except leaving your site.
So what can you do as a webmaster when you encounter a 500 internal server error?
You have to find out why the 500 internal server error occurs so you can solve the issue.
Now, it is not so easy and straightforward coz an internal server error means that the server says “something’s wrong” but cannot specify what exactly the problem is.
That’s quite unfortunate, right? But there are quite some common causes as to why this error occurs. So you can narrow down your investigation based on these causes.
What does an internal server error mean?
It’s not your problem!
Seriously, that’s what it means. An internal server error is a server side problem. When you type a particular URL into the address bar or if you clicked a link, you are requesting the server to display a page.
Now, for some reason, the server is unable to show you that page and that is why it raises its hands (not literally) and tells you there’s an error.
The “500” is the server response code for this type of error and “internal” means that the error is on the server side (within the server) and not at your side.
Before you jump into conclusions about the 500 internal server error and check out for solutions, you should do certain things to ensure that this error is not caused by you!
Yes you heard me right, a simple mistake in copying and pasting a URL can cause this error. Sounds lame, right? So you might want to check if the URL is correct.
And then you should also check out the following things:
- Have you tried a different browser?
- Clear your browser cache and try one more time.
- Try refreshing/reloading the page one more time.
Alright, so you have tried all these and you still encounter the same error? Now its time to roll up your sleeves and do some more investigation.
A corrupt .htaccess file
Yup! If your .htaccess file is corrupt this can cause a 500 error. In this case you should first access your .htaccess file either through FTP or through the File Manager in your cPanel.
You should ideally look at the root folder or the same folder as where your wp-content, wp-admin and wp-includes folders are. Now rename your .htaccess to .htaccess-backup or something like that.
Instead of renaming the .htaccess file, you could also download a copy of the file to your computer and delete it in your server.
Now, reload your website to see if the 500 internal server error is fixed. If it is fixed, then your .htaccess file is the culprit.
Login to your WordPress dashboard, and go to Settings > Permalinks and click the Save button. This will generate a new .htaccess file. After you are done with this, visit your website and check if your blog posts and other pages load fine without any error.
If the 500 internal server error does not go away after this step, read on…
You probably installed a new plugin. And it could be conflicting with other plugins on your site or with any of the scripts on your site. So you might want to check on the plugins.
No matter if you have too many plugins or only a handful of them checking on the plugins could be a tedious job 🙂 The easiest way is to disable all of your plugins at once.
Since you cannot access your WordPress dashboard now (because of the 500 internal server error), you should access your files via the FTP or the File Manager.
Go to wp-content and you will see your “plugins” folder. Now, rename that folder as plugins-backup – this way you have disabled all the plugins in your site.
Now try accessing your site on a browser (type in the address in a new tab or refresh the page that you had already loaded).
If you are now able to access your site, then the issue is caused by one of the plugins on your site.
Now, it can be a new plugin, as I said already. Or it can be an old plugin that you had been using for quite a while without any problems but is recently conflicting with any updates or new scripts – think about these:
- Did you update WordPress recently?
- Did you update any of the plugins on the site?
- Did you add any new script to your site?
Now that you can access your site, you should login to your WordPress dashboard and visit the Plugins section. From there you will see a list of all the plugins on your site (they will all be deactivated as of now).
Go ahead and activate the plugins one by one and see if you get the 500 internal server error (at every step while you activate each plugin).
This way you can identify which plugin caused the error. Once you identify the plugin, you might choose to either get rid of that plugin altogether, or find out what causes the conflict and fix it!
You could be exhausting your PHP memory limit
Your php memory could be exhausted by some culprit in your site. It could be a poorly coded plugin, or a script or even your theme. The immediate thing you could try is to increase your php memory limit.
You could contact your hosting provider for the same or you could do it yourself if you are comfortable doing it.
Open your wp-config.php file either via FTP or via your File Manager (through cPanel) and add the following line inside the main php tag:
and save the file.
If lack of php memory is the cause then this will temporarily fix the issue. You should then contact your hosting provider to find out what is exhausting the php memory.
If the 500 internal server error is appeared only when you tried to upload a media file or only when you access the admin side of the site (while the front end works fine) you should do the following things:
- Access the wp-admin folder from the File Manager (cPanel) or via FTP
- Inside the folder, create a new file called php.ini
- Open that file and add this line: memory=64MB
- Save the file (Save and upload it to wp-admin folder if you are accessing via FTP).
You should then go ahead and contact your hosting provider to find out the cause of php memory limit exhaustion.
Corrupt core files
Well, sometimes the core files in your WordPress installation could be corrupt for any reason. If you had already tried deactivating and activating your plugins and still have not found the solution, you should go to https://wordpress.org/download/ and download the latest version of WordPress (and save it to your computer).
Once done, open up the folder in your computer and you will see the following folders: wp-admin, wp-includes.
Using FTP, upload these folders (replace) from your computer to your site/server. Since you are only replacing these two folders, none of your site’s information will be lost.
If nothing helps ….
You should contact your hosting provider immediately. And tell them what you have already tried in an attempt to overcome the error – this should save you (and the support staff) both time and effort.
Oh and one more thing!
If you are a user (and not a webmaster) who encountered the 500 internal server error while making a purchase or while entering credit card details, you should not immediately make another attempt to complete the purchase/transaction.
You might end up doing multiple transactions! So wait for sometime to see if the transaction/purchase went through before you make another attempt.
Hope this helps!