The Wordfence plugin consists of:
1. Plugin files, located in wp-content/plugins/wordfence
2. Database tables, located in your database (they all start with the wf prefix, for example wp_wfConfig)
3. Firewall configuration files, located in wp-content/wflogs
4. If you have Optimized the Firewall to have “Extended protection”, you also have a wordfence-waf.php located in the root of your WordPress installation and a few configuration lines located in .htaccess, .user.ini or php.ini
Remove or Reset
Sometimes you may want to remove Wordfence completely. Other times you may want to delete all Wordfence data and recreate the tables so that Wordfence is reset to the defaults. This often helps solve issues with corrupted data. There are three ways you can delete or reset Wordfence.
Delete Wordfence data on deactivation
If you are removing Wordfence permanently, or if you want to do a fresh reinstall of Wordfence you can enable the option “Delete Wordfence tables and data on deactivation”. If you then deactivate the plugin, all the Wordfence tables will be deleted. You can then choose to activate Wordfence again to get a fresh installation, or you can choose to delete the plugin.
Use the Wordfence Assistant
The Wordfence Assistant is a plugin that has been developed specifically to solve issues with Wordfence that can not be solved within the plugin itself. You can download this plugin via the “Plugins” section in your WordPress admin and use it to delete all Wordfence data from your site.
To manually remove Wordfence, you would follow the steps below. It’s important that you do step 1 before the other steps.
1. Remove extended protection manually [Learn more]
2. Remove the “wordfence” plugin folder located in wp-content/plugins
3. Remove the wflogs folder located in wp-content
4. Remove wordfence-waf.php located in the root of you WordPress installation
5. Remove all Wordfence related database tables from the database, using for example phpMyAdmin.
Wordfence 7 Tables
Migrate with Wordfence
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.