The “HTTP 500 Internal Server Error” appears for many reasons. Users may encounter it frequently due to its broad causes.
This guide explains the meaning of “HTTP Error 500” and how to fix it.
What Does “HTTP 500 Internal Server Error” Mean?
Error 500, also called Internal Server Error, signals a server-side issue. The server fails to process a request due to an unexpected error or misconfiguration.
The “500 – Internal Server Error” belongs to the 5.X.X. HTTP error codes (500, 502, 503, 504, etc.). Each code represents a different issue, but all indicate server-related problems.
A hosting server fails to identify the exact issue and provides a specific message. Instead, it shows “500 Internal Server Error,” meaning the actual cause remains unclear.
Websites and servers customize error messages so that different variations may appear, such as:
- 500 Internal Server Error
- Internal Server Error 500
- HTTP Error 500
- HTTP Status 500 – Internal Server Error
- Error 500 Internal Server Error
- 500 Error
- 500. That’s an error
The appearance of the error page also differs based on the website. Below is a generic example of an “Internal Server Error” page.
Sometimes, the page has a unique design, like the one in the image below.
These are just a few versions of the error page, appearing in many different forms. No matter the design, it always means one thing—the server has an issue it cannot identify, stopping you from accessing the website.
What causes an HTTP 500 Internal Server Error?
The error message says the issue is on the server, but that is not always true. Some common causes include:
- Damaged browser cache
- Temporary connection problems
- Errors or wrong rules in the .htaccess file
- Incorrect file or folder permissions
- Wrong PHP version for the site
- Corrupt .htaccess file
- Broken website database
- Issues with WordPress themes or plugins
- Website hitting PHP memory limit
- Corrupt WordPress core files
- Extensive files on the site
- MySQL server issues
Fixing the “500 Internal Server” Error
The error can happen for different reasons. The page will not show the exact issue. You must check possible causes one by one to find the problem.
Solving the “HTTP Error 500” as a Visitor
If you see the error as a visitor, check if the issue is on your side. Try simple steps to fix connectivity problems. These actions also help website owners with quick checks. If the problem is local, following these steps can save time.
Reload the Page
The “HTTP Error 500” might appear only for you due to a short connection issue. The website could be working, but you may have tried to access it during a brief outage or when your network failed to connect to the server.
Reload the page in the same browser using the Reload button or press Command+R on Mac. On Windows, use F5 or Control+F5.
The issue is temporary if the site loads correctly and no further action is needed.
Clear Browser Cache and Cookies
If reloading does not work, the browser may store outdated or corrupted cache files and cookies. Reloading will not remove them, so you need to clear them manually.
For step-by-step instructions, follow a guide on clearing cache and cookies in desktop browsers.
If using a mobile device, check guides on deleting cache for Android or iPhone.
You can also try opening the site in a different browser. For example, switch to Firefox or another browser if you use Chrome.
Clear the cache, then refresh the page to check if the problem disappears. If it stays, go to the next step.
Use a Different Network
Network issues may cause the “HTTP 500 Error” across all devices connected to the same network. If this happens, the error will likely appear on every device.
To check if the network is the problem, switch to another connection. For example, switch to mobile data if using Wi-Fi on a mobile phone.
Fixing the HTTP 500 Internal Server Error on a Website
The steps above should resolve the issue in most cases. You may need to investigate further if the error continues because the problem comes from the website.
As a website owner or administrator, you can try different checks to fix the 500 Internal Server Error.
Review Website Error Logs
Errors on a website often result from incorrect scripts or misconfigured files. Checking the error logs can help find the cause.
These logs are usually available in the hosting control panel. SiteGround users can locate the Error Log in the Site Tools.
To access it, go to the Websites section in the Client Area. Open Site Tools for the site, click Statistics and then select Error Log.
The latest website errors detected by the server will be listed. Each error log contains key details:
- Date and time of the error
- Error description
- The file or folder linked to the error
Below is an example of an error log showing an issue with the .htaccess file.
The log shows the issue comes from the .htaccess file in the website’s root folder. It also indicates that the error occurs due to a missing argument, which means a syntax mistake exists.
Use the information to access the correct folder through File Manager, edit the .htaccess file, and fix the syntax issue.
The server log saves configuration problems. It does not include PHP or script errors because they occur in the application.
PHP-related errors appear in php_errorlog. The system creates this file automatically in the same folder as the problematic PHP file. On SiteGround hosting, the PHP error log remains enabled by default. If previous settings disabled it or the hosting provider does not support it, follow a guide to activate error reporting in a PHP script.
Use File Manager or an FTP client to view the PHP error log. If a script in the root folder causes the error, go to that location. Open the php_errorlog file to check the errors.
The php_errorlog file records basic PHP errors. To see more details, turn on the WordPress debug log, especially for WordPress. Check a guide for steps to enable the debug log in WordPress.
Reset File and Folder Permissions
Incorrect file and folder permissions often cause the “HTTP 500 Error.” The website may display an error page if visitors cannot access essential files and folders.
Standard permissions are 644 for files and 755 for folders. Modify these settings through the File Manager in the hosting panel or an FTP client.
SiteGround users can adjust permissions for WordPress sites using the Reset Permissions tool in Site Tools.
Other applications require a guide on changing file and folder permissions in File Manager.
If the hosting panel lacks tools for permission changes, adjust permissions through SSH or an FTP client.
Change the PHP Version
Using an incorrect PHP version may cause scripts to time out or produce fatal errors, leading to the “HTTP 500 Error.”
Test the site with an older or newer PHP version. If the error disappears, the previous version caused the issue. Keep the functioning version active.
SiteGround users can switch PHP versions in Site Tools with a few clicks. Follow a guide for step-by-step instructions on changing the PHP version in Site Tools.
Inspect or Regenerate the .htaccess File
A corrupted .htaccess file, an incorrect root folder definition, or a syntax error can trigger an “Internal Server Error.” The website may display an “HTTP 500 Error” page when the file becomes damaged.
Fixing Syntax Errors in .htaccess
A syntax error in .htaccess can cause issues. The error log gives an example:
<2022-05-17 14:32:40 UTC [apache][core:alert] [pid 68451] [client 35.214.177.225:57966] /home/user/www/sg-testing.com/public_html/.htaccess: <IfModule> directive requires additional arguments
To check the file, open the website’s Site Tools. Go to the Site section and click File Manager.
Find the public_html folder inside the website’s root directory. In this case, the path is sg-testing.com/public_html.
Inside this folder, locate the .htaccess file. Click the file, then select Edit to open the code editor.
Review the code. The error log shows the problem is in <IfModule>. The closing tag is missing a forward slash (</IfModule>).
Add the missing slash, save the changes, and click Save. Reload the website. It should now work correctly.
Incorrect Root Folder in .htaccess
Setting the wrong root folder in .htaccess is a common mistake. It often happens in these situations:
- The site moved from a different host and is staying in a subfolder.
- The site started in a subfolder and later shifted to the main domain folder.
- A WordPress plugin changed the RewriteBase in .htaccess, making the website inaccessible with a 500 Internal Error.
Look at the /dev path in RewriteBase. The code tells the server to load the site from a public_html/dev folder. Since the folder does not exist, opening a page on the website will show an “Internal Server Error” message.
To fix it, delete the subfolder path from RewriteBase. The corrected code should be:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_URI} !/(wp-content\/uploads/.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
WordPress uses this code to define the site’s root folder. Save the update in File Manager, then refresh the site. The error should disappear.
Create a New .htaccess File
Another way to fix the issue is by replacing the .htaccess file. To do this, open File Manager, go to public_html, find the .htaccess file, and rename it.
You can use any name, such as htaccess-old. Then, create a new .htaccess file.
Log into the dashboard for WordPress sites, go to Settings, then Permalinks. Click Save Changes to generate a new .htaccess file with default WordPress settings.
For non-WordPress sites, find the correct .htaccess code for your application. In File Manager, click New File, name it .htaccess, paste the default code, and save it.
Reload the site after updating the .htaccess file to check if the error disappears.
Fix the Database or Update Credentials
A damaged database can lead to a “500 Internal Server Error” on your site. You can try restoring it from a backup or repairing it.
For WordPress, the issue may happen when the site cannot connect to the database. Check if the wp-config.php file has the correct login details.
Turn Off Plugins in WordPress
A faulty plugin can cause an “HTTP 500 Error” in WordPress. The usual method is to turn off plugins individually to find the problem.
If the error appears only on the front end and you can still log into the WordPress dashboard, go to the Plugins section. Click Installed Plugins. Choose Deactivate from the Bulk Actions menu, select all plugins, and click Apply.
The error sometimes blocks access to the WordPress dashboard so you may need a different method. Some guides recommend renaming the wp-content/plugins folder, but you should avoid this. It might remove the “HTTP 500 Error” but can cause other issues.
A better option is to turn off plugins using Site Tools (for SiteGround users) or through the database.
Turn off the plugins and refresh the website. If the error disappears, one of the plugins will cause the issue.
Enable the plugins one at a time. The error will return when the faulty plugin is active. Turn off the plugins again to access the dashboard and activate all except the problematic one.
You can replace the faulty plugin or contact its developers to report the issue.
Change the WordPress Theme
A misconfigured theme can trigger a “500 Internal Server Error” in WordPress. Switch to a different one to check if the theme is the problem.
Usually, you can change the theme from the WordPress dashboard. However, if the “HTTP 500 Error” prevents login, use an alternative method.
Increase PHP Memory Limit
An “HTTP 500 Error” can happen when PHP scripts exceed the memory limit. The default limit on SiteGround plans is 512M, but your WordPress site may have a lower value. Follow the steps in the guide to increase the WP Memory Limit.
Restore a Website Backup
If the problem continues or the solutions are complex, restore the website from a backup. The backup will remove recent changes that created the error.
Check for Large Files on Your Website
A large file on your website can cause this error. SiteGround’s shared hosting has a file size limit for web access. The limit is 8GB. If a file exceeds this, the error will appear.
Use SSH, FTP, or File Manager to check your files. Find the one causing the issue. Often, PHP error logs are the reason.
SiteGround’s servers create a log file when PHP scripts have warnings or non-critical errors. The file is called php_errorlog and is in the same folder as the script with mistakes. Usually, this is your site’s root directory.
Contact Your Hosting Provider
The 500 Internal Server Error might not be due to your website settings. The MySQL server could be down, or the server might be overloaded. Contact your hosting support team to check the issue.
Monitor 5xx Errors to Protect SEO
5xx errors can reduce your site’s search rankings. Run regular bulk checks with tools like Website Auditor. It detects all 500 errors on all pages and lets you export the data for analysis and fixes.
To scan your site, open the tool, create a new project, and let it crawl your pages. When done, go to the Site Audit section and check Indexing and Crawlability for 5xx errors.