WordPress "Plugin Could Not Be Activated Because It Triggered a Fatal Error": How to Fix It (2026)

Plugin Could Not Be Activated - WordPress error fix

You click Activate on a new plugin and WordPress stops with this message: Plugin could not be activated because it triggered a fatal error. The good news is that your site usually keeps working. WordPress refuses to switch the plugin on instead of letting it crash everything. This guide shows how to find the real cause and fix it.

The Short Version

  • The message is generic. The real reason is written in the PHP error log, not on the screen.
  • Common causes: a PHP version the plugin does not support, a required plugin that is missing, a function name used twice, a damaged upload, or low memory.
  • Turn on the debug log, read the last lines of wp-content/debug.log, and fix what it names.
  • The plugin was never activated, so the site normally stays online.

Why This Error Happens

  • PHP version mismatch. The plugin needs a newer (or older) PHP version than your host runs.
  • Missing dependency. An add-on needs its parent plugin active first, for example an add-on for a shop or page builder plugin.
  • Duplicate function or class. Two plugins use the same name. This often happens when a free and a Pro version are both installed.
  • Damaged upload. The zip did not extract fully, so files are missing.
  • Not enough memory. PHP runs out of memory during activation.

Step 1: Find the Real Error

Open wp-config.php with your hosting File Manager or FTP. Add these three lines above the line that says “That’s all, stop editing”:

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

Now try to activate the plugin again. Then open wp-content/debug.log. The last lines name the file and the line number that failed. When you are done, set WP_DEBUG back to false so errors are not logged all the time.

Step 2: Match the Message to the Fix

  • "Cannot redeclare …": another plugin already defines it. Deactivate the duplicate, such as the free version when you installed the Pro one.
  • "Call to undefined function" or "Class not found": a required plugin is missing or inactive. Activate the required plugin first.
  • "syntax error, unexpected …": the plugin uses code your PHP version does not understand. Ask your host to raise PHP, or pick a plugin version that supports yours.
  • "Allowed memory size … exhausted": raise the memory limit. See our memory limit guide.

Step 3: Check the Plugin Requirements

Open the plugin’s page on WordPress.org and look at the version details. It lists the WordPress and PHP versions the plugin needs. Compare them with your site under Tools, then Site Health, then Info, then Server. If your PHP is too old, update it in your hosting panel. Take a backup first, because a PHP update can break other plugins. Our PHP update guide covers that case.

Step 4: Reinstall the Plugin Cleanly

  1. Delete the plugin folder from wp-content/plugins using File Manager or FTP.
  2. Download a fresh zip from the original developer or from WordPress.org.
  3. Upload and activate it again.

Only use plugin files from sources you trust. A plugin from an unknown site can contain harmful code.

If Your Site Is Broken After Activation

This is rare, but it can happen. Rename the plugin’s folder inside wp-content/plugins using File Manager or FTP. WordPress then deactivates it automatically. If you still see an error page, follow our critical error guide or the white screen guide. If several plugins are involved, use the plugin conflict guide.

How to Avoid It Next Time

  • Take a backup before installing a plugin.
  • Read the plugin’s required WordPress and PHP versions first.
  • Activate one plugin at a time, so you know which one caused a problem.
  • If you can, test new plugins on a staging copy of the site.

Verified Facts and Sources

Checked in December 2026. The WordPress developer documentation says WP_DEBUG_LOG saves errors to a debug.log file inside wp-content. WordPress 5.2 added a "Requires PHP" plugin header so plugins can state the minimum PHP version they need, and it also added Fatal Error Recovery Mode.

Frequently Asked Questions

Does this error take my website down?

Usually no. The plugin is not activated, so the site normally keeps running as before.

Where is the debug.log file?

It is in the wp-content folder. WordPress only creates it after WP_DEBUG_LOG is turned on and an error happens.

What if the error is about the PHP version?

Ask your host to raise PHP to a version the plugin supports, or choose another plugin. Do not install old plugin versions unless the developer says they are safe.

Is it safe to leave WP_DEBUG turned on?

No. Turn it off when you finish, so the log does not fill up and errors are not recorded all the time.

Updated December 3, 2026.

More WordPress Error Fixes

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *