Diagnosing HTTP 500 Errors
Understanding HTTP 500 Internal Server Errors
A 500 error means something went wrong on the server side. On BlitzPress, this is almost always a PHP fatal error, a misconfigured plugin, or a memory limit issue. The key to fixing it is finding the exact error in your logs.
Step 1: Check the OLS Error Log
Every site on BlitzPress has its own error log. SSH into your server and check:
tail -100 /home/YOUR_DOMAIN/logs/error.log
Look for lines containing PHP Fatal error, Allowed memory size exhausted, or Cannot redeclare. These tell you exactly which file and line triggered the error.
Step 2: Enable WP_DEBUG
If the error log does not provide enough detail, enable WordPress debug mode. Edit wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
After reproducing the error, check wp-content/debug.log for the full stack trace.
Step 3: Increase PHP Memory Limit
If the error is Allowed memory size exhausted, increase the PHP memory limit. On BlitzPress, edit your site’s PHP configuration:
blitzpress site:php YOUR_DOMAIN --memory_limit=512M
Or add to wp-config.php:
define( 'WP_MEMORY_LIMIT', '512M' );
Step 4: Identify Plugin Conflicts
If the error started after activating a plugin, deactivate it via WP-CLI:
sudo wp plugin deactivate --all --path=/home/YOUR_DOMAIN/public_html --allow-root
sudo wp plugin activate PLUGIN_NAME --path=/home/YOUR_DOMAIN/public_html --allow-root
Re-activate plugins one at a time to find the culprit.
Common Causes
- Plugin/theme PHP version incompatibility — check the plugin requires PHP 8.x
- Corrupted .htaccess equivalent — reset OLS rewrite rules via the panel
- File permission issues — ensure files are 644 and directories are 755
- Exhausted PHP workers — check
lsphpprocess count withps aux | grep lsphp