What is a 500 Error?

A 500 Internal Server Error means something went wrong on the server, but the server can't be more specific about what. It's a generic "something broke" message that requires investigation.

First Step: Check the error logs in EGPNL → Logs → Error Logs. The specific error message will point you to the exact cause.

Common Causes & Fixes

1. PHP Syntax Errors

Cause

Missing semicolon, bracket, or typo in PHP code.

Fix

Check error logs for the file and line number. Common errors: missing ;, unclosed {, or $ in string.

2. PHP Version Incompatibility

Cause

Code uses features not available in the current PHP version, or deprecated functions.

Fix

Check required PHP version. In EGPNL, go to PHP → PHP Version and switch to a compatible version.

3. File Permission Issues

Cause

PHP files have wrong permissions (too restrictive or 777).

Fix

Set folders to 755 and files to 644. Never use 777.

# Fix permissions via SSH
find /path/to/site -type d -exec chmod 755 {} \;
find /path/to/site -type f -exec chmod 644 {} \;

4. Missing PHP Extensions

Cause

Application requires a PHP extension that isn't enabled.

Fix

Go to EGPNL → PHP → PHP Extensions and enable the required extension (e.g., mysqli, gd, curl).

5. Memory Limit Exceeded

Cause

PHP script uses more memory than allowed.

Fix

Increase memory limit in EGPNL → PHP → PHP Settings, or add to your code:

// In PHP file
ini_set('memory_limit', '256M');

// Or in php.ini
memory_limit = 256M

6. Corrupted .htaccess (Nginx)

Cause

Some applications create .htaccess files, but EGPHP uses Nginx which doesn't support them.

Fix

.htaccess rules need to be converted to Nginx format. Check EGPNL → Nginx for configuration options.

7. Database Connection Failed

Cause

Wrong database credentials or database doesn't exist.

Fix

Verify database credentials in your config file (wp-config.php for WordPress). Ensure database exists in EGPNL.

8. Plugin/Theme Conflict (WordPress)

Cause

A plugin or theme has a bug or conflicts with another.

Fix

Rename the plugins folder to plugins_old via File Manager. If site loads, rename it back and activate plugins one by one to find the culprit.

WordPress-Specific Fixes

Enable WordPress Debug Mode

Edit wp-config.php and add/modify:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Then check wp-content/debug.log for errors.

Increase WordPress Memory

// Add to wp-config.php
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');

Reset Corrupted Core Files

  1. Download fresh WordPress from wordpress.org
  2. Delete wp-admin and wp-includes folders (NOT wp-content)
  3. Upload fresh wp-admin and wp-includes
  4. Replace wp-config.php only if corrupted
Backup First! Always backup your site before making changes to core files.

Checking Error Logs

Error logs are your best friend for diagnosing 500 errors:

  1. Go to EGPNLLogs
  2. Select Error Logs
  3. Look for recent entries (newest at bottom)
  4. Note the file path and line number

Common Log Messages

  • PHP Parse error - Syntax error in PHP file
  • PHP Fatal error - Critical error stopping execution
  • Allowed memory size exhausted - Memory limit reached
  • Call to undefined function - Missing function/extension

Still Getting 500 Error?

  1. Copy the exact error from logs
  2. Note when the error started (after update? new plugin?)
  3. Try restoring from a backup if available
  4. Contact support with error details