500 Internal Server Error {Solved}

We are always facing many problems with the browser while browsing. These problems might irritate and spoil your valuable time. Also, these problems may lead to a lot of confusion if you are don’t know about the errors and how to fix them.

500 Internal Server Error is an error that can occur on your WordPress site while browsing. Moreover, if it occurs, then you can’t do anything immediately without knowing anything about the error. Before solving this 500 Internal Server error, we have to know initially about the error and the reasons for the error occurrence and then learn some solutions to fix the 500 internal server error.

500 Internal Server Error

There are many reasons for the 500 internal server error appearing on your browser while browsing. If once your WordPress is caused by this error, then your browser has a chance to get this error again and again. Now we are going to know the reasons for 500 Internal Server Error occurrences:

  • Corrupted/broken .htaccess file.
  • Unnecessary folder permissions.
  • Due to third-party plugins.
  • Corrupted core files of WordPress.
  • Invalid database.
  • Invalid database login security.
  • Corrupted files of WordPress installation.
  • Heavy browser cache.
  • Errors in Perl and CGI scripts.
  • Fatal PHP errors with third-party themes and plugins or PHP time out.
  • Exhausted PHP memory limit on your server.
  • Problem with the server of the database.

Now we are going to know more about the 500 Internal Server Error.

What is a 500 Internal Server Error?

If once you visit any website, then the browser sends a request to that host of that website. Then server on the side of host check the request that your browser sent to host, and then processed the request and sends the required data that included PHP, CSS, HTML back to you with a header of HTTP status code.

This status code represents your browsing request. If it is a 200 status code, then you can able to visit the site, and you are redirected to the website that requested to visit. Otherwise, it shows a 500 status code, it indicates something is wrong with your request.

In 500 code errors, we have various 500 code errors like 501, 502, 503, 504, etc.., which indicate different problems while browsing respectively. 500 internal server indicates the problem of that the request of the visitor is going to be rejected for quite any reason. 500 internal server error also appears in various messages on different browsers. But the meaning of those issues or errors with code 500 is concurrent. Now let you some different 500n error code messages that appeared on the WordPress site of different browsers:

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

Sometimes you might see a long message related to 500 internal server errors. In that message, it gives information that the server is misconfigured with the host site and unable to complete the process of your request. Please contact the server administrator at [email protected] and inform them what the problem of yours that occurred with the host website.

On sometimes, on display, a white blank page appears. It indicates the 500 internal server error. It is the most common occurrence in the Safari browser. Other browsers have their special code error for 500 internal server errors. And you know that in some browsers, this error appears with cartoon pictures. If you are using a higher server, then the error clearly shows the cause for the error through HTTP status code, like:

  • 500.0 – ISAPI error occurred.
  • 500.11 – Application is going to shut down on the server.
  • 500.12 – Busy to restarting the web server of your application.
  • 500.13 – Server is too heavily loaded.
  • 500.15 – Request is rejected for the access of global.asax.
  • 500.19 – Invalid configuration data.
  • 500.21 – Unrecognised module.
  • 500.22 – An ASP.NET http Modules configuration does not apply in Managed Pipeline mode.
  • 500.23 – An ASP.NET http Handlers 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 while RQ_BEGIN_REQUEST message handling. An executive configuration error occurred.
  • 500.51 – A rewrite error occurred during the GL_PRE_BEGIN_REQUEST message handling. An executive configuration error occurred.
  • 500.52 – A rewrite error occurred during the RQ_SEND_REQUEST message handling. An executive configuration error occurred.
  • 500.53 – A rewrite error occurred during the RQ_RELEASE_REQUEST_STATE message handling. An executive outbound error occurred before the output cache is updated.
  • 500.100 – Internal ASP error.

The 500 internal server error may cause the loss of visitors to the server. Furthermore, it might be a bad impact on the Search Engine Optimisation if the errors are not fixed immediately. So, to avoid the 500 errors, let us know the solutions to solve them.

How to Fix the 500 Internal Server Error

This error may occur in two different ways. The first way is coming from the user and another way from the server-side. So, we may aware of the error, whether it is an issue from your side or the server-side. Mostly, we have some common reasons for the occurrence of the 500 internal server error. Now, look at the solutions to fix the error.

Solution 1: Try Reloading the Page

It is the very easiest way to clear the error. Sometimes if you have no stable internet connection, it may take a lot of time to load the webpage that you are browsing and finally shows unable to load the page.

