Support » Fixing WordPress » Wordfence broke my website

  • In attempting to fix a hacked site by identifying the malicious lines of code I downloaded the Wordfence plug-in. The plug-in successfully was installed but once I tried to activate it I received this text and now I can no longer go ANYWHERE on my site. I can’t log in. I can’t remove the plug-in. I can’t do anything but see this text:

    Warning: Invalid argument supplied for foreach() in /home1/nsync908/public_html/stillnsync/wp-content/plugins/wordfence/wordfence.php on line 24

    Fatal error: Call to undefined function wp_get_current_user() in /home1/nsync908/public_html/stillnsync/wp-includes/user.php on line 209

    This wasn’t happening before I installed Wordfence. I’m at a loss as to what to do now as I don’t have a clean backup of the site and now I can’t even see the back end to potentially pull important content into a Word doc just to make sure I have it!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you feel that this plugin caused a problem, then please report it on the plugin forum. This forum is for general WordPress issues. The developers on the Wordfence forum are best suited to address your issue.

    Here is the link to the Wordfence forum:

    • This reply was modified 8 months, 3 weeks ago by  Tim B. Reason: added forum link
    Moderator Steve Stern


    Support Team Volunteer

    Via FTP or your hosting control panel’s file manager app, delete the plugin directory wp-content/plugins/wordfence.

    What version of WordPress are you running?
    What version of PHP are you using?

    Thank you, both. I’ve asked on the Wordfence Forum and apologize for posting here!

    I can no longer see anything on my site to see what version of wordpress I am running or PHP I am using. I suppose I should write those things down in the future in case everything breaks completely. It’s just so frustrating!

    You can find your WP version in the file, <root>/wp-includes/version.php

    The best approach is to download that version of WP from, unzip the package and then upload the files to your site. The fatal error you are getting in user.php is what is preventing your site from loading.

    By replacing uploading a fresh set of WP files you will eliminate the corrupted files. Wordfence should be able to help you identify any additional files that may have been introduced during the hacking process.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wordfence broke my website’ is closed to new replies.