Wordfence is well known and heavily used site security plugin but there may times when either a database table that Wordfence uses has been corrupted or you need to delete all of the data that Wordfence created on your site database.
Wordfence does have a setting that you can enable to delete tables and data on deactivation it can be found from the following settings page;
Wordfence > All Options > General Wordfence Options
Wordfence has a plugin that can remove all data easily the plugin is called Wordfence Assistant. The plugin when installed and activated will add a new admin menu called;
From the plugin settings, you can disable the WAF, live traffic feature as well as delete all data from the custom database tables that Wordfence uses.
Manage all your WordPress sites with the MainWP Dashboard
WordPress Management for Professionals
Are you ready to go Pro?
All MainWP Pro Extensions are available through one of our convenient bundled packages.
If you needed to re-install Wordfence plugin after the data has been cleaned then you can use the export and import feature that is has. Wordfence also does have a setting to remove all tables and data after deactivation.
First, you will need to deactivate the Wordfence plugin, then in the Wordfence Assistant, you can click the button to clear all data and the created tables.
Now when you activate Wordfence again it will create the needed custom database tables. If you need another method to verify that the Wordfence database tables have been created or deleted you can use the WP Optimize plugin and click on tables from the database settings.
WP Optimize > Database > Tables
You can search for wf which will find all of the database tables that Wordfence uses.
Once you have verified the database tables have been removed or that they exist you can deactivate the WP Optimize plugin on your site. Also, remember to deactivate the Wordfence Assistant if you no longer need it. The Wordfence Assistant plugin will not delete any of the files which Wordfence would have added into the main HTML folder of the site.
Wordfence is a security plugin that mostly works well, but if you either have to deal with missing database tables that are used or a corrupt database table it needs, knowing how to remove and create those tables are very handy for client projects.