Wordfence migration problem

When I am using Wordfence and I migrated my site only to discover that I am locked out of my site because Wordfence detected they are in a new site! And so I have to search the web for a solution to get in my site.

Then It is clear that Wordfence has a folder which I had to delete so that it is deactivated so that I can get into the admin panel of my website. So I had to use SSH to login to website and rename that folder then reboot the server to gain access to my new site.

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

If you do not want to delete you can just rename this folders.

Alternative ways

you can remove the firewall setup files and related code by enabling the option “Delete Wordfence tables and data on deactivation”.  This is found in the “General Wordfence Options” section on the “Dashboard” > “Global Options” page. You then need to deactivate Wordfence on the WordPress “Plugins” page. This method will reset all Wordfence options entirely after you activate it again since it removes all Wordfence tables and data.

Conclusion

Therefore before you migrate your site, please remove your Wordfence plugin completely including all its table and data.