Z.com Philippines logo represents the brand identity.
September 6, 2023
25 min Read

What Is The 500 Internal Server Error & How Can I Fix It?

Have you ever tried to access a site only to be met with an error page saying 500 error, Internal Server Error, the page isn’t working, or something like this?

The HTTP 500 Internal Server Error is a common error that users often encounter. It can occur due to several causes, including PHP memory limit, Permission error, browser cache, corrupted database, etc. The wide range of causes means there are a number of different solutions to the error depending on the specific cause.

Although the error has several variations in terms of its display, it is easily recognizable. And while not too dangerous, it can still negatively impact the website’s SEO. So, it must be fixed immediately.

This article will explain the HTTP 500 Internal Server Error and go over some promising solutions you can employ to deal with it.

What Is The 500 Internal Server Error?

The 500 Internal Server Error or HTTP server error is just one of the many HTTP error codes that keep you scrambling to figure out what has happened with the site. However, as the name implies, it is an error from the server end when you cannot reach the website because the server experienced an unexpected problem with an unspecified root cause.

Basically, a 500 Internal Server error means that the server encountered a problem in fulfilling a request made by the user on their browser.

Whether the request from the server is fulfilled is indicated by status codes along with HTTP headers, and one of the alarming codes is 500 – meaning something wrong has happened on the server side. However, the server itself is unable to accurately detect the issue.

As a result, the server is unable to fit the problem under a specific HTTP error code. So, it responds with a general error message, HTTP 500 Internal Server Error, hinting that it has caught an inexplicable problem that is unclear.

How Does The Error Appear On The Browser?

There is no single particular appearance of the error message. Different browsers, websites, and web servers have their own unique representation of the 500 Internal Server Error message.

Some of the message variations for HTTP 500 Internal Server Error include

500 Internal Server Error

Internal Server Error

500. That’s an error.

HTTP Status 500 - Internal Server Error

HTTP 500

HTTP Error 500

Error code: 500

500 Error

The page isn’t working

500 – Internal Server Error

Temporary Error (500)

Error 500 Internal Server Error

The server returned a 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.

Chrome

Apart from these codes, you may see a message on different browsers. If you are using Chrome browser, the error 500 may appear as,

This page isn’t working

Webshotingmeter.com is unable to handle this request

HTTP ERROR 500

Apache

While the Apache error screen may appear like this.

 

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@localhost, to inform them of the time the error occurred and the actions you performed just before this error. More information about this error may be available in the server error log.

 

On the other, you will see,

 

500. That’s an error.

The server encountered an internal error or misconfiguration and was unable to complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

That’s all we know

 

And sometimes, the error 500 may leave a blank screen on your browser. To fix this error, let's first know the root causes of this error.

What Causes The 500 Internal Server Error?

An HTTP 500 Internal Server Error refers to a sudden and unexplainable issue, such as a temporary glitch in the server, that can occur for various reasons. It is a general error message indication comprising various triggers and causes.

Fortunately, it is not associated with any problems regarding your browser, device, or internet connection. But unfortunately, this generic error code then includes a range of other issues, and you may not necessarily know what they are.

So, here are some common problems frequently known to result in the HTTP 500 Internal Server Error.

Permissions Error

500 internal error may also be caused by permission error that typically occurs due to a restriction placed on a file or directory to prevent the file from unauthorized access on the files or directories.

Various factors, such as a misconfiguration, a bug in the software or application, a user mistake, or a networking problem, can cause it. This prevents the successful execution of an action by the server, showing that the user doesn't have the privilege to authorize the website, resulting in a 500 error message.

Corrupted .Htaccess File

The .Htaccess files are text-based files with crucial server instructions enlisted in them. They are known to save passwords and provide authorized access to users by allowing the software to activate the functions required to act or set up redirects.

 

So, if an .Htacess file is corrupted during file configuration or plugin installation, the server won’t be able to act, resulting in the HTTP error 500.

PHP Memory Limit

PHP is a server-side scripting language that undergoes tasks such as content, session tracking, databases, etc. Each of these processes occupies some memory space. However, the server only has limited memory.

So, if a website you are trying to access requires more storage space than is available on the PHP, the server will be unable to act, resulting in the 500 Internal Server Error.

