How to Fix a 500 Internal Server Error (Screenshots) 11 Quick Ways

The first thing I wanna say to you is, don’t panic! This error is very common and there are multiple ways to fix it. So, keep calm and follow the steps shown in the post to fix the 500 Internal Server Error.

The error 500 is a member of the 5xx family, which means the server has failed to complete a request. It also informs us that the server is, in fact, aware that it has experienced an error, or is not able to complete the request.

The problem with the 500 internal server error is that it doesn’t give many hints about what we need to fix in order to remove this error.

Sometimes the issue automatically gets fixed within a few minutes, but if it’s more than enough time and still the error is there, then it’s time to take the command on your hand.

Common Causes Of Error 500

Here is the list of things that can invite Error 500 on your wonderful website.

  • A corrupt or broken .htaccess file

.htaccess file is incredibly important for your website, it controls the high-level configuration of your website. The lightest of mistakes in this file could impact your site severely.

  • Poorly coded plugin or theme

Stay away from plugins or themes that are not updated. Always check the last update date, it should be compatible with your current version of your WordPress.

  • The PHP memory limit is exceeded

The PHP memory_limit is the maximum amount of server memory that per PHP script is permitted to consume. As per the PHP documentation: “This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts from eating up all available memory on a server.”

Even Google is not safe of it

What Exactly 500 Internal Server Error Means?

According to Mozilla, the HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic “catch-all” response. Usually, this indicates the server cannot find a better 5xx error code to respond. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.

Let’s understand it in simple terms, this error indicates that the server has faced some unexpected error, but it is unable to understand the exact cause of the error. The name of this error itself suggests that there is something wrong with the server “internally”

Like I said earlier, this error normally doesn’t provide any hint on what we need to fix in order to remove this error. So, we gonna look at some general ways that can help us fix it.

Other names of Error 500

Most of us use Google Chrome or Safari, but some people use a completely different browser, so the name of this error changes according to it, but they all communicate the same thing. Here are some other names of 500 Internal Server Error.

  • “500 Internal Server Error”
  • “Internal Server Error”
  • “HTTP 500”
  • “HTTP 500 – Internal Server Error”
  • “500 Error”
  • “HTTP Error 500”
  • “500 – Internal Server Error”
  • “500 Internal Server Error. Sorry something went wrong.”
  • “500. That’s an error. There was an error. Please try again later. That’s all we know.”
  • “The website cannot display the page – HTTP 500.”
  • “Is currently unable to handle this request. HTTP ERROR 500.”

You may also receive a message, stating –

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

If you’re currently on windows version above or equal to 7.0, then you might see some extra information like:

  • 500.0 – Module or ISAPI error occurred.
  • 500.11 – Application is shutting down on the web server.
  • 500.12 – Application is busy restarting on the web server.
  • 500.13 – Web server is too busy.
  • 500.15 – Direct requests for global.asax are not allowed.
  • 500.19 – Configuration data is invalid.
  • 500.21 – Module not recognized.
  • 500.22 – An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
  • 500.23 – An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
  • 500.24 – An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
  • 500.50 – A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.
  • 500.51 – A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.
  • 500.52 – A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
  • 500.53 – A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
    500.100 – Internal ASP error.

How To Fix 500 Internal Server Error

Before you proceed with the steps shown below, I request you to please create a backup of your site if you have not created it yet. Some steps involve risk, you may need to add some codes or edit a few things out, so creating a backup would be an intelligent move.

Also, the solutions listed below are arranged in order of easy to hard. Let’s begin!

Solution 1: Clear Cache & Cookies

Clearing your browser cache is always a great idea before proceeding with any other steps. Most of the site uses a feature called “Caching” to speed up their website loading time.

It’s a good feature and I suggest everyone enable it on their site, however, sometimes browsers store too much cache data which invites errors like 500, so open your browser now, and clear the cache data present in your browser to remove the extra burden from your browser. See it that fixes the issue.

