I also just received this error. Help!
Fatal error: Uncaught Error: Class ‘GeoIp2\Database\Reader’ not found in /var/www/vhosts/ourwebsite.com/httpdocs/wp-content/plugins/wordfence/models/common/wfGeoIP2.php:28 Stack trace: #0 /var/www/vhosts/ourwebsite.com/httpdocs/wp-content/plugins/wordfence/lib/wfUtils.php(1370): wfGeoIP2::shared() #1 /var/www/vhosts/ourwebsite.com/httpdocs/wp-content/plugins/wordfence/lib/wordfenceClass.php(1837): wfUtils::geoIPVersion() #2 /var/www/vhosts/ourwebsite.com/httpdocs/wp-includes/class-wp-hook.php(286): wordfence::veryFirstAction(”) #3 /var/www/vhosts/ourwebsite.com/httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 /var/www/vhosts/ourwebsite.com/httpdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /var/www/vhosts/ourwebsite.com/httpdocs/wp-settings.php(327): do_action(‘plugins_loaded’) #6 /var/www/vhosts/ourwebsite.com/httpdocs/wp-config.php(86): require_once(‘/var/www/vhosts…’) #7 /var/www/vhosts/ourwebsite.com/httpdocs/wp-load.php(37): require_once(‘/var/www/vhosts. in /var/www/vhosts/ourwebsite.com/httpdocs/wp-content/plugins/wordfence/models/common/wfGeoIP2.php on line 28
Today I was advised that a site I manage was down.
I have multiple log lines with this error
[Wed Sep 12 19:49:02 2018] [warn] [client 82.13.40.155] mod_fcgid: stderr: PHP Fatal error: Class ‘GeoIp2\\Database\\Reader’ not found in /home/xxx/news/wp-content/plugins/wordfence/models/common/wfGeoIP2.php on line 28
I disabled the wordfence plugin and the site was up again.
We were also experiencing this problem after a recent automatic update to the Wordfence plugin. We resolved the issue by upgrading from PHP 5 to PHP 7.2. Not sure exactly what caused the error. Just sharing our experience.
Found the issue. This update includes a composer autoloader used to load the GeoIp2\Database\Reader class from the plugin directory.
My project already had a composer autoloader so Wordfence’s one got obscured or something. I just recreated the the autoloader from my project using composer commands (I have not done that in years) and they worked fine together again. This is a very project specific issue, so YMMV.
Hi @lxuser
If you have any other plugin that might be using geoip database, try to disable it then recheck this issue.
Let me know how it goes,
Thanks.
Hi @iragination
Could you please provide more information about how you fixed this issue? How can I do the same for my website.
I know a bit about composer. but don’t know how to “recreated the autoloader” for wordfence plugin.
I have the same error and it’s driving me CRAZY!
thanks!
Hi all!
We’re looking for more information about this issue to see what’s causing it. If you can send me a diagnostics report from Wordfence that would be super helpful. Go to Wordfence Tools > Diagnostics and at the top of the page click the button to send diagnostics, fill out [email protected] and your forum username and send. This will help us track down this issue (which we believe is a conflict with other plugins) and prevent it from happening again.
Thanks in advance,