Third-Party Plugins/Themes

Using third-party plugins and website themes is common practice to increase its functionality, features, and performance. Although plugins can do wonders for sites, they can harm the website’s security, performance, and bugs.

They are often created by unknown third parties, which can be risky. It also means that it can be challenging to assess their authenticity, and the server may require more time to address any issues with the plugin. So, the server may run into a time-out and fail to perform the task resulting in the 500 Error.

Other Causes of the 500 Internal Server Error

As mentioned earlier, a wide range of causes can cause HTTP 500 Internal Server Errors.

Browser Cache

WordPress cache

Connectivity problem

Incorrect rules or syntax errors in .Htaccess file

Wrong PHP version of the website

PHP timing errors with third-party plugins

CGI and Peri scripts error

Large media and files on your website

No more disk space on the server

Corrupted database

Corrupted WordPress core files

Corrupted files in WordPress Installation

Incorrect log-in credentials for the database

Incorrect file permissions

Problems with the MYSQL server

● Changes made by a hosting company 

Fix The HTTP 500 Internal Server Error: 17 Proven Fixes

There are always troubleshooting methods for every error, but the fix may depend on the cause. You may not know if the error 500 occurred from the user side or error origin is the server.

To know which side is the culprit for giving perplexed signs to the server, we have to check the website status.

Firstly, Check the Website Status

Checking the website is the foremost troubleshooting method when you don’t know the main cause of the error preventing you from accessing the website.

You can also check if the website is down for you or others in the following ways.

1. Access the website on another browser

If you can access the website on a different browser, the issue might be with your current browser. You can try clearing the cache and cookies of your browser or resetting the browser settings to default.

2. Try to access another website on the same browser

If other websites load immediately on the same browser, the issue is likely with the website's server. In this case, you can wait for the server to return online.

3. Use online tools

There are several online tools available, such as Down for everyone or just me,” IsItDownRightNow,” or  ICANN lookup tool.” These tools tell you whether the website is down for others or is it just facing the issue. We will explore the possible fixes for both the users and the website owners.

 

If the abovementioned checks indicate that the problem stems from the website's backend, you should check the server status and troubleshoot the problem.

 

 

Now that you know the root cause, you can apply the relevant fixes.

Fixes as a Guest User

  1. Force refresh the webpage
  2. Switch To Other Network
  3. Flush the Browser Cache

Fixes as a Website Owner

    1. Clear WordPress cache
    2. Check for any Malware
    3. Check for other software
    4. Check the Large files
    5. Check File and Folder Permissions
    6. Check Error Logs of Website
    7. Check the .Htaccess File
    8. Alter the PHP Version
    9. Increase PHP Memory Limit
    10. Repair the Database
    11. Check WordPress Plugins
    12. Change the WordPress Theme
    13. Restore the Backup of the website
    14. Reinstall WordPress core

Fix 500 Internal Error as a User

Let’s first discuss the fixes you may apply if you are exploring the site as a guest user. 

1. Force Refresh the Page

Force refreshing a webpage can be tested to check whether the error is temporary. The website may go down temporarily when the server or host may be experiencing high traffic, causing a temporary disruption in the website's availability. However, the website should be accessible again in the near future as the load subsides.

You can reload the web page with the keyboard shortcut combinations below for whichever browser you use for web surfing and fix the 500 internal error.

Chrome

 

Windows: Hold down the Ctrl key and press F5 to do a hard refresh.

Mac: Hold down the command + shift + R keys simultaneously on Mac to reload a page.

Firefox

 

Windows: Hold down the Ctrl and Shift keys, then press R to refresh the page.

Mac: Hold down the command + shift + R keys simultaneously on Mac to reload the page.

Safari

Use this shortcut combination Command + Option + R on Safari browser to refresh the webpage.

Microsoft Edge

Press Ctrl + F5 keys simultaneously if you are using Microsoft Edge.

If reloading the page doesn’t work, the error is long-lasting due to some potential reason. Now, you have to try another method.

2. Switch To Other Network

If page reloading doesn’t work, there might be an issue with the network. In that case, switching to a different network may resolve the error.

 

