Here’s How I Fixed HTTP Error 500 [For Beginners]

0
708
HTTP-Error-500-WordPress

In the technical perspective for HTTP error 500, when a user accesses a web server or a web application, every HTTP request has to be responded with a unique three-digit status code grouped together in HTTP format.

Think about that when the web server does not return the requested web page upon the user’s request, it results into an error.

And not to mention, if you‘re the server administrator, you lose thousands of visitors and prospective customers.

Why Do I Get HTTP Error 500?

Frankly, there’s a lot of reasons.

There may be a problem with the web server configurations which may require urgent attention of the server administrator and web host.

Other times, this frightening error occurs because of problems with the working of your web browser or computer.

This article outlines troubleshooting guidelines from the point of view of both home users and website/ server administrators.

Download Diagnostic

You’re just 3 steps away from automatically fixing this problem….

  1. Download and install Diagnostic
  2. Perform driver update.
  3. Restart your computer.
Start-Download-Button

Estimated Download Time: 10 Seconds


Clear Browser Cache & Cookies

Whenever a user visits a website, it automatically stores tiny files, known as Cookies.

These files contain data in an unreadable form that makes it easier for the website to load the user’s preferences upon next visit.

Cache, on the other hand, is a snapshot of an entire web page that significantly improves the loading speed and performance.

There‘s a good chance that the copy of the web page stored on your computer as part of the web cache is corrupted and therefore, inaccessible.

The web cache and cookies get corrupted by any means, such as when the browser unexpectedly closes, your Internet connection drops during a cookie/ cache download, or a program installed on your machine corrupts the cache contents.

With that said, it is easier to get rid of these corrupt elements. Here’s how:

For Google Chrome

1.Click the Menu icon on the upper right side.

Chrome-Menu-Icon
Menu Icon (Three Vertical Dots)

2. Select More tools, followed by Clear Browsing Data.

3. Head to the Advanced tab.

4. Next, look at the Time range drop-down box and set it to All time.

Fix-HTTP-Error-500
Clear Browsing Data

5. We will also leave all check boxes checked except Passwords and other sign in data.

6. Click Clear Data and wait for some time until deletion is completed.

For Mozilla Firefox

1.Press the Alt key of your keyboard to show the menu items.

2. Click on History and select Clear Recent History.

Clear-Firefox-History
Clear Recent History

3. At this point, set Everything in the Time range to clear.

4. Check all the boxes except Active Logins.

Delete-Firefox-Data
Clear All History Dialog

5. Click Clear Now to delete the selected stuff.

For Microsoft Edge

1.Click the Settings icon on the upper right corner of your screen.

Edge-Menu
Edge Menu

2. Again, select Settings from the menu options.

Edge-Settings
Edge Settings

3. You’ll have a comprehensive list of Edge preferences on the right-hand side panel.

4. Click the tab named Privacy and Security.

5. You‘re almost there, hit Choose what to clear.

Edge-Privacy-And-Security
Edge Privacy & Security

6. Select all check boxes except Passwords.

Clear-Browsing-Data-In-Microsoft-Edge
Clear Browsing Data

7. Click Clear to proceed.

For Internet Explorer

1.Click the Tools icon on the far right corner of your screen.

IE-Menu
Menu Icon

2. Head to Safety, and then Delete Browsing History.

3. In the new dialog that appears with different options, check them all except Passwords.

Delete-Internet-Explorer-History
Clear Browsing Data

4. Click Delete to confirm.

For Opera

1.Click the Opera icon on the panel on the left.

Opera-Menu-Icon
Menu Icon

2. Navigate to History, and then Clear Browsing Data.

3. Head to Advanced tab and check everything except Passwords and other sign-in data.

Clear-Opera-Browsing-Data
Clear Browsing Data

4. Hit Clear Data.

Flush DNS Cache

The word DNS is an acronym of the Domain Name System which is an equivalent of a phone book in computing that contains references to domain names and translates the same to IP Addresses.