And sometimes, the page you are browsing may be unloaded and shows an error if the website is overloaded with visitors at a time while you are browsing. Simply reload the page that you want to browse after some time.

If your WordPress site plugins are updated, then it might take some time to load the webpage that you want and sent a message such as temporary timeout, just go for the refresh of the page couple of times to set it all clear to visit the webpage.

Furthermore, if you have any doubts about the website that you are browsing, just copy the web address of that site and paste it into the website downforeveryoneorjustme.com. This website gives you information about the website that currently is online (or working/up) or offline (or down).

If it shows a message like “Everything is OK”, it means the site is currently online. Then you conclude that the problem is the website is overloaded with visitors. For that, you want to refresh the page a couple of times.

Solution 2: Clear Your Browser Cache

There are some chances that the browser cache files outdated or corrupted files may cause the 500 internal server error. To avoid it, then you can clear the cache of the browser. Follow the given below steps to clean the cache of the browser:

Step 1: First of all, open your browser.

Step 2: Secondly, click on three dots located at the upper right corner to open a side menu.

Step 3: Thirdly, click on Settings, and then choose the option Privacy and Security.

Step 4: Following, search the Clear Browser option and select the cache history and files to clear.

Step 5:  Lastly, click on Clear Browser to clean the Browser Cache.

NOTE: This process is based on the Chrome browser. If you are using a different browser, then don’t worry about it to solve the issue. It can be similar to all browsers, and a little bit maybe vary with the settings of individual browsers. So, follow the process based on the browser and its settings.

Solution 3: Check Your Server Logs

If the site has any fault itself, then the host update it immediately.  But changes are unable to find by us. So, you have to check the error logs. For this, in WordPress, you can add the code wp-config.php file to the host website. This code file consists of :

define (  ‘WP_DEBUG’ ,  true );
define (  ‘WP_DEBUG_LOG’ ,  true );
define (  ‘WP_DEBUG_DISPLAY’ ,  false);

if you have any issues with your websites, WP debugs mode can help you to find the errors or problems, what is going wrong with the website. If once you enable the WordPress to debug log, it can save error messages, warnings, etc.., in the wp_DEBUG/debug.log file. Then you can easily know the issues that the reason for errors.

You can also check the log files through Apache and Nginx.

  • For Apache: /var/log/apache2/error.log
  • For Nginx: /var/log/nginx/error.log

If the site is encountered with fatal PHP error, it can cause the 500 error. Just report it in the console tab of the Google Chrome Dev Tools.

ini_set ( ‘display_errors’ ,  1 );

ini_set ( ‘display_startup_errors’ ,  1 );

error_reporting (E_ALL);

After reporting the issue, then you need to modify the php.ini file as follows:

Display_errors = on

Solution 4: Error Establishing a Database Connection

Database connection error may cause the 500 internal server error. This database error might be different from one browser to another browser. But these errors can lead to the 500 error.

If a database connection error occurs, then on your browser, “Error establishing a database connection” message appears to the visitor. The page that you are browsing becomes blank with this message. It can trouble access the WordPress site that you are operating. There are some common issues for the database connection error occurs, let us know what they are:

  • Heavy traffic on the webpage.
  • The database server is down.
  • Invalid login details.
  • Corrupted files of a WordPress site.
  • Corrupted files of the database.

Now we are going to know how to fix the database connection error on your WordPress site:

Step 1: Contact your Web Host Provider

Just start a communication with the host and give the information about the error “Error Establishing a Database connection”. And request the host to solve the issue. Certainly, they will inform you what the cause of the error. And they can be tried to fix it.

If your database is in a good position, then follow the second step.

Step 2: Check the files of Plugin or Themes either corrupted or not

If your WordPress files may be corrupted, it might misconfigure the webpage while browsing. Just follow the instructions to solve it:

Step 1: Connect your host through FTP. So, you have a login to your FTP account. Now navigate to the WordPress folders like “wp-content”, “wp-includes”, “wp-admin”.

Step 2: Select the “wp-content” and rename the plugin folders.

Step 3: Now, check the site that you are browsing.

If your plugin files are not corrupted, then skip it and follow the next step.

Step 3: Check the files of your Database

if your database files are corrupted, then you have to repair the database. Follow the instructions to solve it.

Step 1: Firstly, connect to your browser through FTP and login to it.

Step 2: Edit the file as shown below.