To switch to a different network, you may try connecting to a different WiFi network or switching the WiFi to mobile data o your smartphone.

 

If you still cannot load the web page, you can follow the next method of clearing the browser cache and cookies.

3. Flush the Browser Cache

Your browser saves cookies and cache data, including the passwords, websites you visited, files and downloads etc., to provide a better user experience in your next browsing. Moreover, this also protects you from the hassle of entering the complete URLs or remembering the passwords.

However, this browser cache also causes glitches while browsing, or sometimes outdated or incorrect cache information may be causing connection errors that prevent browsing. And one of those frustrating errors is a 500 internal server error.

So, one possible solution to fix the error is to flush the browser cache and history.

Chrome

  1. To clear the cache in Chrome, simply click on the three dots at the top right corner of the homepage and select More tools > Clear browsing data.
  2. From there, select the time range and checkmark all relevant boxes.
  3. Then, click Clear data.

You can also use a shortcut by entering “chrome://settings/clearBrowserData” in the address bar.

Microsoft Edge

You can flush the Edge cache with these steps.

  1. Click on the three horizontal dots at the top right corner of the home page of Edge and click on History.

 

 

  1. History will open a browsed data tab. From there, click on three dots and click Clear Browsing Data.

 

  1. Select the Time Range and other boxes, such as cached images and files. 

  1. Click Clear Now.

Mozilla Firefox

Firefox has the same method as Chrome to clear the cookies and cache.

 

  1. Click on the three-line icon at the top right corner and go to Settings > Privacy and Security > Cookies and Site Data.
  2. Click Clear Data.
  3. Now, checkmark the boxes and again click Clear Data.

Safari

  1. For Safari, click on Safari at the top left corner of the homepage and select Preferences > Advanced.
  2. Now checkmark the Show Develop menu in the menu bar.
  3. Then, go to the main page of Safari, click Develop, and select Empty Caches.

If clearing the cache doesn't fix the error, another cause may be at play, and you should try other troubleshooting methods. Always ensure the website is not undergoing maintenance or experiencing downtime.

Fix 500 Internal Error as a Website Owner

Let’s now discuss how to fix HTTP 500 error if you own a site.

1. Clear WordPress Cache

Clearing the cache in WordPress can sometimes help resolve a 500 internal server error.

You can follow the given below steps to clear your WordPress cache.

  1. Log in to your WordPress dashboard and click WP Super Cache or W3 Total Cache under plugins tab, depending on which caching plugin you use.
  2. Look for an option to clear the cache. In WP Super Cache, you can find this under the Delete Cache tab. In W3 Total Cache, you can find it under the Performance tab > Dashboard > empty the page cache.
  3. Wait for the cache to clear completely. This may take a few minutes.

Refresh your website and check if the 500 internal server error is resolved. If clearing the cache doesn't work, other issues may be causing the error, so apply another fix.

2. Check for Any Malware

Malicious software infections can wreak havoc on your site's code, leading to server timeouts, slow performance, and 500 errors.

Certain types of malware, such as cryptominers, can consume significant server resources, resulting in degraded performance and errors. Meanwhile, black hat SEO infections can generate thousands of spam pages, which can continue to be crawled by search engines long after they have been removed. This can also contribute to a reduction in site performance and 500 errors.

Nevertheless, by staying vigilant and employing effective troubleshooting techniques, you can help ensure your website stays up and running smoothly. Moreover, you can contact us to clean up your website with infected malware. 

3. Check for Other Software

One common cause of the 500 internal error is a recent installation or upgrade of the software on your website that failed to install correctly.

To fix the error, it's important to investigate any recently installed or upgraded software on your website, what it is, how long it has been installed on your site, and whether or not it is legitimate.

      It's best to immediately remove the software or any component, whether a plugin or reinstall, to fix the error.

4. Check Large Files

Large files on your website may also cause 500 internal server error. When hosting on shared servers like SiteGround, there's a limit of 8GB for files that can be opened via the web. To determine if this is the issue, check your website's files via SSH, FTP, or File Manager to locate the problematic file. You'll often find that these are logs with PHP errors.

On SiteGround servers, PHP error logs are automatically created if your site's PHP scripts produce non-critical errors or warnings during execution. The log file is named php_errorlog and is located in the same directory as the script that generated the errors. Typically, this is your website's root folder.

