Skip to content

HTTP 500 on WordPress after a plugin update on cPanel

Diagnosing and reversing an HTTP 500 on a WordPress site after a plugin update on cPanel — log isolation, plugin rollback, and how to prevent the next one.

HTTP 500 after a plugin update means the new plugin code is incompatible with something on the server — usually the PHP version, occasionally another plugin, occasionally a missing extension. The error log has the answer. The site needs to come back before you have time to read it carefully, so the order of operations matters.

What’s happening

A plugin update writes new PHP files to wp-content/plugins/<name>/. On the next request, WordPress includes those files. If they reference a function that doesn’t exist, a class that doesn’t load, or use a syntax not supported by the running PHP version, the request throws a fatal error. Apache or LiteSpeed translates that into a 500 for the visitor. Meanwhile, the plugin is enabled in the database and WordPress will keep trying to load it on every request.

How to verify

Confirm the timing matches a recent update:

ls -lt ~/public_html/wp-content/plugins/ | head -10
wp plugin list --field=name,version,update --format=table | grep -v 'none'
tail -50 ~/public_html/error_log
grep -i 'fatal' ~/public_html/error_log | tail

The most recently modified plugin directory is your prime suspect. The fatal error in the log will name the file.

The fix

  1. Get the site back first. The fastest path is to deactivate the suspect plugin by renaming its folder — works even when WP-Admin is itself returning 500:

    mv ~/public_html/wp-content/plugins/example-plugin ~/public_html/wp-content/plugins/example-plugin.broken

    Reload. If the site returns, you’ve isolated the cause.

  2. If WP-Admin is reachable, use WP-CLI instead — cleaner:

    wp plugin deactivate example-plugin
  3. Roll back to the working version. Find a previous-version archive from your backup, from the WordPress.org plugin page’s Advanced View, or from the developer. Replace the broken folder:

    rm -rf ~/public_html/wp-content/plugins/example-plugin
    unzip example-plugin-1.4.2.zip -d ~/public_html/wp-content/plugins/
    wp plugin activate example-plugin
  4. Read the fatal error carefully before you re-enable anything. The classic cases:

    • Call to undefined function str_contains() — PHP 7.x can’t run code that needs PHP 8+. Bump PHP or roll back the plugin.
    • Class "WP_REST_Response" not found — usually a WordPress core version too old for the plugin. Update core.
    • Cannot redeclare function foo() — two plugins are colliding on a function name; uninstall one.
  5. Decide whether to retry the upgrade. If the cause was a PHP version mismatch, you have two paths: bump PHP on the cPanel account (cPanel > MultiPHP Manager) and retry the plugin, or pin the plugin to the older version. The PHP bump is better long-term but requires testing the rest of the site first.

  6. Document the plugin and version. If this is a managed environment, the next operator should not relearn that “example-plugin 1.5.0 needs PHP 8.1.” Note it in your runbook.

  7. Adopt a smaller blast radius for next time. Plugin updates should happen on staging first, or at least with a snapshot taken seconds before. WP Toolkit can take a per-site backup before an update if you ask it to. JetBackup with a 5-minute pre-update snapshot is another path.

For environments where this needs not to happen at all on production, Stack Harbor sets up staged update flows under enterprise WordPress support.