When your computer shuts down because of various reasons such as a power failure, the DNS Caching process may interrupt and cause the cache contents to get corrupted.

You may want to flush the DNS contents using an elevated Command Prompt as we’ll see below:

For Windows 10

1.Type CMD in the Search Box on your Taskbar.

Fix-HTTP-Error-500
CMD

2. Right-click Command Prompt, select Run as Administrator.

Opening-Command-Prompt-Windows10

3. In the resulting dialog, type ipconfig /flushdns and hit ENTER.

Flush-DNS-Cache
Flush DNS Command

That’s it. After successful completion, you should receive a message like this:

Successfully flushed the DNS Resolver Cache

For Windows 8.1/ 8

  1. Move your mouse cursor to the extreme bottom left corner of your screen. You should see a small Start Screen thumbnail, right-click it, and select Command Prompt (Admin).
  2. Type the following command:
    • ipconfig /flushdns
  3. Press ENTER.

For Windows 7/ Vista/ XP

  1. Click on Start.
  2. Click All Programs, followed by Accessories.
  3. Choose Command Prompt from the list of available utilities.
  4. Type the following command and press ENTER:
    • ipconfig /flushdns

Disable Friendly HTTP Errors

Microsoft implemented the Friendly HTTP Errors feature to make it easier for non-tech savvy users to browse the Internet with little bothering about technical aspects such as error logs and debugging information.

The long, confusing error text and logs get shielded from the user and a nicely written, user-friendly text is displayed every time an error appears.

To get information useful for HTTP Error 500 diagnostic purpose, you’ll want to temporarily disable this feature and hard re-load your webpage in Internet Explorer.

For Windows 10/ 8.1/ 8/ 7/ Vista/ XP

1.Press Windows Key + R keys together, and type inetcpl.cpl

Inetcpl-cpl
Run Dialog

2. Click OK or press ENTER.

3. Looking ahead, check for the Advanced tab in the newly opened Internet Properties dialog.

How-To-Fix-HTTP-Error-500
Internet Properties Dialog

4. Un-check Show friendly HTTP error messages.

5. Click Apply, and then OK.

6. Fire-up Internet Explorer, and hard re-load your page using Ctrl + F5.

Reset Browser Settings

One way to fix WordPress HTTP Error 500 is to reset the browser settings to defaults.

I highly recommend backing up all your important stuff such as bookmarks and saved passwords.

For Google Chrome:

1.Click the Menu icon, select Settings.

2. Scroll to the bottom of the page, and click Advanced.

3. Use the option Restore settings to their original defaults under Reset and Clean Up options.

Reset-Chrome-To-Defaults
Reset Chrome

4. Go ahead, and click Reset Settings.

For Mozilla Firefox

1.Press the Alt key to show menu bar which is hidden by default.

2. Click Help, and select Troubleshooting Information.

Firefox-Troubleshooting-Information
Troubleshooting Information

3. Click Refresh Firefox.

Refresh-Firefox
Refresh Firefox

4. Again, in the confirmation prompt, select Refresh Firefox.

Refresh-Confirmation-Prompt
Confirmation Prompt

For Internet Explorer

1.Click the Tools icon, select Internet Options.

2. Head to the Advanced tab and choose Reset.

Reset-Internet-Explorer-Settings
Reset Option

3. You’ll want to check the Delete personal settings and then click Reset again.

Delete-Personal-Data-And-Reset-IE
Reset Internet Explorer

For Opera

1.Click the Menu icon, select Settings.

2. Click the Advanced option on the left.

Advanced-Tab-Opera
Advanced Option

3. Scroll down to the bottom and choose Advanced.

4. Select Restore settings to their original defaults under the Reset Settings.

Reset-Opera-Settings
Restore Settings

5. When you‘re asked to confirm, click Reset.

HTTP Error 500 WordPress Solution For Developers & Server Administrators

If you‘re the website/ server administrator, I strongly recommend backing up the WordPress website before making further changes.

A slight misconfiguration or an incorrect move can shatter the entire website.

