Support » Plugin: Wordfence Security - Firewall & Malware Scan » Wordfence could not get an API key

  • Resolved pac749

    (@pac749)


    Here the message I get:
    “Wordfence could not get an API key from the Wordfence scanning servers when it activated. You can try to fix this by going to the Wordfence “options” page and hitting “Save Changes”. This will cause Wordfence to retry fetching an API key for you. If you keep seeing this error it usually means your WordPress server can’t connect to our scanning servers. You can try asking your WordPress host to allow your WordPress server to connect to noc1.wordfence.com.”

    I tried everything, even deactivated all plugins and change theme.
    Have a clue ?

    https://wordpress.org/plugins/wordfence/

Viewing 15 replies - 1 through 15 (of 15 total)
  • I host some domain inside my /public_html/ and everywhere, I can install the plugin without special issue… !

    Hello pac749,
    if you click on “Diagnostics” in Wordfence menu, what do you see under the header “Connectivity”?

    Everything looks fine, here it is…
    Checking if web server can read from ~/plugins/wordfence/tmp OK
    Checking if web server can write to ~/plugins/wordfence/tmp OK
    Checking if web server can write to ~/wp-content/wfcache OK
    MySQL
    Checking if MySQL user has DELETE privilege OK
    Checking if MySQL user has INSERT privilege OK
    Checking if MySQL user has SELECT privilege OK
    Checking if MySQL user has CREATE TABLE privilege OK
    Checking if MySQL user has ALTER TABLE privilege OK
    Checking if MySQL user has DROP privilege OK
    Checking if MySQL user has TRUNCATE privilege OK
    PHP
    PHP version >= PHP 5.2.4 (Minimum version required by WordPress) 5.5.34
    Checking for OpenSSL support OK
    Checking for cURL support 7.38.0
    Connectivity
    Connecting to Wordfence servers (http) OK
    Connecting to Wordfence servers (https) OK
    IPs Value Used
    REMOTE_ADDR 96.21.248.187 In use
    CF-Connecting-IP (not set)
    X-Real-IP (not set)
    X-Forwarded-For (not set)
    WordPress Plugins
    Akismet – Version 3.1.10 Inactive
    CodeStyling Localization Preserver – Version 1.0.6 Inactive
    Duplicate Post – Version 2.6 Inactive
    Insert HTML Snippet – Version 1.2 Inactive
    Krown Portfolio – Version 0.3 Inactive
    Revolution Slider – Version 4.6.5 Inactive
    Sidekick – Version 2.6.8 Inactive
    Wordfence Security – Version 6.1.3 Active
    WPBakery Visual Composer – Version 4.3.5 Inactive
    Must-Use WordPress Plugins
    No MU-Plugins
    Themes
    Aprico Version 1.0 Inactive
    Koncept Version 1.7.1 Inactive
    Twenty Eleven Version 2.4 Inactive
    Twenty Fifteen Version 1.5 Active
    Twenty Fourteen Version 1.7 Inactive
    Twenty Ten Version 2.1 Inactive
    Twenty Thirteen Version 1.9 Inactive
    Twenty Twelve Version 2.0 Inactive

    Hello pac749,
    your connectivity to the servers is fine so your system succeeds in retrieving a key but it seems unable to save it. Your diagnostics test looks fine.

    I’m suspecting there could be some problem with your database tables. If you are able to check your database for any corrupt tables you can try that.

    Otherwise you can try going to Wordfence “Options” page and at the bottom select “Delete Wordfence tables and data on deactivation?”. Then inactivate Wordfence and reactivate it. Please note that this will remove any traffic and settings that you currently have in Wordfence. It will give you a clean reinstall.

    “I’m suspecting there could be some problem with your database tables. If you are able to check your database for any corrupt tables you can try that.”

    What you mean exactly by “able to check your database”

    I can access my database but everything looks fine…

    And I tried to go to Options and check “Delete Wordfence tables and data on deactivation” but when I click save a turning gear appear and it goes on to infinity…

    Thanks

    Hello again pac749,
    could you try changing a Wordfence option while keeping a browser console open? That way we can see if you are getting any javascript errors. You can also click then “Net” or “Network” panel in the browser and try the same thing again. That would show if any ajax requests are failing. Thanks in advance!

    Hi wfasa, thanks for your support.
    I tried to change an option while my browser network console was open. But when I click Save Changes, it’s unable to complete de saving process.
    I took a screenshot of this: http://aprico.ca/wp-content/uploads/Screen%20Shot%202016-04-24%20at%2009.55.50.png

    thanks again !

    Hello again pac749,
    there is an error hiding in there but I can’t see it! 🙂 Do you see the red ring in the middle with an exclamationpoint and a number 1 next to it? Can you click on it to see the error it’s warning about? It might also be visible if you click “Console”.

    Hi wfasa,
    I did’nt notice this alert here is a screenshot when I click on it: http://aprico.ca/wp-content/uploads/Screen%20Shot%202016-04-26%20at%2008.44.23.png

    I have no clue what it can be…

    Thanks pac749,
    I don’t think that error is necessarily the cause of your problem with Wordfence but it’s a bit concerning since I do not recognize this file at all so you should still try to get rid of it. If you mouse over or click on that error can you get more information about where the file is located?

    Also just to check you are on a Linux, not Windows server, correct?

    Had a similar issue. Deleted all _wf* tables to correct. Suspect database corruption due to power outage.

    Agree with techstacy. In my case I opened phpMyAdmin and selected all tables and ran repair. This flagged up that table wp_wfConfig was corrupted. Having ran the repair I was then able to select the option in Wordfence to “Delete Wordfence tables and data on deactivation” then deactivated and re-activated. Sorted!

    In my case, when i’ve click Tools – Diagonostic
    I’ve the issue as below.

    Config
    Checking basic config reading/writing x Basic config writing
    Checking serialized config reading/writing x Serialized config writing

    Please help

    Hi jookkoo,
    I just stumbled on this old thread. I am assuming your problem has been solved by now but if anyone else encounters this thread, please note that if you can not save your options or you are getting failed tests on the Wordfence Diagnostics report for “Checking config reading/writing” it most likely means your Wordfence database tables are corrupt. You can use the Wordfence Assistant plugin to remove the tables and reinstall Wordfence.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Wordfence could not get an API key’ is closed to new replies.