Troubleshooting

WP Toolkit fails to scan WordPress due to fatal PHP errors

After clicking ‘Scan’ in WP Toolkit within cPanel, your WordPress site is not listed, and you encounter a fatal PHP error message. This indicates a code issue within your WordPress installation, whether it’s the theme, plugin, or other code. WP Toolkit requires the code to be free of fatal errors in order to function properly.

Symptoms

  • WP Toolkit fails to list your WordPress site after a scan.
  • A fatal PHP error is displayed, such as:
    Fatal error: Uncaught Error: Class “Jet_Admin_Bar” not found in /home/username/public_html/wp-content/plugins/jet-engine/jet-engine.php:316
    or similar errors referencing undefined classes, functions, or memory limits.

Resolution

Follow these steps to troubleshoot and resolve the fatal PHP error, then rescan your site in WP Toolkit.


Step 1: Check the Error Logs

Error logs provide details about the fatal error, helping you pinpoint the cause.

  1. Locate Error Logs:
    See Where is the PHP error log for my website
  2. Identify the Error:
    • Look for a Fatal error entry. For example:
      Fatal error: Uncaught Error: Class “Jet_Admin_Bar” not found in /home/username/public_html/wp-content/plugins/jet-engine/jet-engine.php:316
    • Note the file path, line number, and error type (e.g., missing class, undefined function, memory exhaustion).

Step 2: Fix the Fatal PHP Error

Based on the error type, apply the appropriate fix. Below are common scenarios:

Scenario 1: Missing Class or Function (e.g., “Class ‘Jet_Admin_Bar’ not found”)

  • Cause: A plugin or theme references a class or function that’s missing, often due to a corrupted installation or outdated version.
  • Fix:
    1. Deactivate the Problematic Plugin:
    • Via File Manager or FTP, go to /wp-content/plugins/.
    • Rename the plugin folder mentioned in the error (e.g., ‘jet-engine’ to ‘jet-engine-disabled’).
    • Reload your site to confirm it works without the plugin.
      1. Reinstall the Plugin:
    • Delete the renamed folder.
    • Download a fresh copy of the plugin from its official source (e.g., WordPress.org or the developer’s site).
    • Upload it to ‘/wp-content/plugins/’ and activate it via the WordPress dashboard.
      1. Update PHP Version (if needed):
    • If the plugin requires a newer PHP version, change your PHP version to switch to a compatible version (e.g., PHP 8.2 or higher).

Scenario 2: Syntax Error (e.g., “Parse error: syntax error, unexpected…”)

  • Cause: A coding mistake in a plugin, theme, or core file.
  • Fix:
    1. Locate the File:
    • Check the error log for the file path (e.g., ‘/wp-content/themes/your-theme/functions.php’).
      1. Revert or Correct:
    • Via File Manager or FTP, rename the problematic theme/plugin folder to disable it.
    • If it’s a core file, restore it from a backup or reinstall WordPress manually.

Step 3: Enable Debug Mode (Optional)

If the error logs lack detail, enable WordPress debug mode to capture more information:
1. Open ‘/wp-config.php’ in File Manager or via FTP.
2. Add or modify these lines before /* That's all, stop editing! */:

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

3. Save the file, trigger the error again (e.g., reload your site), and check /wp-content/debug.log for details.


Step 4: Rescan in WP Toolkit

Once the fatal error is resolved:

  1. Return to cPanel and open WP Toolkit.
  2. Click Scan to detect your WordPress installation.
  3. Verify that your site now appears in the list.

Additional Tips

  • Backup First: Always back up your site before making changes.
  • Check PHP Version: Ensure your site’s PHP version matches the requirements of your plugins/themes.

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London