But bbPress may not for everybody. After installing bbPress, you may come to realize that it does not suit your need, or your community has grown to a level that you require something more powerful and advanced. At this point of time, it’s time to uninstall and delete bbPress plugin from the WordPress, and clean up the database.
By simply deactivating bbPress and delete the plugin in WordPress will not remove any of bbPress data. Unless you want to keep all the bbPress data where you may reinstall bbPress in future, you will want to completely delete and clean up the bbPress related entries in the database.
How to Completely Delete bbPress Data from Database
bbPress includes a tool to delete all the bbPress data in the database. To use it, follow these steps:
- Install and/or activate the bbPress plugin again if you have deactivated and/or delete it.
- In WordPress administration panel, go to Tools -> Forums -> Reset Forums tab.
- Check the Are you sure you want to do this? checkbox to acknowledge that the removal process cannot be undone.
- Optional: You may also want to check Delete imported users? as once the bbPress is reset, the meta-data necessary to delete these users will also be removed.
- Click Reset bbPress.
You should see the various results indicating successful operations.
Deleting Posts… Success!
Deleting Topic Tags… Success!
Deleting Conversion Table… Failed
Deleting Settings… Success!
Deleting Roles and Capabilities… Success!
Note: Conversion Table is mainly used for import from other forum software. If you never imported any database, just ignore the failure.
- Deactivate and delete the bbPress plugin.
All bbPress data is removed from WordPress database, including custom post types that defined and user meta by bbPress:
- All Forums
- All Topics
- All Replies
- All Topic Tags
- Related Meta Data
- Forum Settings
- Forum Activity
- Forum User Roles
- Importer Helper Data
However, some bbPress user roles may still not been deleted. For example, the traces of Keymaster, Moderator, Participant, Spectator and Blocked user roles may still appear in Users list menu and user profiles. To completely remove these bbPress installed user roles, add the following code to your active theme’s functions.php file:
$wp_roles = new WP_Roles(); $wp_roles->remove_role("bbp_keymaster"); $wp_roles->remove_role("bbp_moderator"); $wp_roles->remove_role("bbp_participant"); $wp_roles->remove_role("bbp_spectator"); $wp_roles->remove_role("bbp_blocked");
Load your website at least once. And voila, all bbPress related user roles are now removed from database. You can safely remove the code from functions.php once done.
If you have older versions of bbPress which uses separate bbPress tables with name starting with bb_, you can easily delete all bbPress data by dropping these bb_ databases.