Skip to content
  • GDPR-compliant
  • 100% hosting in Germany
  • Personal contact
  • Support included
  • Provisioning within 24 hours
Error messages 7 min read

500 - Internal Server Error

What does the 500 Internal Server Error mean?

The HTTP status code 500 (Internal Server Error) is a general error message from the web server. It indicates that an unexpected problem has occurred whilst processing a request - the server cannot successfully complete the request without a more specific error code being applicable.

Unlike errors such as 404 (Page Not Found) or 403 (Access Denied), the 500 error does not provide any direct indication of the cause. Systematic troubleshooting is therefore required.

Important: The 500 error is a server-side error. The problem does not lie with the visitor’s browser or device, but rather with the server configuration, the application code or a resource limitation.


Common causes of the 500 error

There are many possible causes of a 500 Internal Server Error. Here are the most common triggers:

Cause Description Frequency
Incorrect .htaccess Syntax errors or invalid directives in the .htaccess file Very common
PHP errors Syntax errors, missing functions or fatal errors in the PHP code Very common
Incorrect file permissions Files or directories have incorrect read/write permissions Common
PHP memory limit Script requires more memory than is permitted Common
Faulty plugin/theme Incompatible or faulty WordPress plugin or theme Common
Database errors Connection issues or corrupted database tables Occasional
PHP timeout Script runs for longer than the permitted execution time Occasionally
ModSecurity block The web application firewall is blocking a request Occasionally
Missing PHP modules The application requires a PHP module that is not enabled Rarely

Step 1: Analyse the error log

The first and most important step in troubleshooting is to analyse the error log. This is where the server records detailed information about every error.

How to find the error log

Your domain’s error log is located at:

/home/users/IHR-BENUTZERNAME/logs/ihre-domain.de/error.log

Access options:

  • KeyHelp File Manager: General → File Manager → logs → your-domain.de
  • FTP/SFTP: Navigate to the directory logs in your home directory
  • SSH: tail -100 ~/logs/ihre-domain.de/error.log

Typical error messages in the error log

Error message Meaning Solution
PHP Fatal error: Allowed memory size exhausted PHP memory limit exceeded Increase the memory limit
PHP Parse error: syntax error Syntax error in the PHP code Correct the code (line number specified)
PHP Fatal error: Call to undefined function Missing function or PHP module Enable module or check code
Invalid command 'xyz' in .htaccess Invalid directive in .htaccess Check and correct .htaccess
Permission denied No permission for file/directory Correct file permissions
ModSecurity: Access denied Request blocked by firewall Contact support for an exception
Maximum execution time exceeded PHP script timeout exceeded Optimise code or increase the timeout

→ Detailed guide: Reading and understanding server log files


Step 2: Troubleshoot common causes

Incorrect .htaccess file

The .htaccess file is one of the most common causes of 500 errors. A single typo can bring the entire website to a standstill.

How to check the .htaccess file:

  1. Temporarily rename the .htaccess file: .htaccess → .htaccess_backup
  2. Reload the website
  3. Is the page working? If so, the error is in the .htaccess file
  4. Check the file line by line for errors

Common .htaccess errors:

  • Typing errors in directives (e.g. RewriteRul instead of RewriteRule)
  • Missing RewriteEngine On before RewriteRules
  • Invalid syntax in regular expressions
  • Obsolete directives that are no longer supported in newer versions of Apache
  • Unclosed <IfModule>blocks

WordPress default .htaccess:

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

Fixing PHP errors

PHP errors are the second most common cause. Here’s what to do:

  1. Check the error log for PHP error messages
  2. Make a note of the affected file and line number
  3. Correct the error or restore the last working backup

For WordPress: Plugins or themes are often to blame. Rename the plugin folder to deactivate all plugins:

/www/wp-content/plugins → /www/wp-content/plugins_deaktiviert

Correct file permissions

Incorrect file permissions can prevent the web server from reading or executing files.

Recommended permissions:

Element Permission Octal
Directories rwxr-xr-x 755
Files rw-r--r-- 644
wp-config.php rw-r----- 640 (recommended)

Correct all permissions via SSH:

# Alle Verzeichnisse auf 755 setzen
find /www -type d -exec chmod 755 {} \;

# Alle Dateien auf 644 setzen
find /www -type f -exec chmod 644 {} \;

Increase the PHP memory limit