Restore Default .htaccess File

.htaccess is a configuration file that plays a significant role in your WordPress hosting. This file contains rules that govern various aspects of the website.

The .htaccess file has significant benefits:

  • Website Management: It determines the default home page and permalinks
  • Protects Your Website: It controls the behaviour of your website and protects it from external influence and attacks
  • Prevents Unauthorized Access: It denies access to certain Internet Protocol (IP) Addresses
  • Redirect Management: It directs website visitors from one page to another
  • Friendly Errors: It displays friendly error messages whenever a visitor tries to access a web page that no longer exists

That being said, there is always a chance to get this file corrupted.

Some of the reasons include:

  • A faulty and incompatible plug-in or theme can break the contents of the .htaccess file.
  • The file hasn‘t been properly configured by your web developer or server administrator.
  • The web developer loses the Internet connectivity while changes are being made to your website.

The good thing: It’s not that difficult to restore the default .htaccess file.

Here’s a little trick…

1.Sign in to your cPanel.

cPanel-Login
cPanel Log-In Screen

2. Check for the File Manager and launch it.

File-Manager-Icon-CPanel
File Manager

3. At this point, when you‘re prompted to select a directory, check Show hidden files (dotfiles).

Show-Hidden-Files
Show Hidden Files

4. Hit Go.

5. Next, locate your .htaccess file, typically in the public_html directory.

6. Right-click the .htaccess file and select Rename from the context menu options.

Rename-htaccess-File
Rename Option

7. Specify the new name: .htaccess_backup

8. Now, sign in to your WordPress account and then head to the Settings tab on the left.

WordPress-Settings
Settings

9. Go to Permalinks.

10. Be sure not to change any existing settings. All you have to do is click the Save Changes button to re-generate the default .htaccess file.

Save-Changes
Save Changes

Disable Faulty Plugins

Plugins are an important part of WordPress website.

Plugins add additional functionality to your website and improve the visitor experience.

Often times, incompatible plugins cause HTTP error 500 WordPress. Disabling all plugins might work.

1.Log-in to your WordPress account, and head to the Plugins tab.

2. Check the top Plugin check box or select all plugins individually.

Plugins
Plugins

3. Click the Bulk Actions drop-down box and select Deactivate.

4. Click Apply.

Deactivate-Plugins
Deactivate Plugins

That’s it, folks. I hope the error has now disappeared.

If yes, you may want to enable each plugin one by one and test the website for some time. The goal is to identify the faulty plugin that led to this issue.

Increase PHP Memory Limit

PHP is a widely used scripting language designed for web development and production.

When the server uses more than excessive memory specified in the php.ini or php5.ini file, it results in WordPress HTTP error 500.

Luckily, there is a way to increase the limit of PHP Memory.

1.Log-in to your cPanel, and go to the File Explorer.

2. Make sure that the Show Hidden Files box is checked.

3. Expand the following directories from the left-hand-side panel:

  • /home/public_html/wp-admin
wp-admin-folder
Folder Contents

4. Check for php.ini or php5.ini files.

If you don‘t see either of them, create a new one. Click on the File icon.

Create-New-File-In-cPanel
New File

Type php.ini and hit Create New File.

Create-PHP-INI-File
Create New File Box

5. Enter the following text into the newly created php.ini

  • memory_limit = 256M

6. Click Save and re-load the webpage.

7. Looking ahead, if the problem keeps appearing, you’ll want to rename php.ini to php5.ini

Check File/ Folder Privileges

Sometimes, the error is caused when one or more important file or folder in the cPanel do not have required access permissions.

You may want to consult your developer to figure out those files/ folders and provide required privileges:

1.Go to the File Explorer, and right-click the file to change its attribute.

2. Select Change Permissions.

3. 755 is the most recommended permission level which makes the file readable and executable to the user, group and the world.

Change-Folder-Permissions
Change Folder Permissions

4. Change the file attributes depending on your requirements, and click Change Permissions.