If you identify a large file as the culprit, you can try to reduce its size or split it into smaller files.

      Alternatively, you can contact your hosting provider for assistance in increasing the size limit for files on their server.

If large files are not the culprit, then check the file permissions.

5. Check File and Folder Permissions

Incorrect files and folder permissions may cause 500 internal server errors. Ensuring the correct permissions for files and folders is crucial for WordPress sites.

      Typically, all files should be set to 644 (-rw-r–r–) or 640, and all directories should be 755 (drwxr-xr-x) or 750. However, it's important to note that no directories should ever be given 777, even upload directories.

To further strengthen the security of your site, you could also harden your wp-config.php file by setting it to 440 or 400, preventing other users on the server from accessing it.

If the error is not gone, you can try another method.

6. Check Error Logs of the Website

Error logs can provide valuable information about misconfigured files, scripts, or exceptions that occur during operations of sever causing issues, which can help you detect and fix the problem more easily. It provides important information, such as details about which folder or file may be causing the problem, a description, and the date and time.

You can check the error logs om cPanel by logging in to your hosting account and click Errors under Metrics. This will display the latest web server error messages.

If you are still unable to access the website, then hop on to the next fix.

7. Check the .Htaccess file

One common type of error that can be identified in the error log is related to the .htaccess file. This file is located in the root folder of your website and can cause issues if there are syntax errors.

Reviewing the error log and identifying the issue with the .htaccess file allows you to navigate to the folder in question and correct the problem. If not, then you need to regenerate it. 

8. Repair the Database

An incorrect database login credentials, a corrupted WordPress database due to missing or individually corrupted tables, corrupt files in your WordPress installation, or issues with your database server, such as overloading due to a traffic spike or unresponsiveness from too many concurrent connections may cause 500 internal server error. This will generate a 500 HTTP status code in your server logs, which may appear differently depending on your browser.

You can fix HTTP 500 error by restoring the database from a backup or repairing it with these general steps.

  1. Login to your hosting account and go to File Manager.
  2. Open wp-config.php file and double-check that the database credentials are correct, including the database name, username, and password. You can also create a new user with full privileges and update the wp-config.php file to use these new credentials.
  3. Click edit and add the following line to your wp-config.php file: define('WP_ALLOW_REPAIR', true).
  4. Navigate to http://yourwebsite.com/wp-admin/maint/repair.php in your browser and click “Repair Database” to begin the repair process.

Before making any changes to your database, creating a backup is crucial in case anything goes wrong. If you cannot fix the error, try another method.

9. Alter the PHP Version  

PHP version plays a crucial role in running your website smoothly. If you encounter the 500 Internal Server Error, it could be because of an incompatible PHP version.

Firstly, check the minimum and maximum required PHP version for your website’s CMS, whether WordPress, Drupal, or any other. Ensure that your server has a compatible version installed.

      If your website is already running on the minimum required PHP version and still facing the error, try upgrading to a higher version. SiteGround users can change the PHP version directly from their cPanel, without contacting the support team.

Go to cPanel, search for the “Select PHP version” icon, and choose the best version for your website. After changing the PHP version, test your website to check if the error persists. The issue is related to the PHP version if the error is gone.

If the error still exists, it could be because of some other reason, and you should try other solutions.

10. Increase PHP Memory Limit

PHP libraries are essential to PHP scripts, requiring a sufficient memory limit for optimal performance. If you encounter a 500 Internal Server error, your script may consume all the available PHP memory limit or PHP workers.

In that case, increasing the available PHP memory limit from the Server and Packages tab may resolve the HTTP 500 error, enhancing the website's performance and smooth execution of PHP scripts.

Moreover, you can also avoid the dreaded “Allowed memory size” error, which can be frustrating and time-consuming to troubleshoot.

Alternatively, if you have defined a memory limit in the application configuration files, you can simply increase the value in these files.

Check PHP memory in WordPress

First, check the PHP memory in WordPress with these steps.

 

  1. Navigate to WordPress dashboard and click on Tools > SIte Health.
  2. Click on Info > Server.
  3. You will see PhP memory limit under the server section.

