DED9

12 Most Effective Ways to Fix the 500 Internal Server Error on the Site

Let’s say you own a website and you have created a landing page for an advertising campaign designed for your site. All the work has been done and today is the day of the campaign, you will visit the campaign page to see the results of your efforts. But the site does not load and shows the message “500 Internal Server”.

Most website errors have a specific reason, which is why the website owner can solve it as soon as possible. On the other hand, the errors under the 5xx code, of which the 500 Internal Server error is an example, are generally errors that the server is not able to identify the exact cause of and the possible causes of the error must be checked. One of the common reasons for the 500 error is problems in connecting to the Internet, as well as a faulty htaccess file. Is.

This error has different names, all of which have the same concept and refer to the inability of the hosting virtual server to find the root cause of the error. A wide range of factors can be behind the 500 Internal Server error, which is why this error has become a common error among websites.

No visitor stays on a website page that doesn’t load. A site being down is an unpleasant situation for visitors and its owner, which can lower the website’s rank in Google’s SERP ranking and negatively affect the site’s SEO score.

That’s why you should act quickly to solve errors like 404 and 500 Internal Server errors. Here we describe 12 practical ways to fix the 500 Internal Server error on the site.

The first solution to avoid such errors on the site is to buy a high-speed and high-quality virtual server. If there is no error on the server side, the site pages will load quickly and no visitors will leave your site anytime soon.

 

What is the Internal Server 500 error?

Every time the user visits the website page, the browser sends a request to the server to visit the website page, and the server collects the requested information and sends it to the user. When the server cannot provide the requested information to the user, this inability is displayed as an error on the website page.

In the web world, for ease of work, a code is considered for each type of error. 4xx and 5xx series of codes like 404 and 500 are common errors. Most errors also display the root of the error. But the Internal Server 500 error is not like this.

The Internal Server 500 error is a common HTTP status code error that usually indicates a problem on the website’s server side. The meaning of internal server error is that the server encountered unexpected conditions and could not identify the problem.

For this reason, the webmaster and website owner must find the root of the error and fix it as soon as possible so that the SEO score, credibility, and number of website contacts do not undergo negative changes.

This error is displayed in different ways, you can see some examples below:

This error is also known as Elementor server error 500, Google error 500, and Chrome error 500 on. The way this error is displayed on websites can also be different. You can see examples below:

Error page 500 Internal Server Error by default:

 

Custom server error 500 page:

 

HTTP 500 error in Google:

 

 

Error 500 in Google The images above were just examples of how to display this error, and the error http error 500 can be displayed in various formats.

The most common reasons for the 500 Internal Server error

The appearance of the phrase 500 Internal Server Error on the website page is probably due to the occurrence of at least one of these problems:

By checking these factors, you can root out and fix the problem of generating server error 500. In the next section, we have introduced 12 practical ways to fix error 500 on the site so that you can solve each of these problems.

How to Fix the HTTP Error 500 website?

Since the 500 Internal Server error according to the list above can have various reasons and the website page does not display the main reason for the occurrence of http 500, we have to check a number of the above reasons in order to succeed in tracking and fixing the main problem. The practical methods to fix the 500 Internal Server error on the site are as follows:
Fixed 500 Internal Server from the visitor side

Although the text of this error tells us that the problem is probably from the server side, this is not always the case. It is possible that the error is on the website visitor’s side. It means that the website is up, but the error 500 Internal Server is displayed for the user.

If, as a visitor, you have gone to a website page and encountered a server error 500, the only thing you can do to fix this error is to check your internet connection. Of course, as a website owner, you can do these checks in the first step.

If the error occurred on your side and in a local system, you can quickly solve the problem by performing the following methods.

1. Reload page:

It is possible that the 500 error is only displayed to you. Maybe the website is responding correctly to the browsers’ requests and you have encountered the 500 Internal Server error due to a temporary outage or disruption in the Internet connection, or you have been unable to establish a connection with the server.

Refresh the page by clicking the Reload icon in the browser or pressing the F5 key in Windows. If the page loads, it means that the problem is with your system and there is no need to troubleshoot.