Also, clearing cache and cookies may also remove saved passwords and user ID, I request you to download all the user ID and password data before clearing browser cache and cookies.

How To Clear Cache in Google Chrome

Google chrome is an amazing browser. Clearing cache & cookies in Chrome is absolutely easy. Here are the steps:

  • Open google chrome
  • Click on the three vertical dots visible at the top right corner
  • Click on Settings
  • Under Privacy and security, click on Clear Browsing Data
  • Select both Cookies and Cache, then click on Clear Data
  • Wait for a few seconds and your cache data will be removed
How To Clear Cache in Safari
  • Open Safari
  • Click on Safari Drop-down and then select Preferences.
  • Click the Advanced tab. Select the Show Develop menu in the menu bar checkbox and close the Preferences window.
  • Choose the Develop drop-down menu. Click Empty Cache. 
How To Clear Cache in Mozilla Firefox
  • Open Mozilla
  • Click the menu and select Settings.
  • Click on the Privacy & Security panel.
  • In the Cookies and Site Data section, click on Clear Data.
  • Click on “Clear”

Solution 2: Refresh The Page

Like I said earlier, this error may be a temporary error. Wait for a minute and try to refresh the page. Check on any other browser or any other device.

When I faced this error on my site, I just reload my site after 2 minutes, and the issue was gone. Sometimes your server gets overwhelmed by requests, especially when installing a heavy plugin or a theme, your server automatically goes off for a couple of minutes then comes back.

Additionally, you can go to site24x7.com to check your site’s current status. If you get status code 200, then that means your site is active and there is no error present.

Here is the result that I got when I checked my website status.

You can see in the screenshot above, the status is “Ok” which means, my site doesn’t have any error.

Solution 3: Deactivate All Your Plugins

If you got this error just after activating a plugin on your site, then you need to deactivate it as soon as possible, however, due to this error most of you wouldn’t be able to login into your WordPress dashboard, and that’s we gonna see how we can deactivate plugins using our hosting panel.

Sometimes we don’t know which plugin has actually caused the issue, so we gonna deactivate every plugin present on our site, and once every plugin is deactivated, we’re gonna activate them one by one. By following this method, we’ll find the faulty plugin.

Once you know which plugin was causing the issue, simply delete it and find its alternative. Now, let’s look at the steps you need to take to deactivate plugins present on your site.

Step 1: Log in to your hosting panel

I’m gonna show you the steps of cPanel. No issues if you’re currently using any different hosting panel because the steps shown here are the same for every hosting panel.

Use yoursite.com/cpanel to get to the login page of cPanel. Once you’re there, enter the user ID and password. If you don’t remember your User Id and Password then check the email you received just after purchasing the hosting plan.

Step 2: Open your File Manager

Look for File Manager once you’ve successfully logged in. The File Manager is available under Files. Click on it to open it. Btw, you can use the search option present at the top to find File Manager quickly.

Step 3: Click on public_html

public_html folder is an extremely important folder. It contains important folders and files like wp-content and .htaccess

Double click on the public_html folder to open it.

Step 4: Open wp-content Folder

The wp-content folder holds information about plugins and themes. Double click on it to open it.

Step 5: Change the name of the plugins folder

Now, it is the most important part. You have to change the name of the “plugins” folder, you can name it anything you want.

For example, I have named it “plugins-test”. From “plugins” to “plugins-test”. The rename option is available at the top menu bar. Or, right-click on the plugins folder, you’ll find the rename option.

Click on “Rename file” once it’s done.

Step 6: Check your website

Go to your website and refresh it. Congrats if it is working, you’ll find that all the plugins are deactivated, don’t activate them because the work isn’t finished yet. Check next step.

Step 7: Rename the plugins folder to its original name

Come back to your wp-content folder and rename the plugins folder to its original name. For example, I had named it “plugins-test” so I’ll rename it back to its original name which is “plugins”.

Click on “Rename file” once you change the name.

Step 8: Activate plugins one by one

Now come back to your site, go to plugins, and activate every plugin one by one except that defaulter plugin.