If the error log Allowed memory size exhausted shows that your script requires more memory.

Solution 1: Via php.ini (recommended)

Create or edit a php.ini in the root directory of your domain:

memory_limit = 256M

Solution 2: Via .htaccess

php_value memory_limit 256M

Solution 3: In the PHP script

<?php
ini_set('memory_limit', '256M');
?>

Note: Your hosting package determines the maximum storage limit. With SpeedIT, you can adjust the limit in KeyHelp under Domains → PHP Settings.


Step 3: WordPress-specific solutions

There are a few typical scenarios for WordPress websites:

Identifying a faulty plugin

  1. Connect to the server via FTP/SFTP
  2. Navigate to /www/wp-content/
  3. Rename the pluginsfolder to plugins_old
  4. Reload the webpage - does it work now?
  5. Create a new, empty pluginsfolder
  6. Move the plugins back one by one and test after each one
  7. The plugin after which the error reoccurs is the culprit

Identify the faulty theme

  1. Rename your active theme (under /www/wp-content/themes/)
  2. WordPress will automatically switch to a default theme (e.g. Twenty Twenty-Four)
  3. Does the site work? If so, the theme is faulty

Enable WordPress debug mode

To obtain more detailed error messages, enable debug mode in the wp-config.php:

// Debug-Modus aktivieren
define('WP_DEBUG', true);

// Fehler in Datei statt auf Bildschirm ausgeben
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

// Skript-Debug für CSS/JS
define('SCRIPT_DEBUG', true);

The debug information is stored in /www/wp-content/debug.log .

Important: Remember to deactivate debug mode on live sites once you’ve finished troubleshooting!


Step 4: Advanced diagnostics

Check for ModSecurity blocking

Sometimes the Web Application Firewall (ModSecurity) blocks legitimate requests and causes a 500 error (or 403).

Signs of ModSecurity blocking:

  • The error only occurs during certain actions (e.g. submitting a form, saving an item)
  • In the error log, you will find entries containing [security2:error] or ModSecurity

How to identify ModSecurity blocks:

grep "ModSecurity" ~/logs/ihre-domain.de/error.log

→ Detailed guide: ModSecurity - your shield against cyber attacks

Check the PHP version

Some applications are not compatible with all PHP versions. Updating or downgrading the PHP version may help.

Change the PHP version:

  1. Log in to the web server control panel
  2. Navigate to Domains
  3. Select the domain and change the PHP version

Compatibility overview:

Application Recommended PHP version
WordPress 6.x PHP 8.1 or 8.2
Joomla 5.x PHP 8.1 or 8.2
TYPO3 12/13 PHP 8.1, 8.2 or 8.3
Laravel 10/11 PHP 8.1 or later
Older applications PHP 7.4 (if still available)

Check the database connection

If the database connection fails, this may result in a 500 error.

Check:

  • Are the login details in the configuration file (e.g. wp-config.php) correct?
  • Does the database still exist? (Check in KeyHelp under Resources → Databases)
  • Does the database user have the necessary permissions?

Quick troubleshooting checklist

Work through this checklist systematically:

Step Action Done?
1 Check the error log and note down the error message ☐
2 Rename the .htaccess file and test the page ☐
3 Undo the latest changes (plugin, theme, code) ☐
4 Check file permissions (755 for folders, 644 for files) ☐
5 Check the PHP memory limit and increase it if necessary ☐
6 For WordPress: Deactivate plugins and test them individually ☐
7 Check the PHP version and change it if necessary ☐
8 Restore a backup, if available ☐

When should you contact support?

We recommend contacting our support team in the following cases:

  • The error log does not contain any meaningful error messages
  • The error occurs on the server side (not in the application code)
  • You suspect there is a problem with the server configuration
  • ModSecurity is blocking legitimate requests and you need an exception rule
  • The error occurs suddenly, without you having made any changes

Please include the following in your support enquiry:

  • Affected domain
  • When the error first occurred
  • What actions you have already taken
  • The relevant lines from the error log


Need help?

If you are unable to resolve the issue yourself, please contact our support team. We’ll be happy to help - including via remote support.

Contact support

Was this article helpful?

You might also be interested in:

Personal support

Of course, our support team is also happy to assist you personally. If you cannot find what you are looking for in our knowledge base or require personalised support, please do not hesitate to contact us. We’re here to help you and to ensure that your experience with our products and services is as smooth and enjoyable as possible.