Title: Wordfence connection
Last modified: October 11, 2022

---

# Wordfence connection

 *  Resolved [tasthomp](https://wordpress.org/support/users/tasthomp/)
 * (@tasthomp)
 * [4 years ago](https://wordpress.org/support/topic/wordfence-connection/)
 * 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/](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/](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](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [4 years ago](https://wordpress.org/support/topic/wordfence-connection/#post-16096707)
 * Hi– thanks for using Force Login!
 * According to the first [support topic](https://wordpress.org/support/topic/restricted-site-forced-login-wordfence-central/)
   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/](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.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/wordfence-connection/#post-16096707)
 * Status: resolved