define ('WP_ALLOW_REPAIR', true);

Step 3: Now, upload the file through FTP to your browser.

Step 4: Next, go to YOURSITE.com/wp-admin/maint/repair.php

Step 5: On showing display, click on any option of showing. After that database is going to repair.

If you have no trouble with the database, just leave it and follow the next step for error correction.

Step 4: Check your Database login details

We already know that the WordPress that we are using uses login details like username and password. Follow the given below step to clear this issue:

Step 1: Copy the data in the “wp-config.php” file. It consists of data as follows:

define( ‘DB_NAME’ , ‘some_db’ );

define( ‘BD_USER’ , ‘some_username’ );

define(‘DB_PASSWORD’ , ‘some_pass’ );

define( ‘DB_HOST’ , ‘localhost’ );

Step 2: Now contact your browser host to provide the data of the “wp-config.php” file.

Step 3: Now, the representative on the host side check all details and send you the correct details if details were changed.

Step 4: Now again, new details can be restored manually by you in the “wp-config.php” file. And upload them to your browser through FTP.

If you have no problem with login details, just follow the next step.

Step 5: Restore the Default WordPress Files

If the core of WordPress may be corrupted, then you have a simple Step to clear it. Just restore the native and default files of WordPress.

Step 1: Delete the files of WordPress.

Step 2: Download a new version of WordPress and copy the files of it.

Step 3: Now connect your browser through FTP and upload the new default files.

These steps might solve your problem.

Solution 5: Check your Plugins and Themes

Several times the web address was canceled by the server due to bad code on the WordPress site. It may be possible from any third-party plugin. We have experience that misconfigured plugins can generate 500 internal server errors. It can be simple to solve this issue. Deactivation of the plugins may solve this issue. Your device doesn’t lose any information on the site after deactivating.

Step 1: Search the plugins on your browser settings.

Step 2: Select and open it.

Step 3: Now click on the option Deactivate to disable all plugins of your browser.

NOTE: Always keep your plugins, themes, and core of WordPress up to date at regular intervals. Also, check the PHP version that is currently running. If you have any issues with plugin codes, you want a WordPress developer to fix it.

Solution 6: Reinstall the WordPress Core

Sometimes core files of the WordPress that you are browsing. So, you have to reinstall WordPress to get a new core file. We have several methods to install the WordPress core. Now I’m going to explain an easy method to install it.

You can easily reinstall WordPress within your admin dashboard. Follow the instructions mentioned below to reinstall the WordPress:

Step 1: To reinstall WordPress, just go to Dashboard at first.

Step 2: Now navigate to the Updates.

Step 3: Now click on the option Reinstall. It takes a few seconds to reinstall.

It will automatically reinstall. In this method, you have only a chance to reinstall the WordPress core files. The remaining files remain as old files.

Solution 7: Permission Errors

Permission errors might be occurred due to the folders. This error can cause the 500 internal server error to your WordPress site. Now let us know the folder permissions in the WordPress site:

  • Hardening: wp-config.php could be set to prevent other users on the server to prevent reading through your browser’s IP address.
  • All directories should be 750 or 755 (drwx-xr-x) and 640 or 644 (-rw-r-r-).

Now, follow the method to fix the permission error:

Step 1: Firstly, connect your WordPress site through FTP by login into your account.

Step 2: Secondly, select the folders and files. And right-click on them.

Step 3: Now select the option “File Permissions”.

Step 4: Then, enter the value 755 in a numeric value box.

Step 5: After that, click on the option “Recurse into subdirectories” checkbox.

Step 6: Then click on the option “Apply to directories only”.

Step 7: Next, click on continue. FTP will start setting the file permissions to all folders and files.

Step 8: Select folders and files on WordPress and right-click on it.

Step 9: Select the option file permissions.

Step 10: Enter the 644 numeric value on the appeared dialogue box.

Step 11: After that, click on the option “Recurse into subdirectories” checkbox.

Step 12: Then click on the option “Apply to directories only”.

Step 13: Click on continue. FTP will start setting the file permissions to all folders and files.

This process can fix your permission error.

Solution 8: PHP Memory Limit

If the memory limit of PHP is exhausted, then there are quite some chances to cause 500 internal server errors.  You have to increase the limit of the PHP memory limit. Memory can be extended in cPanel, Apache, PHP.ini file, and wp-config.php files. Follow the given instructions to extend it:

Memory Extension in cPanel

If your current working WordPress uses cPanel, then it is quite easy to change the memory limit.

Step 1: Select the version of PHP.

Step 2: Click the option “Switch to PHP Options”.

Step 3: Now, search and select the memory limit option.

Step 4: Change its value. And save it.

Memory Extension in Apache

Step 1: Log in to your browser through the FTP account.

Step 2: Search for the .htaccess file and select it.

Step 3: You can edit the file to increase the memory limit.

Step 4: Generally, it can set the value 64 M or below. You have to increase the value.

php_value memory_limit 128

Memory Extension in PHP.ini File

if the above methods are unable to set the error, then you might try to edit the php.ini file. Follow the given below procedure to fix it:

Step 1: Firstly, connect your site through the FTP account.

Step 2: Secondly, open php.ini.file.

Step 3: Thirdly, go to its settings and modify it.

Step 4: Use the below code to extend the memory from 64 to 128 M.

memory_limit = 128M

Step 5: Following, some sites required suPHP directive in the .htaccess file for php.ini file to work.

Step 6: Lastly, you have to edit the .htaccess file and add the following code given below:

<IfModule mod_suphp.c>

suPHP_ConfigPath / home/yourusername/public_html

</IfModule>

If it doesn’t work, then you might follow the next instructions to solve. It doesn’t work means the site that you are using may be global settings locked. Furthermore, follow the given steps to solve it:

Step 1: Firstly, open your .user .ini file through FTP account.

Step 2: Secondly, edit your .user .ini file and save it.

Memory_limit = 128

Memory Extension in wp-config.php

If you are failing in every method mentioned above, just follow this step:

Step 1: Firstly, log into your account through the FTP account.

Step 2: Secondly, search the wp-config.php file.

Step 3: Thirdly, add the below code to it at the top of the file.

define ('WP_MEMORY_LIMIT', '128');

Now check the site that is running without any memory limit warnings.

Solution 9: Problem with Your .htaccess File

Sometimes this 500 internal server error may cause if your .htaccess file has troubles. So, you have to fix the .htacess file of our host site. Follow the procedure given below to avoid it:

Step 1: Firstly, connect your host site through an FTP account.

Step 2: Secondly, rename the .htaccess file into .htaccess_old. And resave it.

Otherwise, if you are unable to access WordPress, then follow given below steps:

Step 1: Firstly, create a .htaccess file.

Step 2: Secondly, upload the given below code.

#BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine 0n

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME}  !-f

RewriteCond %{REQUEST_FILENAME}  !-d

RewriteRule . /index.php [L]

</IfModule>

#END WordPress.

Solution 10: Coding or Syntax Errors in Your CGI/Perl Script

The 500 internal server error may appear due to coding errors in CGI/Perl script. So, you have to focus while working with Perl/CGI script. Follow the given instructions to avoid syntax errors:

Step 1: Firstly, while editing, use a plain text editor such as Notepad++, Sublime, etc.., they remain in the format of ASCII.

Step 2: Secondly, accept valid and correct permissions of chmod 755 are used in the Perl writing scripts.

Step 3: Thirdly, upload the CGI and Perl scripts in ASCII format into the CGI directory on the WordPress site.

Step 4: Lastly, the required Perl module can be installed on your site that is used for scripts.

Solution 11: Server Issue (Check with Your host)  

PHP timeout or fatal PHP errors can cause the occurrence of 500 internal server errors. So, you have to check your WordPress site at regular intervals. These PHP errors may occur due to the least number of workers.

If you want to avoid it, just use the tool called updown.io. If your site has an issue, this tool immediately gives information to you. And it sends an HTTP HEAD request. You can set notify frequency to alert you. It has check frequencies like:

  • 15 seconds
  • 30 seconds
  • 1 minute
  • 2 minutes
  • 5 minutes
  • 10 minutes

After you set an alert frequency, at that time intervals, it sends you an email and gives you information. Also, it gives information about the site of how it goes down. Moreover, this is a simple solution if you have any issues with the site.

Final Words

500 internal server errors always irritate the visitors of the web page and spoil your time to know what is going wrong with the page. However, we have some methods to solve the issue that I mentioned above to you.

However, always remember that reasons for this error occurrence are web page server or your WordPress site also. Just know what happened to your WordPress site. If this error occurred, then simply follow the above solutions to fix the error 500 internal server error.