How to Debug a WordPress Site That’s Not Working (Blank Screen, 500 Error)

WordPress Debug (Professional Diagnostic Steps)

When WordPress shows a blank screen, throws a 500 error, behaves strangely, or breaks after an update, the fastest way to resolve it is proper debugging: enable logging, check server logs, and isolate whether the issue comes from a plugin or the theme.

1) Enable WordPress debug in wp-config.php

In wp-config.php (above the line “That’s all, stop editing!”) add:

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

Important: With WP_DEBUG_DISPLAY = false, errors won’t be shown on the screen (safer), but will be written into a log file instead.

2) Check the WordPress debug log

Review the log file:

  • wp-content/debug.log

If debug.log is not created, verify that the wp-content folder is writable (write permissions) and that there is an actual PHP error being triggered and logged.

3) Check server Error Logs in cPanel

In parallel, check the server-level errors (these often contain 500/permission/fatal details):

  • cPanel → MetricsErrors

4) Disable all plugins (when you can’t access wp-admin)

Via FTP or File Manager (cPanel), do the following:

  • Go to wp-content
  • Rename the folder plugins to plugins-disabled

This disables all plugins at once. If the site starts working again, rename the folder back to plugins and re-enable plugins one-by-one to find the problematic one.

5) Switch to a default theme (if the theme is the problem)

If the issue is theme-related and you can’t access WP Admin, you can force WordPress to use a default theme.

Option A (recommended and faster): via files

  • Go to wp-content/themes
  • Rename the active theme folder (example: mythememytheme-disabled)

WordPress will then try to fall back automatically to an installed default theme (for example: twentytwentyfour).

Option B: via phpMyAdmin (wp_options)

  • phpMyAdmin → select the database → open the wp_options table (or your prefix, e.g. abc_options)
  • Find the options: template and stylesheet
  • Set both values to: twentytwentyfour (or another default theme that actually exists inside wp-content/themes)

Important: The value you enter must match the theme folder name inside wp-content/themes.

6) Security (important)

Don’t debug on a public live site if you can avoid it. If you must debug in production:

  • keep WP_DEBUG_DISPLAY = false
  • restrict access (maintenance mode, basic auth, IP allowlist, or temporary protection)
  • disable debugging immediately after the issue is fixed
Was this answer helpful? 120 Users Found This Useful (216 Votes)