Report about the plugin to its developer, and find the perfect replacement for it.

Solution 4: Deactivate your theme

A poorly coded theme is very risky. It makes your site slower, invites unwanted errors and hackers. If you think a theme has caused this issue, then follow the steps given below to deactivate the current theme.

The steps are almost similar to solution 3, but please make sure, you have your backup ready, in case something went wrong.

We’re gonna use the control panel again because due to this error most of you would not able to log in to your wp dashboard.

Step 1: Log in to your control panel

Head over to your hosting control panel and log in there.

Step 2: Click File Manager under Files

Once you’re inside your hosting panel. Click on File Manager, it is available under Files.

Step 3: Open public_html Folder

public_html should be visible to you, in case, you’re unable to find it, use the search bar or click on “show hidden files” in settings.

Step 4: Open wp-content Folder

wp-content folder hols information about plugins and themes. Double click on it to open it.

Step 5: Click on “themes” Folder

Under the themes folder, you’ll find all the themes present on your website.

Select the theme which is currently activated on your website.

Step 6: Rename the defaulter theme

Right-click on the theme and click on “Rename”. Now, change the name of the theme, you can name it anything you want.

For example, the theme which is currently activated on one of my sites is “contentberg” so I’m gonna change its name to something else like “contentberg-test”.

Click on “Rename File” once you rename.

Step 7: Check your website

Check your website, it should work. However, you’ll find something different. Don’t worry, follow the next step.

Step 8: Change the theme folder name to its original name

Come back to the wp-content folder, and change the name of the theme to its original name. For example, I had named it “contentberg-test”, so I’ll change it back to its original name, which is “contentberg”.

Click on “Rename File” to save the changes.

Step 9: Activate the theme

Come back to your site and activate the theme. If you again face the same issue after activating it, then repeat the steps and deactivate the theme again. Contact the theme developer and ask them to fix the theme issue. Use any different theme until the developer responds.

Solution 5: Check the Server Status

Premium hosts like Kinsta, Cloudways, Hostinger, and Vultr, let you check the current status of your server. checking the server status can really help us understand what went wrong.

If you notice a sudden spike in the server usage graph, it indicates that a bot attack happened on your site recently. These heavy bot attacks can bring errors like 500 Internal Server errors on your site.

It’s extremely important to stop these bad bots from accessing your website. Let’s first learn how to check the server status, and after that, we’ll see how to turn on “bot Protection” for your site.

How to check the server status

(Note: I’ve used Hostinger’s hPanel to show the steps, the steps could be different for different hosts.)

Step 1: Log in to your hosting control panel

Login to your CPanel and follow the below steps.

Step 2: Click on Manage

Once you’re in, click Manage under Hosting.

Step 3: Click on Order Usage

The Order Usage option is available under Order.

Step 4: Check the order usage graph

Check for any unexpected spike. In the screenshot below, you can see there is no sudden spike. If there was any bot attack carried out on your site recently, you will see a spike. If that orange dash line is crossed, then your website will not work. The orange line is the limitation.

How to stop bad bots from accessing your website

To stop these bad bots, we first need to connect our site to a CDN. I’m currently using Cloudflare as it is free to use and gives solid protection to my site. You can signup up for Cloudflare for free and follow the steps shown below to turn on Bot Protection.

Step 1: Login to Cloudflare

Go to cloudflare.com, enter your user ID and password, and hit “Login”

Step 2: Click Firewall and Select Bots

The Firewall option is visible on the left side menu. Click on it, and then select “Bots”.

Step 3: Turn On Bot Fight Mode

According to Cloudflare, Bot Fight Mode is an easy, free product that detects and mitigates bot traffic on your domain. Once it’s enabled, it Identifies traffic matching patterns of known bots. Issues computationally expensive challenges in reply to these bots.

Bot Fight Mode On

Go to your website, and check the status. If the error occurred due to heavy bot traffic, this will resolve the issue.

