• Resolved tasthomp

    (@tasthomp)


    I’m trying to connect a site which uses Force Login to Wordfence. At first I came across this issue: https://wordpress.org/support/topic/restricted-site-forced-login-wordfence-central/, but their solution was disabling Force Login. I also came across this one: https://wordpress.org/support/topic/wordfence-use/, but adding your suggested code to functions.php doesn’t work.
    I presume I’m missing something obvious, or maybe there’s an updated workaround that I haven’t been able to find.
    I continually get the “Unable to communicate with Wordfence plugin.” message. Disabling the Force Login plugin seems to resolve it, and the other 4 sites I have, which don’t use the Force Login plugin connect fine.

Viewing 1 replies (of 1 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    According to the first support topic you referenced, Wordfence Central uses the WordPress REST API to communicate with the plugin. Force Login set the REST API to require authentication, you’ll need to authenticate or bypass the Wordfence REST API endpoint to allow it to connect.

    Check out this support topic for an example/method to allow public access to the REST API for a specific endpoint:

    https://wordpress.org/support/topic/bypassing-only-specific-rest-endpoint/

    Otherwise, you can allow the REST API to be publicly accessible again, by adding one of the following code snippets to your functions.php file:

    add_filter( 'rest_authentication_errors', '__return_true' );
    

    OR

    remove_filter( 'rest_authentication_errors', 'v_forcelogin_rest_access', 99 );
    
Viewing 1 replies (of 1 total)

The topic ‘Wordfence connection’ is closed to new replies.