bbPress is forum or bulletin board software that is developed by the creators of WordPress. Its purpose is to allow webmasters to easily setup and integrate discussion forums inside your WordPress.org powered self-hosted site. Similar to WordPress, bbPress is lean, easy to use, support most web standards, support add-ons for more features and is fast in performance, as well as free.

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:

Note
Backup your database before resetting bbPress forums.
  1. Install and/or activate the bbPress plugin again if you have deactivated and/or delete it.
  2. In WordPress administration panel, go to Tools -> Forums -> Reset Forums tab.
  3. Check the Are you sure you want to do this? checkbox to acknowledge that the removal process cannot be undone.

    Completely Remove bbPress

  4. 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.
  5. 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.

  6. 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.

Tip
To delete just the bbPress forum content manually, i.e. forums, topics and replies, which makes use of WordPress custom post type, and leave everything else intact, you can run the following SQL query with phpMyAdmin or any MySQL client:

DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)
WHERE a.post_type IN ('forum', 'topic', 'reply')

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.