The 500 Internal Server Error is the most generic and frustrating error in WordPress. It tells you something went wrong, but not what. Here is a systematic approach to track it down and fix it.
Check the Error Log First
Before trying random fixes, look at your server error log. The 500 error is a symptom — the log has the diagnosis.
- Apache: Check
/var/log/apache2/error.logor/var/log/httpd/error_log - Nginx: Check
/var/log/nginx/error.log - PHP-FPM: Check
/var/log/php-fpm/error.logor/var/log/php8.x-fpm.log - WordPress: Enable
WP_DEBUG_LOGand checkwp-content/debug.log
Nine times out of ten, the error log tells you exactly what happened.
The Most Common Causes
Corrupted .htaccess
If you are on Apache, rename .htaccess and reload. If the site works, go to Settings > Permalinks and click Save to regenerate it.
PHP Memory Limit
A script exceeding the memory limit triggers a 500 error. Increase it in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
Plugin or Theme Fatal Error
A PHP fatal error in a plugin or theme is the most common cause. Use the plugin/theme deactivation technique: rename wp-content/plugins to test plugins, rename your theme folder to test the theme.
File Permission Issues
WordPress files should be 644, directories 755. Incorrect permissions — especially after a server migration — cause 500 errors:
find /path/to/wordpress -type f -exec chmod 644 {} \;
find /path/to/wordpress -type d -exec chmod 755 {} \;
PHP Version Incompatibility
Upgraded PHP recently? Older plugins may use deprecated functions. Check the error log for “deprecated” or “fatal error” messages pointing to specific plugins.
When the Error Is Intermittent
Intermittent 500 errors are harder to diagnose. Common causes include:
- PHP workers running out under traffic spikes
- Database connection limits being hit
- Cron jobs consuming all available resources
- Memory leaks in long-running processes
For intermittent issues, monitoring tools are essential. Track your PHP error rate and response times over days, not minutes.
Emergency Fix
If your site is down with a 500 error and you cannot figure out the cause, fix-wp.com provides AI-powered emergency repair. It connects to your server, identifies the root cause, and applies the fix — typically within an hour. A full backup is created before any changes, and you only pay if the repair succeeds.
Join developers and agency owners who get backend optimization strategies, tool releases, and deep-dive guides.
No spam. Unsubscribe anytime. We respect your privacy.