RevealTheme logo
Back to Blog

WordPress And Internal Server Errors: The First Diagnosis Steps

WordPress And Internal Server Errors: The First Diagnosis Steps
The RevealTheme Team

By

··3 min read

HTTP 500 errors mean the server failed to complete the request. The site shows a generic error page; the user can't proceed. The diagnosis takes specific steps that identify the cause quickly.

Step 1: enable WordPress debug

Edit wp-config.php to enable debug output:

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

The errors get logged to wp-content/debug.log. The display is off so users don't see them.

Reload the page that's erroring. Check debug.log for the specific error message.

Step 2: check the server error log

Beyond WordPress's debug log, the server's error log shows PHP errors, memory exhaustion, timeout, and other server-level issues.

Location varies by host: /var/log/apache2/error.log, /var/log/nginx/error.log, or available through hosting control panel.

Recent entries that correlate with the 500 error reveal the cause.

Step 3: deactivate plugins via FTP

If WordPress admin is also broken, rename the wp-content/plugins directory to plugins_disabled. This deactivates all plugins.

If the site works with plugins disabled, a plugin is the cause. Re-enable plugins one at a time to identify which.

Rename the directory back when done debugging.

Step 4: switch to default theme

If plugins aren't the cause, theme issues might be. Rename the active theme directory; WordPress falls back to a default theme.

If the site works with default theme, the previous theme is the cause.

Step 5: increase memory limit

If errors mention memory exhaustion, increase the PHP memory limit. In wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

The increase may not be enough on hosts with hard limits below that.

Step 6: check .htaccess

Corrupted .htaccess can cause 500 errors. Rename .htaccess to .htaccess.backup. Visit the site. If it works, the .htaccess was the issue.

Regenerate .htaccess by visiting Settings > Permalinks and saving. WordPress writes a clean version.

The common causes

Plugin conflict or bug. Most common cause.

Theme issue (after update or modification).

Memory exhaustion. Site outgrew its memory allocation.

Corrupted .htaccess.

PHP version incompatibility. WordPress or plugin doesn't work on the server's PHP version.

Server-level issue. The hosting provider's infrastructure has problems.

The honest framing

500 errors are scary but usually diagnosable in 15-30 minutes with the right approach. The diagnostic steps above identify most causes.

For sites that hit 500 errors frequently, the underlying instability needs addressing. The error isn't normal; the cause should be fixed rather than worked around.