• Resolved sflwa

    (@sflwa)


    I have a website where you must login to view the site – I can’t add it to central as it is having issues with the being redirected to the login page – what should I do??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @sflwa, thanks for getting in touch and sorry to see you’re having these troubles.

    When connecting from the Wordfence Central side, it does require the access to the site so that it can check versions and perform other tasks to verify the connection. If this is obscured by either changing the wp-admin URL or there’s another blocker to this like the login you mention, then problems can arise.

    You should try connecting from the site itself. Firstly, in Wordfence Central, visit the Connection Issues tab. Clear out the site from that list if it appears.

    Now head over to your site and log in as an admin. Navigate to Tools > Diagnostics > Other Tests > Clear all Wordfence Central connection data. Clear the connection data and then from the Wordfence Dashboard, click on “Connect this site” in the Wordfence Central widget.

    https://www.wordfence.com/help/central/connect/#troubleshooting-connection-issues also has some troubleshooting steps for your reference.

    If none of those approaches work for you, get back to me and we’ll see how to move forward.

    Peter.

    Thread Starter sflwa

    (@sflwa)

    @wfpeter

    Thanks for replying
    The site isn’t currently listed in central.

    So the login isn’t blocked – it’s forced – so when you go to “example.com” it goes to
    https://example.com/wp-login.php?redirect_to=https://example.com

    This is what I get in central when trying to add the site
    Unable to communicate with Wordfence plugin. Please verify Wordfence is installed and activated on this site.

    The site is running on a Lightsail server on AWS with Plesk – I did notice one of the IPs from https://www.wordfence.com/help/advanced/ were blocked so I already cleared that.

    Thoughts on next steps?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @sflwa,

    Thanks for trying those and ensuring the IPs are not blocked. Do you receive the same “Unable to communicate…” error when attempting to connect the opposite way (rather than from Central) from the site’s Wordfence dashboard using the Connect This Site link?

    Thanks,

    Peter.

    Thread Starter sflwa

    (@sflwa)

    @wfpeter

    Yes
    1) Checking Site
    2) Checking Connection
    3) Checking Wordfence Plugin
    4) Error

    I have other sites on Amazon (in the same account but different server) which are working fine

    Plugin Support wfpeter

    (@wfpeter)

    Hi @sflwa,

    I don’t believe I’ve received a diagnostic after just checking our inbox, so I can’t look into this specific route for you but a clue could be in the REST API. If you are in a position to provide one, please consult the instructions I left in my previous reply.

    Can you try accessing the following URL from a browser?: https://www.YOURSITEHERE.com/wp-json/wordfence/v1

    If you receive seemingly an error, such as "rest_not_logged_in", Wordfence Central uses the WordPress REST API to communicate with the plugin. If you’ve disabled the REST API or set it to require authentication, you’ll need to enable it before connecting your site to Central. It could be something you have set on your side, or a plugin that is causing it, but if you enable the REST API, it will resolve your issue.

    If you see a namespace and list of routes returned, the REST API is working correctly and I will request further information from our Central team once we receive your diagnostic.

    Thanks again,

    Peter.

    Thread Starter sflwa

    (@sflwa)

    @wfpeter
    Sorry for the delay –
    {“code”:”rest_unauthorized”,”message”:”Only authenticated users can access the REST API.”,”data”:{“status”:401}}

    I deactivated the “Force Login” (https://wordpress.org/plugins/wp-force-login/)
    Reconnected the site and reactivated it and it seems to be working.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Restricted Site (Forced Login) & WordFence Central’ is closed to new replies.