Increase PHP Memory in wp-config.php file

  1. Login to your site account using SSH or FTH.
  2. Then, search the wp-config.php file in the main folder of your WordPress website and download it as a backup and right-click on the file and click Edit.
  3. Edit it by adding the following code.

define( 'WP_MEMORY_LIMIT', 512 M)

  1. It will then read, That's all, stop editing! Happy Publishing.

Increase Memory Limit in php.ini File

If you're only experiencing the internal server error when logging in to your WordPress admin or uploading an image, follow the steps below.

  1. Login to your site using SSH or FTH and create a blank text file on your server named php.ini.
  2. Add this code, memory=256MB.
  3. Save the file, and upload it into your root directory domain.com/php.ini.

Increase PHP Memory in cPanel

If you are using a host that offers cPanel, you can modify memory limit from the UI with these steps.

  1. Login to your cPanel account and click Select PHP Version under Software.
  2. Then, click Options under PHP Selector.
  3. Change the memory_limit attribute value to new required value.

Increase PHP Memory in Apache

You can modify the server behavior from your .htaccess file for those using Apache.

  1. Locate your .htaccess file via SSH orFTH.
  2. Add the following line:

php_value memory_limit xxx (replace "xxx" with your desired memory limit value in megabytes).

  1. Save the changes and create a PHP test file to verify that the new setting is active by passing the following code in the same directory.

<?php

phpinfo();

?>

Increasing the memory limit is just a temporary fix. You must still identify the root cause of exhausting your memory limit, which could be a poorly coded plugin or theme function.

If increasing the PHP memory limit doesn't resolve the issue, don't panic. You may need to troubleshoot more, but you'll eventually fix the problem with patience and perseverance.

11. Change the WordPress Theme 

If you're experiencing a 500 internal server error on your WordPress site, it could be caused by a problem with your current theme. In some cases, a faulty theme or a theme that's not compatible with your WordPress version can trigger this error.

Apply the following steps to fix the internal 500 server error.

  1. Log in to your WordPress dashboard and go to Appearance > Themes.
  2. Hover over the active theme you want to deactivate and click Theme Details.
  3. Click Delete on the theme details screen to remove the theme from your site.
  4. If you have another theme installed that you want to use, hover over that theme and click Activate. If you don't have another theme installed, click the Add New button to browse and install a new theme.
  5. Once you've activated a new theme, reload your site to see if the error has been fixed.

If changing the theme doesn't fix the issue, another problem may be causing the error. You can try disabling your plugins, reinstalling the WordPress core or restoring your site from a backup to troubleshoot the issue further.

12. Disable the WordPress Plugins

One potential culprit that can cause the dreaded internal 500 Error is a misconfigured WordPress plugin. To troubleshoot this issue, it is recommended to disable the plugins one by one until the problem is identified.

Follow these steps to disable WordPress plugins.

  1. Go to the WordPress dashboard and click Plugins > Installed Plugins.
  2. From the drop-down Bulk actions menu, choose Deactivate.
  3. Check the box next to Plugin and click Apply to disable all plugins.

After disabling the plugins, reload the website and see the error is fixed. If not, try another fix.

13. Restore the Backup of the Website

If the above steps don’t work, restoring a backup of your website might be the solution. This method can bring your website back to its previous state before the error occurred. To restore a backup of your website, you'll need a backup available. If you don't have a backup, you may need to contact your hosting provider or use a backup plugin to create one.

Follow these general steps to restore your website backup.

  1. Log in to your cPanel account and click Backup.
  2. Locate the backup file and Download the backup file to your local computer and extract the backup file if it's in a compressed format like .zip.
  3. Open the file manager in your hosting account and navigate to the root directory of your website.
  4. Delete all the files and folders in the root directory and Upload all the files and folders from the backup to the root directory of your website, including the WordPress core files, themes, plugins, and uploads folder.

The process may vary slightly depending on your hosting provider and setup. Check if your website is functioning properly by visiting the site in a new browser window or tab.

14. Reinstall WordPress Core

The core files of WordPress may have become corrupted, which is causing the 500 internal server error. To fix the error, you can reinstall the WordPress core files without affecting your themes or plugins. Before proceeding, it's always best to take a backup of your site, including the database and all files. This is important in case something goes wrong during the reinstallation process.

