Fatal error when activating Wordfence Extension

I’ve created a fresh WordPress installation for testing (translation project) and installed MainWP Dashboard 5.4.0.20. The site is running on PHP 8.4

When activating Wordfence Extension 5.1 I get the following warning and fatal errors:

PHP Warning:  file_get_contents(/.../wp-content/plugins/mainwp-wordfence-extension/class): Failed to open stream: No such file or directory in /.../wp-includes/functions.php on line 6900

PHP Fatal error:  Uncaught Error: Class "MainWP_Wordfence_Setting" not found in /.../wp-content/plugins/mainwp-wordfence-extension/mainwp-wordfence-extension.php:56
Stack trace:
#0 /.../wp-content/plugins/mainwp-wordfence-extension/mainwp-wordfence-extension.php(312): MainWP_Wordfence_Extension->__construct()
#1 /.../wp-content/plugins/mainwp-wordfence-extension/mainwp-wordfence-extension.php(232): MainWP_Wordfence_Extension_Activator->activate_this_plugin()
#2 /.../wp-content/plugins/mainwp-wordfence-extension/mainwp-wordfence-extension.php(344): MainWP_Wordfence_Extension_Activator->__construct()
#3 /.../wp-admin/includes/plugin.php(2387): include_once('...')
#4 /.../wp-admin/includes/plugin.php(673): plugin_sandbox_scrape()
#5 /.../wp-admin/includes/plugin.php(879): activate_plugin()
#6 /.../wp-admin/plugins.php(126): activate_plugins()
#7 {main}
  thrown in /.../wp-content/plugins/mainwp-wordfence-extension/mainwp-wordfence-extension.php on line 56

Occurrence: Warning is once, error is blocking activation.

1 Like

Hey @josklever

I couldn’t reproduce this issue. I’ve used a fresh WP install and a fresh MainWP Dashboard install running on PHP 8.4.10.

Can you try removing the add-on and reinstalling it?

If possible, try deactivating all non-MainWP plugins on the site.

If you still get the same error, please post the community system report from your MainWP Dashboard for our review.

A re-installation did help indeed. It appears that the plugin was installed incompletely the first time. Maybe the bulk install of all extensions at once was a bit to much.

Deactivating all non-MainWP plugins is not relevant on a fresh install.
Also solved!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.