Error Internal Server Error: what is it and how to deal with it

Often, the owners of hosting hostsdue to the constant occurrence of error message 500 (Internal Server Error). She, as it is called, simply poison lives. Now we will try to understand the essence of the situation briefly and see how it is possible to get rid of the appearance of a mistake in the future.

Error Internal Server Error: what is it?

So, let us begin, perhaps, from the very meaning of thisword combinations. In the Windows error directory (and not only), there is an error number 500 that corresponds to the computer term Internal Server Error. Translation of this phrase means an internal server error related to the status of the HTTP protocol.

internal server error

In fact, the error means that the softwarethe provisioning of the server either does not work or works, but one or more of its components fail in the form of refusal to client requests, for example, a search engine or an Internet browser.

Causes of error

Talking about the error Internal Server Error in the verybroad understanding, it should be borne in mind that it can arise on a lot of sites or resources written with completely different CMS. Here, by the way, you need to distinguish the reasons for its occurrence.

Very often such a situation can be observed insuch as WordPress, OpenCart, Joomla, etc. If control structures like WordPress are not used when building a site, perhaps the reason lies in the fact that the hosting itself fails when connecting the wrong PHP extensions, or the site returns incorrect HTTP headers that can not be recognized by your server.

internal server error

No less common reason for the occurrenceerrors Internal Server Error can be called the lack of correct access rights. So, for example, if PHP files of scripts that are hosted have access rights of 777, it may very well be that their execution is simply blocked by the server, resulting in an error message.

Also one of the reasons can be enoughlong work of scripts. The fact is that PHP-time constraints are not only valid for hosting, such limits can be set by the server as well. In other words, this somewhat resembles a timeout of the operation. When the server does not receive a response to the request within a certain time, it simply blocks the execution of the script.

In some cases, the Internal Server Errorcan appear when the hosting exceeds the limit of used memory. Simply put, the script for execution requires more than the proper one, and in fact such a limit is set not only in PHP, there are often restrictions on the consumption of resources by all executable scripts.

internal server error how to fix

Finally, one of the most common situationsError occurrence Internal Server Error is the content of incorrect directives in the .htaccess file (by the way, this is most often used when working with the WordPress engine). Now we are close to finding a solution for each specific situation.

Error Internal Server Error: how to fix the simplest ways

First, let's see what can be done withdetection of incorrect access rights. In this case, permissions 777 allow you to edit the contents of absolutely everything, which, of course, affects the security. In this situation, you need to change them by applying the value of 755 to the folders, to the files of the scripts - 600, and to all the steel data files - 644.

internal server error translation

If the script is running too longyou can try to increase the waiting time, however, there is one catch. This solution can work on a dedicated server or VPS (Virtual Private Server), and in the case of virtual hosting there will be no effect.

As for the overestimated memory consumption incompared with the restrictions that apply to hosting, then you can advise only to contact the support service or simply change the hosting provider itself, which will not be so strict.

Now a few words about the .htaccess file. The fact is that it assumes the use of very strict syntax, if errors or some inaccuracies were made during the settings, it will not be possible to avoid the error of Internal Server Error. Here it is necessary to proceed as follows. First, you need to check the presence of the file in the root directory of the site, then completely and completely by making a backup copy of it. If after this procedure the site becomes operational again, then the problem is in the .htaccess file, which will have to be checked for errors in the syntax.

Problems with the WordPress engine

With WordPress the situation is worse. The fact is that this engine is able to overwrite the original .htaccess file, which is responsible for managing access to files and folders of the hosting, and after all the original file should be created only once, and certainly not in WordPress!

internal server error

The easiest way to fix this situationis to disable the WordPress theme and use any other instead. If the error has disappeared, it is the topic itself, if not - you need to disconnect WordPress plug-ins step-by-step and check which one affects the performance.

In some cases, you may need to updateWordPress to the latest version and turn off the file overwrite function. First, download the original .htaccess file to the computer terminal, then enter the site in the folder on the path / wp-admin / includes / with the subsequent download of the file misc.php, which you need to open, say, in the standard "Notepad" (or any other text editor) and find the string function "function save_mod_rewrite_rules". Now, in the function itself, go to the line "return insert_with_markers ($ htaccess_file," WordPress ", $ rules);" and replace it with "return true;" (of course, all commands are written without quotes). It remains only to save the changes and upload a new file to the hosting with the replacement of the old file misc.php.

The disadvantage of this method is that in this case the WordPress update is disabled. When connecting plug-ins, they will not work, of course.


In principle, this is, so to speak, the mostcommon causes of the error and methods for its elimination. In fact, there are a lot of reasons that there are a lot of ways to deal with such situations, so you have to analyze the situation in each specific case, and only then choose which method to correct the error.