2. Clearing the cache and cookies of the browser

If the http 500 error page is not fixed after Reload, it is likely that your browser has faulty files in its cache and cookies. Reloading the page will not delete these files, so you have to delete them yourself.

If the problem is not resolved after clearing the cache and cookies of the browser, you can connect to the website from another browser to see if the website page comes up or if the 500 Elementor server error still persists. For example, if you were using Chrome, try Firefox this time.

3. Change the internet network

If the above actions do not fix the error, it is possible that the error occurs on the entire Internet network that you use. To detect this, connect to the website from a different internet service. For example, if you were connecting with home Wi-Fi, use mobile data this time.

Fixing the 500 error from the website

At best, the methods mentioned can solve the problem. But the persistence of the problem conveys two messages: the problem is from the website server side and we have to take a deeper look at the root of the problem. As a website owner or a webmaster, there are ways to discover and solve server error 500, which we have mentioned in 9 ways:

1. Check the error logs of the website

In most cases, files and scripts that are not set correctly are the cause of website errors. Error Logs can help you solve problems. Normally, you have access to this record in the control panel of the website.

In each control panel, the part where you should look for Error Logs is different. To view the Error Log in cPanel, proceed as follows:
Log in to cPanel.

 

In the Metrics section, go to the Errors section.

 

In the specified part, the 300 errors that have occurred on the server can be displayed as a list with information such as the date and time when the error was recorded, the type of error, the IP address of the visitor, and the location of the error. Through this information, you can get clues to the source of the problem.

 

 

Note that errors related to the website server are archived in this section. PHP errors are stored in the php_errorlog file.

2. Reset the access level or permissions of files and folders

Another reason for the 500 Internal Server error on the site is the assignment of inappropriate access levels to folders and files. For example, if the permission of a file or folder does not allow the user to access a certain page of the website, the user will not be able to visit that page.

Permissions or the standard access level for files is 644 and for folders is 755. It is better to reset the permissions or try to change the file access in cPanel.

3. Change the PHP version

An inappropriate PHP version of the website can cause PHP texts to time out and generate errors. As a result, you may encounter a 500 error on the website. Switch the site’s PHP version to a newer or older version.

4. htaccess file. Check out

One of the common reasons for the error http error 500 is the existence of a problem in the htaccess file. Is. In addition to error 500, this file can cause other errors such as error 403 on the website.

If the htaccess file. If it is faulty or contains syntax errors, or the root folder is defined incorrectly, the result will be that the website will not load with a 500 Internal Server error.

Although each of the above three problems can be solved separately, the solution below solves all three problems.

First, make a backup file from the site. Then, to check and solve this problem, enter the website through SFTP protocol or SSH connection.

 

After finding the htaccess file. It’s old htaccess. Change the name.

 

A new file named htaccess. Create and enter the following commands in it. Then upload the file to the server.

 

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

 

 

Reload the website. If the problem is from the htaccess file, it will be solved. Also delete the htaccess_old file. do not forget

 

 

5. Repair and check Database and Credentials

The eighth solution is to fix any errors in the database or its credentials. If this problem occurs, the website will not be able to communicate with the database.

To fix the problem in the database, you can return the website to the support version that you have already prepared. Also, if your WordPress website does not connect to the database, you should check the credentials of the website to make sure they are correct.

If you do not have access to the WordPress dashboard, connect to the website through SFTP. Find the wp-config.php file in the web/content folder.

 

 

Right click on the file and select Edit.

 

Now the file will be opened as a text file. Among the lines of codes, the bottom line of MySQL Database username contains the user name and the bottom line of MySQL Database Password contains the password of this user. Pay attention that these parameters are placed inside ‘ ‘.

 

Now you can make sure of the accuracy of this information and change it if needed.

6. Disable WordPress website plugins

A plugin or a plugin that is not configured correctly can cause a 500 Internal Server error in WordPress. The standard process to solve this problem is to disable plugins one by one until we finally find the plugin that caused the problem.

If you have access to the admin section of WordPress:

