Title: Fatal Error when activating
Last modified: January 4, 2020

---

# Fatal Error when activating

 *  Resolved [irwintheresa](https://wordpress.org/support/users/irwintheresa/)
 * (@irwintheresa)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-58/)
 * I recently had to rehost my website manually from backups. I had to reinstall
   or reactivate all of my plugins including Wordfence, but it threw a fatal error
   
   Fatal error: Uncaught Error: Call to undefined function filter_var() in /home/
   dh_6usrzb/tlinwright.com/wp-content/plugins/wordfence/waf/bootstrap.php:177 Stack
   trace: #0 /home/dh_6usrzb/tlinwright.com/wp-content/plugins/wordfence/waf/bootstrap.
   php(150): wfWAFWordPressRequest->_isValidIP(‘24.176.156.161’) #1 /home/dh_6usrzb/
   tlinwright.com/wp-content/plugins/wordfence/waf/bootstrap.php(70): wfWAFWordPressRequest-
   >_getCleanIPAndServerVar(Array) #2 /home/dh_6usrzb/tlinwright.com/wp-content/
   plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php(259): wfWAFWordPressRequest-
   >getIP() #3 /home/dh_6usrzb/tlinwright.com/wp-content/plugins/wordfence/waf/bootstrap.
   php(814): wfWAF->run() #4 /home/dh_6usrzb/tlinwright.com/wp-content/plugins/wordfence/
   wordfence.php(69): require_once(‘/home/dh_6usrzb…’) #5 /home/dh_6usrzb/tlinwright.
   com/wp-admin/includes/plugin.php(2223): include(‘/home/dh_6usrzb…’) #6 /home/
   dh_6usrzb/tlinwright.com/wp-admin/plugins.php(175): plugin_sandbox_scrape(‘wordfence/
   wordf…’) #7 {main} thrown in /home/dh_6usrzb/tlinwright.com/wp-content/plugins/
   wordfence/waf/bootstrap.php on line 177
 * The IP address shown above is not to my site but to my personal device. I had
   the full database backed up as of Dec 20, and rehosted Dec 22. It installs fine
   but fails at activation.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wfdave](https://wordpress.org/support/users/wfdave/)
 * (@wfdave)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-58/#post-12291433)
 * Hi [@irwintheresa](https://wordpress.org/support/users/irwintheresa/),
 * Can you verify that the PHP version on your new host is 5.2 or higher?
 * The error message in your post indicates that the `filter_var` function is missing,
   which is the case with versions below 5.2.
 * Dave
 *  Thread Starter [irwintheresa](https://wordpress.org/support/users/irwintheresa/)
 * (@irwintheresa)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-58/#post-12293120)
 * I have it at 7.4 FastCGI per my settings.
 *  Thread Starter [irwintheresa](https://wordpress.org/support/users/irwintheresa/)
 * (@irwintheresa)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-58/#post-12322004)
 * As an update, the new version activated without any errors. I still have no idea
   why it was breaking, but it’s working for now without any issues.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal Error when activating’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [irwintheresa](https://wordpress.org/support/users/irwintheresa/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-58/#post-12322004)
 * Status: resolved