Here are the general steps to reinstall the WordPress core files.

  1. First, fully back up your WordPress site, download the latest version of WordPress from the official website or cpanel account and extract the WordPress ZIP file on your local computer.
  2. In the root directory of your WordPress installation, rename the wp-admin and wp-includes folders to something like wp-admin-old and wp-includes-old.
  3. Next, upload the new wp-admin and wp-includes folders from the extracted WordPress files to your website's root directory.
  4. Finally, copy all files from the new WordPress folder except the wp-config.php file and the wp-content folder, and upload them to the root directory of your WordPress site.
  5. Once the upload is complete, log in to your WordPress dashboard to check if everything works properly.

The process may vary slightly depending on your hosting provider and setup. Always refer to the official WordPress documentation or seek help from a professional if you're unsure about any step of the process.

Contact Web Hosting Provider

If the above solutions do not work for you, it’s time for you to contact the web hosting provider company. They would analyze the server logs and identify the exact diagnostics. Regardingly, they would propose pr apply the fix to troubleshoot the 500 internal server error, allowing you to do error-free smooth web browsing.

Does 500 Internal Error Impact the SEO of a Website?

The 500 Internal Server Error can potentially negatively impact the SEO of your website if it is not fixed instantly.

Your website experiences consistent crawling by Google's web crawling algorithm, Googlebot. So, if the error is fixed automatically fast enough or the site is dead for a few minutes due to a 500 error, Google may not even need to recrawl it at times, and thus, it would not pose a great impact on web crawling.

However, if the error persists, Googlebot will decrease the crawling frequency and remove the URLs from the search index altogether. Google detects that your site is infected with malware or serves harmful content, and your website may be added to a block list. This can severely affect your search engine rankings and organic traffic.

To prevent this from happening, it's crucial to identify the root cause of the 500 error and take steps to rectify them. Doing so will help mitigate the risks to your website's SEO and ensure your site remains accessible and visible to users. The fixes listed above can be helpful for your troubleshooting process.

Conclusion

500 Internal Server Error can be annoying since it does not inform users about a specific problem. Plus, it is capable of ruining the SEO ranking you have worked hard to achieve for your site. However, the good news is you can use easy troubleshooting solutions to quickly fix the error.

Mainly, the 500 Error occurs due to permission errors, low PHP memory limit, excessive browser cache, third-party plugins and themes, and a few other such reasons. So, you can easily directly target these issues to fix the error altogether.

So, now that you know about the 500 Error, don’t simply ignore it the next time you see it! Fix it instead!

FAQ

How Do I Fix a 500 Internal Server Error?

You can fix the 500 internal server error as a guest user by force refreshing the page and deleting the browser cache. However, if the issue is from the web end, you may try flushing the WordPress cache, increasing the PHP memory limit, repairing the database, reinstalling the WordPress core, and checking the error logs and folder permissions, etc.

What Causes 500 Internal Server Error?

The corrupted .Htaccess files or incorrect rules or syntax errors in .Htaccess files are the common culprit for the 500 Internal server error. However, many causes are at play, including PHP memory limit, permission errors, third-party plugins, WordPress cache, CGI and Peri scripts errors, a corrupted database or WordPress core files, etc.

What is Error 500 on Local Host?

The Error 500 message on the local host means Apache struggles to process your request and offer a suitable response. This Internal Server Error occurs when a server-side glitch interferes with Apache's ability to perform its duties. The reasons for this could vary from faulty code and insufficient file permissions to missing files referenced in your code.

What is a 500 Internal Server in PHP?

500 Internal Server Error is when your PHP script makes many external network connections that end up timing out in several and ultimately fail to respond; it will cause this frustrating error 500.

How To Fix Error 500 in PHP?

To fix error 500 in PHP, properly code your PHP scripts with timeout rules. This will ensure that the script is not left hanging for too long and that it can handle the potential network hiccups that may occur and keep your website running smoothly.

PROMO

FREE Web Hosting
for Your Website

Learn More
Rowena

PROMO

FREE Web Hosting
for Your Website

Learn More
Rowena