Go to the plugins section, select the Installed plugins option and select the Deactivate option from the Bulk actions drop-down menu. Then check the box in front of Plugin and click Apply to disable all plugins.

 

 

Reload the website. If the 500 Internal Server problem is solved, go back to the plugins section. Activate the plugins one by one and reload the site to finally find the plugin that caused the 500 server error.

Then you can contact the plugin provider to fix the problem or file a ticket in the WordPress repository to get an answer to solve the problem. If possible, the problem will be solved by removing the plugin and replacing it with a similar plugin.

If you do not have access to the admin section of WordPress:

The most common solution suggested in these cases is to change the name of the software folder. In this method, there is a possibility of another error in the future. For this reason, we suggest to disable plugins and fix error 500 through the database.

Make a backup copy of the database to prevent data deletion. By searching in cPanel, go to the php MyAdmin section of your website and click on the wordpress option on the left side of the page.

 

On the right side and in the Table column, find the wp_options row and click on it. Now in the new page, scroll in the option_name column to find the active_plugins row.

 

 

 

 

 

 

On the right side of this row and in the option_value column, you will see a sequence of characters that contains all your active plugins.

 

Scroll to the left and tap Edit.

 

 

For more security, copy this String or sequence of characters and save it somewhere like NotePad software. The only change we need to make to disable plugins is to enter the following characters instead of the previous ones:

a:0:{}

 

On the same page, click on the Go option on the bottom right to save the changes.

 

 

This code tells WordPress that there is no active plugin on the website, so all plugins are disabled and you can access the website’s WordPress dashboard.

Now, by activating the plugins one by one and reloading the website, you can easily identify the faulty plugin. After finding the plugin, communicate with its creator or fix the 500 Internal Server error by registering a ticket in the WordPress repository.

 

7. Changing the theme of the website template

An improperly configured template will end up with a variety of errors, including a 500 server error. To change the format through the database, it is necessary to replace it with another format. Usually, http error 500 will block your access to the WordPress dashboard. In this case, do the following:

Before taking any action, take a backup of the site in cPanel.

Go to the PHPMyAdmin section of your website. In the left menu, select your website database and wordpress.

 

In the first column of the table that opens, look for the file that ends with the extension “options” and click on it. This file is called vmf_options, which may have a different prefix in your database.

 

In the list that opens, enter the number 50 in the Number of rows field, and then look for the template and stylesheet rows among the rows.

 

Click the Edit button in front of each of the two rows above. Then, like the previous method, change the option_value of both to the name of the new format you have chosen. For example, if we want to apply the Twenty Twenty-Two format to the site, we enter the phrase twentytwentytwo in the option_value field.

Click the Go button to save the changes.

 

 

Be sure to do this for both template and stylesheet rows. You can see the names of the templates available on your website through the contents of the wp-content/themes folder and the Site Tools -> File Manager section of the control panel.

After changing the template, if the error is fixed, there is a high probability that there is an error in the template section of the website, which led to the appearance of the 500 Internal Server error.

8. Increase the PHP memory of the website

Scripts that occupy more space than the memory allocated to PHP scripts can be the cause of displaying the words “500 Internal Server” on the page of any website. The value of this memory is set to 32 MB by default.

You can increase the amount of this memory with the following method.

In this method, we use the free file manager plugin to increase PHP memory. After installing and activating this plugin, enter it and look for the wp-config.php file.

 

 

9. Reset the website from a backup copy

In the last method of the 12 practical ways to fix the 500 Internal Server error on the site, if none of the above solutions did not fix the 500 Internal Server error, reset or restore your website from a backup.

This will restore your website to the state it was in when you took the backup and revert all changes made since then.

Conclusion

The 500 Internal Server error is one of the most unpleasant errors for any webmaster because it does not show the cause of the error and leaves it up to the webmaster. On the other hand, it can have negative consequences for the site’s SEO score.

Persistence of the error can be a sign of more specialized problems that require technical knowledge to fix. In other cases, the presence of large files on the website can cause HTTP error 500.

Exit mobile version