Error 500 and the white screen in WordPress: how to get your site back

You open your site and instead of the page you see either "500 Internal Server Error" or — even worse — a completely white page with no message at all. Both are symptoms of the same kind of problem: PHP has crashed, just in different ways. This post is a complete recovery guide in 12 steps — from the most likely causes to the hardest.

What sets a 500 apart from the WSOD #

500 Internal Server Error is a generic server status meaning "something broke in your PHP code, but I don't know what". The server returns a page with an error 500 message.

White Screen of Death (WSOD) = a completely white page with no content whatsoever. PHP crashed so early that it didn't even get to output an error message. The worst case for debugging, because you have no trail to follow.

In practice: both indicate that PHP didn't execute properly. They differ in how far it got before crashing.

Step 1: Turn on WP debug mode (the most important step) #

Without debug mode, you're debugging blind. Edit wp-config.php and add:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Load the site. If the WSOD persists, open wp-content/debug.log — now you can see the actual PHP error causing the problem.

Typical messages you'll see:

  • Fatal error: Allowed memory size of X bytes exhausted → memory
  • Fatal error: Maximum execution time exceeded → timeout
  • Parse error: syntax error, unexpected '...' → a corrupted PHP file (most often after an update)
  • Fatal error: Class 'X' not found → a missing plugin/library
  • Fatal error: Cannot redeclare function X() → a plugin conflict

Step 2: Check the error_log in cPanel #

cPanel → Metrics → Errors. It shows the last 300 PHP errors. You'll often see a clear stack trace.

Or over SSH:

tail -100 ~/public_html/error_log
tail -100 ~/logs/error_log

Step 3: Fixing memory exhaustion #

If you see "memory size exhausted", increase memory_limit. Edit wp-config.php:

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

Or in .user.ini:

memory_limit = 256M

Restart PHP-FPM (cPanel → Select PHP Version → Reset PHP) for the change to take effect.

Step 4: A plugin in an infinite loop / a plugin conflict #

The single most common cause of both the 500 and the WSOD. A plugin update has broken compatibility with another plugin or with WordPress core.

Recovery flow:

  1. Connect via FTP/SFTP or the cPanel File Manager
  2. Go to wp-content/
  3. Rename the plugins folder to plugins-OFF
  4. Load the site. If it works now (but without plugins), the problem is in one of the plugins.
  5. Rename it back to plugins
  6. Go into plugins and rename the plugin folders one at a time (e.g. wp-rocket → wp-rocket-OFF)
  7. Load the site after each change. When the site comes back, you've found the culprit.

If you can't use FTP, use the cPanel File Manager. Same principle.

Step 5: The theme broke the site #

A theme update or a change of theme can break the site. WordPress has a built-in fallback if the active theme is missing — it falls back to the latest default theme (Twenty Twenty-Four or similar).

Recovery:

  1. Over FTP, go to wp-content/themes/
  2. Rename the active theme's folder (e.g. my-theme → my-theme-OFF)
  3. WordPress automatically switches to the default theme
  4. The site now loads
  5. Open wp-admin, install or reinstall the theme, and check what was breaking

Step 6: Corrupted WordPress core #

A WordPress core update failed midway → corrupted files. Typically after an update that ran while the disk was full.

Fix:

  1. Download a fresh copy of WordPress from wordpress.org
  2. Unzip it locally
  3. Via FTP or the cPanel File Manager, overwrite only the wp-includes/ and wp-admin/ folders
  4. DO NOT touch wp-content/ or wp-config.php
  5. Load the site — if the core files were the problem, it works now

Step 7: A broken .htaccess #

A bad redirect rule, a mod_rewrite syntax error, or a new rule that broke the whole .htaccess.

Fix:

  1. Rename .htaccess to .htaccess-OFF
  2. Load the site. If it works now, the problem is in the .htaccess rules.
  3. Restore .htaccess with the default WordPress content (Settings → Permalinks → Save resets .htaccess)

Step 8: An incompatible PHP version #

A PHP upgrade from 7.4 to 8.x. Old plugins that use deprecated functions break. The site shows a WSOD or a 500.

Fix:

  1. cPanel → Select PHP Version → switch back to the previous version (e.g. from 8.3 back to 8.1)
  2. Once the site works, identify which plugin/theme isn't compatible
  3. Update the problem plugin to a version that supports the new PHP
  4. Or migrate to a new plugin (e.g. replace an old security plugin with Wordfence)
  5. Only then switch back to the new PHP version

Step 9: Full disk #

If the disk space limit has been reached, WordPress can't write to the cache, the log or the uploads folder. The site goes down with a 500 or a WSOD.

Check: cPanel → Statistics → Disk Usage. If it's at 95%+, that's the problem.

Fix:

  • Delete old backups
  • Delete the error_log file (it often runs to gigabytes)
  • Clear wp-content/cache/
  • Check whether email accounts are growing out of control
  • If it's still full, it's time for a bigger plan

Step 10: Database connection error #

If you see "Error establishing a database connection", that's a specific kind of WSOD. The site can't reach MariaDB.

Causes:

  • Wrong DB credentials in wp-config.php (after a migration)
  • The MariaDB server is down
  • The site has exceeded the max_connections limit
  • Broken DB user permissions

Fix: check the DB credentials, and contact support if MariaDB isn't responding.

Step 11: Only after all that — restoring a backup #

If the first 10 steps don't help, restore this morning's backup or one from before the last update. At WMD you restore it yourself through JetBackup in cPanel.

A backup is a safety net, not a first response. You should go through steps 1-10 first because:

  • A backup wipes any content created after the backup was taken
  • A backup doesn't fix the root cause — if the problem is a plugin update, it will happen again
  • A backup is precious — don't use it up unnecessarily

Step 12: If all else fails — escalate #

You've tried 11 steps and the site still shows a WSOD or a 500? It's rare, but it happens. It usually means:

  • A server-level problem (PHP-FPM corrupted, libraries missing)
  • Filesystem corruption
  • A cPanel/CloudLinux LVE config problem
  • A hardware issue

Contact support with:

  • A list of what you've already tried
  • A screenshot of the error page
  • The last 100 lines of the error_log
  • The time the problem started

When you get stuck on WMD hosting #

Backups run four times a day, and you can restore a website, a file or a database yourself through JetBackup in cPanel. If you can't do it yourself, support is available 24/7/365, and for a website that's down there's emergency repair.

Preventing the 500/WSOD #

  • Staging environment — test updates before they reach production
  • A backup before every change — 5 minutes of preparation saves 5 hours of panic
  • memory_limit of 256M minimum for WP, 512M for WooCommerce
  • WP-Cron on the system cron (not the WP default)
  • WP debug mode on in staging, so you see an issue straight away, before it reaches production
  • Keep an eye on WordPress update notifications and wait 3-5 days with major updates until the community has identified any issues

Is your site stuck on a 500 or a WSOD and you can't get it back? Get in touch: the review is free, and before the repair we tell you the cause, the timeframe and the price. Moving to WMD is free.