Solution 6: Check Your Error_Log File

The error log is a type of file that contains information about website-generated errors. This file can help us know the root cause of the error 500. Error Log displays the last 300 errors of your site. This can be very helpful.

Also, the Error log detects the date, time, IP, and page the error occurred 

We can take the advantage of this to fix the problem. But first, we need to know the exact location of this file. Let’s see how to check the error_log in cPanel.

How To Check Error Log File in cPanel

(Note: Some of you may not see the Error log file in their hosting control panel. In that scenario, you’ll have to create an error log file by clicking on the “Add File” button, If you’re a beginner, I recommend contacting your host)

Step 1: Log in to your cPanel

Head over to your cPanel, use your user ID and password to get logged in.

Step 2: Open File Manager

The File manager option is visible under “Files”, click on it.

Step 3: Open public_html Folder

public_html folder is available just below public_ftp. Double click on it once you find it.

Step 4: Look for the error_log file and open it

The error_log file may not be visible to you in the first place. If it is visible to you, then click on it to open it, if it isn’t, then click on the “Setting” icon, and after that select “Show Hidden file”

If the file error_log isn’t visible to you, then click on “settings” and then click “Show Hidden Files”

Step 5: Read the error_log file

Now, once the file is open, you can get the information about when the error 500 appeared on your site. The file will look something like this:

Error log file

As you can see in the above image, the last error that appeared on my website was on 23 November 2021 at 03:16:10 UTC, it was just a warning, and the error_log file inform me that a plugin (Wordfence) caused this issue,

After knowing what has caused the issue, I can take the action accordingly. I can either delete the plugin or deactivate it.

Solution 7: Increase The PHP Memory Limit

Maybe your website needs more than the default amount of memory. Normally, limitation in PHP memory limit results in errors like “Allowed Memory Size Exhausted” but in some cases, it can invite 500 Internal Server Error as well.

Follow the method shown below to increase the PHP memory limit. There are three methods available but the easiest way to increase the PHP limit is by using the MultiPHP INI Editor tool. To find that tool, you’ll have to use your cPanel.

  • Step 1: Log in to your control panel.

The first step is always going to be the same, go to your control panel and login there.

  • Step 2: Click on MultiPHP INI Editor

Once you’re successfully logged in to your account, scroll down a little bit, and under the Software section, the MultiPHP INI Editor option is available.

  • Step 3: Select the domain

Select the domain from the drop-down. Now, here you’ll see two modes, Basic and Editor mode, you don’t need to click on Editor mode.

  • Step 4: Update the memory limit

Now, it is the most important part. You’ll have to find the “memory_limit” PHP Directive. To find it, just scroll down a bit or use the ctrl+F keys to search.

If you see a PHP memory limit of 64M or 128M, update the memory limit to 256MB, and click on Apply.

Congratulations, the PHP memory limit has been updated. Now, go to your site and check if the error is still there. If it is not, then that means the limited memory in PHP was causing the issue.

Also, if you wanna know some other methods to increase the PHP limit, read this article!

Solution 8: Update The PHP Version

There are numerous disadvantages of using an older PHP version. One of them is the 500 Internal Server Error. Yes! using an older PHP version might cause 500 Internal Server Error. However, the possibility is kinda less. But we can’t take it lightly, can we?

Updating the PHP version of the site is quite easy, you don’t have to be a tech geek to do this, follow the instruction below to check what is the current PHP version of your site and how to update it.

How to check the current PHP version of your site

As I said, it is simple, however, you need to login to your cPanel, there are other ways as well, like using the WordPress Tool section,  Tools > Site Health>Server. But due to 500 Internal Server Error, it is nearly impossible to log in to your WordPress dashboard.

So, log in to cPanel, and click MultiPHP Manager under Software. The PHP version will be visible to you under System PHP Version.

As you can see, the current version of the site is 7.3 which is very average, the recommended PHP version is 7.4 or greater than that. If you see a version below 7, it’s time to update it.

How to update PHP version

