> ## Documentation Index
> Fetch the complete documentation index at: https://kb.stablepoint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to debug WordPress with cPanel and WordPress Toolkit

When a WordPress site misbehaves — white screen, 500 errors, broken features — systematic debugging finds the cause fastest. Here's how to do it with cPanel and the WordPress Toolkit.

## Step 1: Check the error logs

1. In cPanel, open **Errors** (Metrics section) for recent Apache/PHP errors, and check the error\_log files that PHP writes into your site's directories (visible in **File Manager**, typically in public\_html or the folder where the error occurred).
2. The most recent entries usually name the failing file — often a specific plugin or theme file. That's your prime suspect.

## Step 2: Enable WP\_DEBUG logging

Edit wp-config.php (File Manager → Edit) and add above the "That's all" line:

```php theme={null}
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
```

Errors, warnings, and notices are now written to wp-content/debug.log without being shown to visitors. Reproduce the problem, then read the log.

<Warning>
  Remove or set these back to false when you're done — debug logging on a live site grows the log file and can leak information if misconfigured to display.
</Warning>

## Step 3: Isolate plugins and themes with the Toolkit

The classic conflict test, made painless by [WP Toolkit](/web-hosting/software-guides/how-to-edit-my-wordpress-website-in-cpanel-using-wp-toolkit) — no wp-admin needed (useful when wp-admin itself is broken):

1. In cPanel → **WP Toolkit**, open the site's card.
2. Under **Plugins**, deactivate all plugins. Site fixed? Reactivate them one at a time until it breaks again — the last one activated is the culprit.
3. Still broken with all plugins off? Under **Themes**, switch to a default theme (Twenty Twenty-Four). If that fixes it, the theme is at fault.

On Deluxe, do this on a **clone** instead of the live site for zero risk.

## Step 4: Check PHP version and limits

* Fatal errors mentioning syntax or undefined functions after an update often mean a [PHP version mismatch](/web-hosting/software-guides/how-to-change-your-php-version-in-cpanel) — try the version the plugin/theme requires.
* "Allowed memory size exhausted" → raise memory\_limit; timeouts → raise [max\_execution\_time](/web-hosting/software-guides/how-to-increase-your-php-maximum-execution-time).

## Step 5: Common specific fixes

* **White screen after editing functions.php:** fix or revert the edit via File Manager — the log from Step 1 gives the exact line number.
* **Too many redirects:** check siteurl/home values (must both be https and consistent) and any redirect plugins.
* **Changes not appearing:** clear all caches — LiteSpeed Cache/plugin cache, and browser cache.
* **wp-admin locked out entirely:** use WP Toolkit's login button; if even that fails, deactivate plugins via the toolkit and retry.

## When to hand it over

If the logs point at something server-side, or you're stuck, open a support ticket with the exact error text and the timestamps — our team can check server-level logs that aren't visible in cPanel.
