4 min read

A 500 Internal Server Error means something failed on the server and the visitor only gets a generic message. The specific cause is written to the error log.

If multiple sites on your account broke at once, check status.gozenhost.com before digging into logs - service-wide incidents look identical to local problems until you rule them out.

Step 1: Check the Error Log

This is the fastest way to find the problem.

In cPanel

  1. Go to Metrics > Errors (shows the most recent Apache/LiteSpeed errors)
  2. Or go to File Manager > navigate to your site’s root > look for error_log

Via SSH (VPS, Business Cloud, Dedicated)

Shared and WordPress plans have no shell, so use the cPanel steps above there.

  # Last 50 lines of the site error log
tail -50 ~/public_html/error_log

# Server-wide web server log (root access)
# cPanel with Apache:
sudo tail -50 /usr/local/apache/logs/error_log
# LiteSpeed:
sudo tail -50 /usr/local/lsws/logs/error.log
# Debian/Ubuntu Apache without cPanel:
sudo tail -50 /var/log/apache2/error.log
  

The error log tells you exactly what failed: a PHP fatal error, a missing file, a syntax error, or a permission problem.

Step 2: Common Causes and Fixes

Bad .htaccess File

The single most common cause of 500 errors. Test it:

  mv ~/public_html/.htaccess ~/public_html/.htaccess.bak
  

If the site loads, the .htaccess is the problem. Common issues:

  • Syntax errors (typos in rewrite rules)
  • Directives that LiteSpeed doesn’t support
  • Conflicting rules from multiple plugins
  • php_flag or php_value directives on a server running PHP-FPM (they work under LiteSpeed LSAPI and Apache mod_php, but PHP-FPM rejects them with a 500)

For WordPress, reset to the default .htaccess:

  # 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
  

PHP Fatal Error

The error log will show something like:

  PHP Fatal error: Uncaught Error: Call to undefined function xyz() in /home/user/public_html/wp-content/plugins/broken-plugin/file.php
  

Fix: The error tells you the file and line number. If it’s a plugin, deactivate it. If you can’t access wp-admin:

  # Rename the broken plugin's folder to deactivate it
mv ~/public_html/wp-content/plugins/broken-plugin ~/public_html/wp-content/plugins/broken-plugin.disabled
  

PHP Memory Limit Exhausted

Error log shows:

  PHP Fatal error: Allowed memory size of 67108864 bytes exhausted
  

Increase the PHP memory limit:

  1. In cPanel, go to Select PHP Version > Options > set memory_limit to 256M
  2. Or add to wp-config.php (before the “stop editing” line):
      define('WP_MEMORY_LIMIT', '256M');
      

Wrong PHP Version

Some plugins or themes require a specific PHP version. If you recently changed PHP versions:

  1. Go to cPanel > MultiPHP Manager or Select PHP Version
  2. Try switching back to the PHP version that was working
  3. Test your site

File Permission Issues

If the web server can’t read your files:

  # Fix permissions
find ~/public_html -type d -exec chmod 755 {} \;
find ~/public_html -type f -exec chmod 644 {} \;
  

PHP Timeout

If the error log shows a timeout, your script is running too long. This usually means a slow database query or an infinite loop.

  1. Go to Select PHP Version > Options
  2. Increase max_execution_time to 300 (5 minutes)
  3. If it’s a specific page timing out, optimize the underlying query or process

Step 3: WordPress-Specific Fixes

If you can’t access wp-admin at all:

Deactivate All Plugins via File Manager

  1. Go to cPanel > File Manager
  2. Navigate to public_html/wp-content/
  3. Rename the plugins folder to plugins.disabled
  4. Try loading your site
  5. If it works, rename back to plugins and activate plugins one by one to find the culprit

Switch to a Default Theme

  1. In File Manager, navigate to public_html/wp-content/themes/
  2. Rename your active theme folder (e.g., mytheme to mytheme.disabled)
  3. WordPress will fall back to a default theme (Twenty Twenty-Five)
  4. If the site loads, the problem is in your theme

What to Do Next

Last updated 21 Oct 2026, 00:00 +0300. history

Was this page helpful?