(Before I begin, I just wanna let you know, updating the PHP version is a risky game, it might hurt your site, so please create a backup before going for it.)

Go to MultiPHP Manager, then under “Set PHP Version per Domain” select the domain and the PHP version you wanna update your website to from the drop-down. Click on “Apply” after selecting the PHP version.

Btw, I have published a post in which I’ve discussed how to update PHP versions, I’ve covered every major host like Bluehost, HostGator, SiteGround, etc, check it here.

Solution 9: Fix The Corrupt .htaccess File

Fixing your corrupt .htaccess file can also help to fix the 500 Internal Server Error. The .htaccess file is a very important file, it holds information about rules that give your website’s server various instructions. Just about every WordPress site has an .htaccess file, found in the ‘root’ or central directory.

We gonna reset the .htaccess file, and to do that, we need to change the name of the .htaccess to something else, like “.htaccess-test”. After that, we need to create another .htaccess file. Let’s see how to do this.

Step 1: Login to cPanel and click File Manager

Go to your host’s control panel. Once you’re there, click on File Manager.

Step 2: Rename the .htaccess file to .htaccess-test

The .htacces file may not be visible to you, if you’re unable to find it, then use the Settings option available at the top right corner, then select show hidden files and click save.

To Rename the file, you need to right-click on the .htaccess file and select the “Rename” option. After that rename the .htaccess file to “.htaccess-test”.

Step 3: Create a new .htaccess file

Creating a new .htacces file is simple, you just need to go to your WordPress dashboard and Permalinks, then just click on Save and a new .htaccess file will be created. But because of 500 Internal error, it is not possible for you to log in to your WordPress dashboard.

So, now we have to create the .htaccess file manually. To create a new .htacces file, go to cPanel file manager, then click on the “+File” option.

Nam the file “.htaccess” and click on “Create new file”

Step 4: Add this WordPress .htaccess Code

Once you’ve created the file, it’s time to add the .htaccess code. Copy the code shown below and paste it to your .htacces file. I’ve taken the code from WordPress.org

# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Once the file is successfully created, check your website. It should work.

Solution 10: Reinstall WordPress Core

If all the solutions shown above are not able to fix your 500 Internal Error, then there are some extreme methods available as well. Reinstalling WordPress core is a little difficult to execute but it could fix the error. It is very important to create a backup before you proceed.

If I show you all the steps to reinstall the WordPress core, this article will become very long. So I recommend you to check the guide by Wpoven.com, they have written a wonderful article about how to perfectly reinstall WordPress core.

Solution 11: Contact Your Host

It is your hots job to fix the problem you’re currently facing. Just call them or chat with them about the issue, explain what went wrong. They will surely fix the problem in some minutes. They are experts, they face these kinds of situations on a regular basis.

If your host doesn’t provide the support you need, then I highly suggest you move on to another host., There are countless hosts available at a cheaper cost.

HostGator – 0824 661 4102

Bluehost – 00 1 801-765-9400

Godaddy – 040 6760 7600

SiteGround – Chat Support 24/7 – Read How To Contact SiteGround Customer Support

Hostinger – Live Chat Support 24/7 – Contact Now

Kinsta – 24/7 Live Chat Support

Cloudways – +35635500106

A2Hosting – 888-546-8946

DreamHost – 24/7 Live Chat Support

Conclusion

500 Internal Server Error is a kind of error that doesn’t give any hit about how to fix it. This error normally appears because of your host. If it isn’t your host’s fault, then you need to take a few steps in order to fix it. There are 11 solutions best ones are Deactivating and activating all your plugins, Reinstalling the theme, increasing PHP memory limit, fixing the corrupt .htaccess file, and contacting your host.

I hope I was able to help you, thanks for reading!

Default image
Sumit

Sumit is a regular contributor to Hostinggrow.com. He has 6 years of experience in blogging, and he loves football, his favorite player is - Lionel Messi (GOAT), but he has no hate for Ronaldo.

Articles: 54

Leave a Reply