• Resolved Matt Lovett

    (@mdeluk)


    Hi

    I just moved web host and when I try to login to WP admin I get this message:

    “ERROR: An error was encountered while trying to authenticate. Please try again.”

    Which seems to be linked to Wordfence?

    There are no errors in the console.

    The server IP has changed though, could this be an issue, do I need to change this somewhere?

    Or is there certain modules I should check are installed for Wordfence to function correctly?

    Matt

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @mdeluk and thanks for reaching out to us!

    I don’t believe this is Wordfence related as it seems your site isn’t recognizing your login credentials. If you wanted to double-check if its a Wordfence issue:

    • Please use FTP/SFTP — or any file manager your web host provides via their administration panel.
    • Look inside the /wp-content/plugins/ directory and rename the wordfence directory to wordfence.bak.
    • Once you have logged in to your WordPress admin you can name the folder back to wordfence again.
    • Refresh your dashboard and you should be able to see Wordfence Active again. If not, go to the Plugins page and Activate it.

    If you are not receiving emails, the unlock emails actually come from your website and not our servers. If you aren’t getting emails then you might want to check:

    • The emails (they come from [email protected]) are getting sent to your junk mail folder by your email client or provider. Make sure and whitelist or add your website to the list of safe domains so you get emails consistently.
    • Your web server is having a problem with the email software on it. This isn’t like regular emails you send and receive, but rather server alert messages. Usually, a restart of postfix or Sendmail (whichever is installed) can fix it. Your hosting provider may need to help with this.
    • Your hosting provider has disabled SMTP from the server for some reason like preventing the server from being used to spam people.
    • You have a third party plugin for sending emails with another service, like Gmail, which isn’t working. Reaching out to the plugin author for support can help.

    This will at least disable Wordfence and see if it’s what is causing the issue.

    Also, anytime you are migrating to a new host, it’s good to follow these steps in our documentation.
    https://www.wordfence.com/help/advanced/remove-or-reset/#migrate-with-wordfence

    Let me know if this helps!

    Thanks!

    Thread Starter Matt Lovett

    (@mdeluk)

    Ah yeah it was Wordfence, renaming the plugin folder to disable it solved it.

    Plugin Support WFAdam

    (@wfadam)

    Glad we could resolve that part @mdeluk

    Is everything else working when you enable the plugin again? If you didn’t remove the optimization before migrating, you might run into some other issues as well.

    Let me know what you find!

    Thanks!

    Thread Starter Matt Lovett

    (@mdeluk)

    Oh right – I did not ??

    Any suggestions on what I should do please? ??

    Plugin Support WFAdam

    (@wfadam)

    There are a couple of steps we could do to go through and alter some things or the easiest thing to do in my opinion is to completely reinstall Wordfence to guarantee it’s all done correctly for your new host.

    You can backup your Wordfence settings via the Export option. Navigate to Wordfence > Tools > Import/Export Options and click Export. You can also take note of the current Whitelisted URLs you have in Wordfence > Firewall > All Firewall Options > Whitelisted URLs as these are NOT included in the Import/Export, and will be lost during the re-install.
    Here is what is exported: https://www.wordfence.com/help/tools/import-export/
    During the export, you will be given a long string of text. Keep this safe, you’ll need it in a few minutes.

    To ensure you have completely removed Wordfence, follow these steps:

    • Remove extended protection manually (https://www.wordfence.com/help/firewall/optimizing-the-firewall/#removing-the-optimization)
    • Remove the wordfence plugin folder located in wp-content/plugins
    • Remove the wflogs folder located in wp-content
    • Remove wordfence-waf.php located in the root of you WordPress installation
    • Remove all Wordfence related database tables from the database, using for example phpMyAdmin or Wordfence Assistant plugin.
    • Check either .htaccess file or .user.ini depending on your server configuration and remove any code snippets wrapped by # Wordfence WAF and # END Wordfence WAF.

    Then install Wordfence and follow the prompts. It will be like setting Wordfence up for the first time. You will need to enter an email address, and then go into Tools > Import/Export Options and paste that string of text into the Import Wordfence Options field and click the button there. Make sure to Optimize the Firewall again as well!

    Let me know how this goes!

    Thanks!

    Thread Starter Matt Lovett

    (@mdeluk)

    Hi

    Ok thanks will give this a try looks like a long process do for each site though.

    I have not migrated all sites yet, is there a better way to do this process for Wordfence for sites I have yet to migrate?

    Matt

    Plugin Support WFAdam

    (@wfadam)

    If you are moving your site to a new server we recommend that you first remove extended protection. When your site has been migrated, you will then optimize the Firewall again.

    Optionally, you can choose to reset Wordfence and only migrate your settings. This will remove Firewall Optimization and all current blocks on your site.

    -Go to Dashboard > Global Options > General Wordfence Options. Enable option “Delete Wordfence tables and data on deactivation” and save.
    -Scroll down to the section “Import/Export Options” and click “Export Wordfence Options”. Save the export token in a safe place.
    -Deactivate Wordfence. Migrate your site. Activate Wordfence on the new server.
    -Go to Dashboard > Global Options > Import/Export Options. Enter the export token you previously saved and click to “Import Wordfence Options”
    -Optimize the Firewall.

    https://www.wordfence.com/help/advanced/remove-or-reset/#migrate-with-wordfence

    That should make it nice and smooth for you. Let me know if you have any questions.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ERROR: An error was encountered while trying to authenticate. – Moved web host’ is closed to new replies.